diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-06-10 23:25:04 +0200 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-06-10 23:30:03 +0200 |
commit | d2d908bb427f7b7e5940f84eae761c1170817c16 (patch) | |
tree | 47b6117dd7395f5abfb29f8635861ca2d284bca8 /vl.c | |
parent | c7c223fc0843bc3342935f14a2d893206b89c92d (diff) | |
download | qemu-d2d908bb427f7b7e5940f84eae761c1170817c16.tar.gz |
Unbreak -no-quit for GTK when SDL is disabled
When QEMU is built without SDL support, -no-quit would print an error message
that SDL is disabled. Since GTK also supports -no-quit, enable the option when
GTK or SDL is enabled at compile time.
While at it, do not create the no_quit variable when it is not used.
Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -202,7 +202,9 @@ static int full_screen = 0; #ifdef CONFIG_SDL static int no_frame = 0; #endif +#if defined(CONFIG_SDL) || defined(CONFIG_GTK) int no_quit = 0; +#endif CharDriverState *serial_hds[MAX_SERIAL_PORTS]; CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES]; @@ -3523,6 +3525,13 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_full_screen: full_screen = 1; break; + case QEMU_OPTION_no_quit: +#if defined(CONFIG_SDL) || defined(CONFIG_GTK) + no_quit = 1; +#else + fprintf(stderr, "SDL and GTK support are disabled\n"); +#endif + break; #ifdef CONFIG_SDL case QEMU_OPTION_no_frame: no_frame = 1; @@ -3533,9 +3542,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_ctrl_grab: ctrl_grab = 1; break; - case QEMU_OPTION_no_quit: - no_quit = 1; - break; case QEMU_OPTION_sdl: display_type = DT_SDL; break; @@ -3543,7 +3549,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_no_frame: case QEMU_OPTION_alt_grab: case QEMU_OPTION_ctrl_grab: - case QEMU_OPTION_no_quit: case QEMU_OPTION_sdl: fprintf(stderr, "SDL support is disabled\n"); exit(1); |