summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-02-02 12:10:15 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-02-20 12:12:04 +0100
commitfe91f36aa5bd846cea816cf0a9b7a13dd76559c1 (patch)
tree73447036af280ec228a6ba06367332a59d28c762 /vl.c
parent0c8d7065325d84cb2521c0b52f383561d2541415 (diff)
downloadqemu-fe91f36aa5bd846cea816cf0a9b7a13dd76559c1.tar.gz
sdl: use DisplayOptions
Switch sdl ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-6-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index a82b7cf16f..61b72758a8 100644
--- a/vl.c
+++ b/vl.c
@@ -2101,6 +2101,7 @@ static LegacyDisplayType select_display(const char *p)
if (strstart(p, "sdl", &opts)) {
#ifdef CONFIG_SDL
display = DT_SDL;
+ dpy.type = DISPLAY_TYPE_SDL;
while (*opts) {
const char *nextopt;
@@ -2135,19 +2136,25 @@ static LegacyDisplayType select_display(const char *p)
}
} else if (strstart(opts, ",window_close=", &nextopt)) {
opts = nextopt;
+ dpy.has_window_close = true;
if (strstart(opts, "on", &nextopt)) {
no_quit = 0;
+ dpy.window_close = true;
} else if (strstart(opts, "off", &nextopt)) {
no_quit = 1;
+ dpy.window_close = false;
} else {
goto invalid_sdl_args;
}
} else if (strstart(opts, ",gl=", &nextopt)) {
opts = nextopt;
+ dpy.has_gl = true;
if (strstart(opts, "on", &nextopt)) {
request_opengl = 1;
+ dpy.gl = true;
} else if (strstart(opts, "off", &nextopt)) {
request_opengl = 0;
+ dpy.gl = false;
} else {
goto invalid_sdl_args;
}
@@ -3668,6 +3675,7 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_sdl:
#ifdef CONFIG_SDL
display_type = DT_SDL;
+ dpy.type = DISPLAY_TYPE_SDL;
break;
#else
error_report("SDL support is disabled");
@@ -4334,6 +4342,7 @@ int main(int argc, char **argv, char **envp)
dpy.type = DISPLAY_TYPE_GTK;
#elif defined(CONFIG_SDL)
display_type = DT_SDL;
+ dpy.type = DISPLAY_TYPE_SDL;
#elif defined(CONFIG_COCOA)
display_type = DT_COCOA;
#elif defined(CONFIG_VNC)
@@ -4358,7 +4367,7 @@ int main(int argc, char **argv, char **envp)
}
if (display_type == DT_SDL) {
- sdl_display_early_init(request_opengl);
+ sdl_display_early_init(&dpy);
}
qemu_console_early_init();
@@ -4693,7 +4702,7 @@ int main(int argc, char **argv, char **envp)
curses_display_init(ds, full_screen);
break;
case DT_SDL:
- sdl_display_init(ds, full_screen);
+ sdl_display_init(ds, &dpy);
break;
case DT_COCOA:
cocoa_display_init(ds, full_screen);