return splash;
}
-static ply_terminal_t *
-find_local_console_terminal (ply_boot_splash_t *splash)
-{
- ply_list_node_t *node;
- node = ply_list_get_first_node (splash->text_displays);
-
- while (node != NULL)
- {
- ply_text_display_t *display;
- ply_terminal_t *terminal;
- ply_list_node_t *next_node;
-
- display = ply_list_node_get_data (node);
- next_node = ply_list_get_next_node (splash->text_displays, node);
-
- terminal = ply_text_display_get_terminal (display);
-
- if (terminal != NULL && ply_terminal_is_vt (terminal))
- return terminal;
-
- node = next_node;
- }
-
- return NULL;
-}
-
void
ply_boot_splash_set_keyboard (ply_boot_splash_t *splash,
ply_keyboard_t *keyboard)
splash->plugin_interface->hide_splash_screen (splash->plugin,
splash->loop);
- if (ply_list_get_length (splash->pixel_displays) >= 1)
- {
- ply_terminal_t *terminal;
-
- terminal = find_local_console_terminal (splash);
-
- if (terminal != NULL)
- ply_terminal_set_mode (terminal, PLY_TERMINAL_MODE_TEXT);
- }
-
splash->mode = PLY_BOOT_SPLASH_MODE_INVALID;
if (splash->loop != NULL)
detach_from_running_session (state);
}
+static void
+hide_splash (state_t *state)
+{
+ if (state->boot_splash == NULL)
+ return;
+
+ ply_boot_splash_hide (state->boot_splash);
+
+ if (state->local_console_terminal != NULL)
+ ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_TEXT);
+}
+
static void
dump_details_and_quit_splash (state_t *state)
{
if (state->renderer != NULL)
ply_renderer_deactivate (state->renderer);
- if (state->boot_splash != NULL)
- ply_boot_splash_hide (state->boot_splash);
+
+ hide_splash (state);
state->is_shown = false;
ply_trace ("hiding splash");
if (state->renderer != NULL)
ply_renderer_deactivate (state->renderer);
- if (state->boot_splash != NULL)
- ply_boot_splash_hide (state->boot_splash);
+
+ hide_splash (state);
state->is_shown = false;
}
if (state->boot_splash != NULL)
{
ply_trace ("hiding and freeing current splash");
- ply_boot_splash_hide (state->boot_splash);
+ hide_splash (state);
ply_boot_splash_free (state->boot_splash);
state->boot_splash = NULL;
}