mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 11:58:08 +02:00
Merge branch 'dont-clear-serial-consoles' into 'main'
details: Only clear screen on VT not serial consoles Closes #187 See merge request plymouth/plymouth!197
This commit is contained in:
commit
ccf2edf406
1 changed files with 26 additions and 11 deletions
|
|
@ -202,6 +202,29 @@ view_write (view_t *view,
|
|||
ply_terminal_write (terminal, "%.*s", (int) number_of_bytes, text);
|
||||
}
|
||||
|
||||
static void
|
||||
view_write_boot_buffer (view_t *view)
|
||||
{
|
||||
ply_boot_splash_plugin_t *plugin;
|
||||
ply_terminal_t *terminal;
|
||||
|
||||
plugin = view->plugin;
|
||||
|
||||
terminal = ply_text_display_get_terminal (view->display);
|
||||
|
||||
ply_text_display_clear_screen (view->display);
|
||||
ply_terminal_activate_vt (terminal);
|
||||
|
||||
if (plugin->boot_buffer != NULL) {
|
||||
size_t size;
|
||||
const char *bytes;
|
||||
|
||||
size = ply_buffer_get_size (plugin->boot_buffer);
|
||||
bytes = ply_buffer_get_bytes (plugin->boot_buffer);
|
||||
view_write (view, bytes, size);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
write_on_views (ply_boot_splash_plugin_t *plugin,
|
||||
const char *text,
|
||||
|
|
@ -237,20 +260,12 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
|
|||
view = view_new (plugin, display);
|
||||
|
||||
terminal = ply_text_display_get_terminal (view->display);
|
||||
if (ply_terminal_open (terminal)) {
|
||||
ply_text_display_clear_screen (view->display);
|
||||
ply_terminal_activate_vt (terminal);
|
||||
}
|
||||
ply_terminal_open (terminal);
|
||||
|
||||
ply_list_append_data (plugin->views, view);
|
||||
|
||||
if (plugin->boot_buffer != NULL) {
|
||||
size_t size;
|
||||
const char *bytes;
|
||||
|
||||
size = ply_buffer_get_size (plugin->boot_buffer);
|
||||
bytes = ply_buffer_get_bytes (plugin->boot_buffer);
|
||||
view_write (view, bytes, size);
|
||||
if (ply_terminal_is_vt (terminal)) {
|
||||
view_write_boot_buffer (view);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue