size_t number_of_bytes);
static ply_buffer_t *debug_buffer;
static char *debug_buffer_path = NULL;
+static void check_for_consoles (state_t *state,
+ const char *default_tty);
static void
on_session_output (state_t *state,
return;
}
+ check_for_consoles (state, state->default_tty);
+
has_display = ply_list_get_length (state->pixel_displays) > 0 ||
ply_list_get_length (state->text_displays) > 0;
state->boot_splash = NULL;
}
- ply_trace ("removing displays and keyboard");
- remove_displays_and_keyboard (state);
-
if (state->renderer != NULL)
{
ply_renderer_close (state->renderer);
state->renderer = NULL;
}
+ ply_trace ("removing displays and keyboard");
+ remove_displays_and_keyboard (state);
+
if (state->session != NULL)
{
ply_trace ("detaching session");
ply_trace ("checking if splash screen should be disabled");
- state->console = ply_console_new ();
+ if (state->console == NULL)
+ state->console = ply_console_new ();
- if (!ply_console_open (state->console))
+ if (!ply_console_is_open (state->console) &&
+ !ply_console_open (state->console))
{
ply_trace ("could not open /dev/tty0");
ply_console_free (state->console);