From: Ray Strode Date: Wed, 4 Jun 2008 20:36:56 +0000 (-0400) Subject: Adapt boot splash test program to take a vt to switch to X-Git-Tag: 0.2.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ab3f42dd7ae04510c4cadf8fadcfd22275bfee1;p=thirdparty%2Fplymouth.git Adapt boot splash test program to take a vt to switch to --- diff --git a/src/ply-boot-splash.c b/src/ply-boot-splash.c index a4dbf142..8ccaf6c4 100644 --- a/src/ply-boot-splash.c +++ b/src/ply-boot-splash.c @@ -329,7 +329,7 @@ main (int argc, else module_name = "../splash-plugins/fade-in/.libs/fade-in.so"; - state.window = ply_window_new (0); + state.window = ply_window_new (argc > 2? atoi (argv[2]) : 0); if (!ply_window_open (state.window)) { @@ -337,6 +337,12 @@ main (int argc, return errno; } + if (!ply_window_take_console (state.window)) + { + perror ("could not switch console to window vt"); + return errno; + } + ply_window_attach_to_event_loop (state.window, state.loop); ply_window_set_escape_handler (state.window, (ply_window_escape_handler_t) on_quit, &state);