From: nerdopolis Date: Fri, 2 Aug 2024 18:32:22 +0000 (-0400) Subject: space-flares: Support ConsoleViewerPreserveBackground option to keep the background... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22fd5bfde4095b8e64a3490f655b03d70078fa91;p=thirdparty%2Fplymouth.git space-flares: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active --- diff --git a/src/plugins/splash/space-flares/plugin.c b/src/plugins/splash/space-flares/plugin.c index 0f55dda0..abda9056 100644 --- a/src/plugins/splash/space-flares/plugin.c +++ b/src/plugins/splash/space-flares/plugin.c @@ -211,6 +211,7 @@ struct _ply_boot_splash_plugin uint32_t should_show_console_messages : 1; ply_buffer_t *boot_buffer; uint32_t console_text_color; + uint32_t console_viewer_preserve_background; }; ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void); @@ -637,6 +638,9 @@ create_plugin (ply_key_file_t *key_file) "ConsoleLogTextColor", PLY_CONSOLE_VIEWER_LOG_TEXT_COLOR); + plugin->console_viewer_preserve_background = + ply_key_file_get_bool (key_file, "space-flares", "ConsoleViewerPreserveBackground"); + plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL; plugin->progress = 0; plugin->progress_target = -1; @@ -1478,7 +1482,7 @@ draw_background (view_t *view, image_area.width = ply_image_get_width (view->scaled_background_image); image_area.height = ply_image_get_height (view->scaled_background_image); - if (plugin->should_show_console_messages) { + if (plugin->should_show_console_messages && plugin->console_viewer_preserve_background == false) { ply_pixel_buffer_fill_with_hex_color (pixel_buffer, &area, 0); return; } @@ -1487,6 +1491,9 @@ draw_background (view_t *view, &image_area, &area, ply_image_get_data (view->scaled_background_image)); + if (plugin->should_show_console_messages) + return; + image_area.x = image_area.width - ply_image_get_width (plugin->star_image); image_area.y = image_area.height - ply_image_get_height (plugin->star_image); image_area.width = ply_image_get_width (plugin->star_image);