error_handler: unify stack walking logic
[sdk/emulator/qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index e85078a..cf0f23b 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2261,6 +2261,9 @@ static DisplayType select_display(const char *p)
                 }
                 set_display_pixel_density(dpi);
                 nextopt = endptr;
+            } else if (strstart(opts, ",forcelegacy", &nextopt)) {
+                opts = nextopt;
+                maru_qt5_set_force_legacy(true);
             } else {
             invalid_maru_qt_args:
                 error_report(FAILED_TO_DISPLAY_PARSING);
@@ -4847,5 +4850,16 @@ int main(int argc, char **argv, char **envp)
     monitor_cleanup();
     qemu_chr_cleanup();
 
+#if defined(CONFIG_MARU) && defined(CONFIG_QT)
+    switch (display_type) {
+    case DT_MARU_QT_ONSCREEN:
+    case DT_MARU_QT_OFFSCREEN:
+        maru_qt5_display_fini();
+        break;
+    default:
+        break;
+    }
+#endif
+
     return 0;
 }