summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/vl.c b/vl.c
index cfd2d3e822..29ab85c922 100644
--- a/vl.c
+++ b/vl.c
@@ -3523,7 +3523,6 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_full_screen:
full_screen = 1;
break;
-#ifdef CONFIG_SDL
case QEMU_OPTION_no_frame:
no_frame = 1;
break;
@@ -3536,14 +3535,11 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_no_quit:
no_quit = 1;
break;
+#ifdef CONFIG_SDL
case QEMU_OPTION_sdl:
display_type = DT_SDL;
break;
#else
- 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);
@@ -4084,6 +4080,15 @@ int main(int argc, char **argv, char **envp)
#endif
}
+ if ((no_frame || alt_grab || ctrl_grab) && display_type != DT_SDL) {
+ fprintf(stderr, "-no-frame, -alt-grab and -ctrl-grab are only valid "
+ "for SDL, ignoring option\n");
+ }
+ if (no_quit && (display_type != DT_GTK && display_type != DT_SDL)) {
+ fprintf(stderr, "-no-quit is only valid for GTK and SDL, "
+ "ignoring option\n");
+ }
+
#if defined(CONFIG_GTK)
if (display_type == DT_GTK) {
early_gtk_display_init();