aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-10-25 17:21:17 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-07 14:04:25 +0400
commit484629fc8141eaa257f961b5e5e310a1bbd0f1a2 (patch)
treec73a3ddbc2cdd646834bbecbbaf45760f26bdfa9
parent6261164bd600422f1c557b5a1dea124a83181881 (diff)
downloadqemu-484629fc8141eaa257f961b5e5e310a1bbd0f1a2.zip
qemu-484629fc8141eaa257f961b5e5e310a1bbd0f1a2.tar.gz
qemu-484629fc8141eaa257f961b5e5e310a1bbd0f1a2.tar.bz2
vl: simplify display_remote logic
Bump the display_remote variable when the -vnc option is parsed, just like -spice. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--system/vl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/system/vl.c b/system/vl.c
index 19aef76..e981940 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1401,11 +1401,6 @@ static void qemu_create_default_devices(void)
#endif
}
-#if defined(CONFIG_VNC)
- if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
- display_remote++;
- }
-#endif
if (dpy.type == DISPLAY_TYPE_DEFAULT && !display_remote) {
if (!qemu_display_find_default(&dpy)) {
dpy.type = DISPLAY_TYPE_NONE;
@@ -3350,6 +3345,7 @@ void qemu_init(int argc, char **argv)
#ifdef CONFIG_VNC
case QEMU_OPTION_vnc:
vnc_parse(optarg);
+ display_remote++;
break;
#endif
case QEMU_OPTION_no_acpi: