From 9e553a1fb2c5f299f389d05b6181f870b544dd0c Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 20 Jun 2008 13:47:26 -0400 Subject: Use libplybootsplash clear screen function --- src/splash-plugins/text/plugin.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/splash-plugins/text/plugin.c b/src/splash-plugins/text/plugin.c index 953d42a..69e01a5 100644 --- a/src/splash-plugins/text/plugin.c +++ b/src/splash-plugins/text/plugin.c @@ -54,7 +54,6 @@ #include #define CLEAR_LINE_SEQUENCE "\033[2K\r\n" -#define CLEAR_SCREEN_SEQUENCE "\033[2J" #define HIDE_CURSOR_SEQUENCE "\033[?25l" #define SHOW_CURSOR_SEQUENCE "\033[?25h" #define BACKSPACE "\b\033[0K" @@ -132,12 +131,6 @@ on_enter (ply_boot_splash_plugin_t *plugin, } } -static void -clear_screen (ply_boot_splash_plugin_t *plugin) -{ - write (STDOUT_FILENO, CLEAR_SCREEN_SEQUENCE, strlen (CLEAR_SCREEN_SEQUENCE)); -} - static void hide_cursor (ply_boot_splash_plugin_t *plugin) { @@ -175,7 +168,7 @@ show_splash_screen (ply_boot_splash_plugin_t *plugin, plugin->window = window; - clear_screen (plugin); + ply_window_clear_screen (plugin->window); hide_cursor (plugin); return true; @@ -191,7 +184,7 @@ print_dots (ply_boot_splash_plugin_t *plugin) screen_width = ply_window_get_number_of_text_columns (plugin->window); screen_height = ply_window_get_number_of_text_rows (plugin->window); - clear_screen (plugin); + ply_window_clear_screen (plugin->window); ply_window_set_text_cursor_position (plugin->window, screen_width / 2 - plugin->number_of_dots / 2, screen_height / 2); @@ -234,7 +227,7 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin, detach_from_event_loop (plugin); } - clear_screen (plugin); + ply_window_clear_screen (plugin->window); show_cursor (plugin); plugin->window = NULL; -- cgit