summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorGerd Hoffmann2020-01-31 12:35:21 +0100
committerGerd Hoffmann2020-02-12 13:25:17 +0100
commit86a088e62454995c04a794d43661a549fd293f3b (patch)
treea2f43fb7585c987ed54b5a14603841de5e22e473 /vl.c
parentui: wire up legacy -show-cursor option (diff)
downloadqemu-86a088e62454995c04a794d43661a549fd293f3b.tar.gz
qemu-86a088e62454995c04a794d43661a549fd293f3b.tar.xz
qemu-86a088e62454995c04a794d43661a549fd293f3b.zip
ui/sdl: switch to new show-cursor option
Use DisplayOpts settings instead of cursor_hide global variable. Also make "-display sdl,show-cursor=on" work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 5419b3d682..0a13cf2b17 100644
--- a/vl.c
+++ b/vl.c
@@ -1931,6 +1931,16 @@ static void parse_display(const char *p)
} else {
goto invalid_sdl_args;
}
+ } else if (strstart(opts, ",show-cursor=", &nextopt)) {
+ opts = nextopt;
+ dpy.has_show_cursor = true;
+ if (strstart(opts, "on", &nextopt)) {
+ dpy.show_cursor = true;
+ } else if (strstart(opts, "off", &nextopt)) {
+ dpy.show_cursor = false;
+ } else {
+ goto invalid_sdl_args;
+ }
} else if (strstart(opts, ",gl=", &nextopt)) {
opts = nextopt;
dpy.has_gl = true;