]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not detect monitor as changed if monitor is not attached to any graphics board.
authorToni Wilen <twilen@winuae.net>
Thu, 21 Sep 2023 17:28:34 +0000 (20:28 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 21 Sep 2023 17:28:34 +0000 (20:28 +0300)
od-win32/win32gfx.cpp

index 33d5a3819579d7a4ecacb2e40b79dd86eba1df0e..9526a9cc542821d942575b106c8601e3b11edb40 100644 (file)
@@ -2136,8 +2136,24 @@ int check_prefs_changed_gfx(void)
                c2 |= ((currprefs.gfx_monitor[i].gfx_size_win.width + 7) & ~7) != ((changed_prefs.gfx_monitor[i].gfx_size_win.width + 7) & ~7) ? 16 : 0;
                c2 |= currprefs.gfx_monitor[i].gfx_size_win.height != changed_prefs.gfx_monitor[i].gfx_size_win.height ? 16 : 0;
                if (c2) {
-                       c |= c2;
-                       monitors[i] = true;
+                       if (i > 0) {
+                               for (int j = 0; j < MAX_AMIGAMONITORS; j++) {
+                                       struct rtgboardconfig *rbc = &changed_prefs.rtgboards[j];
+                                       if (rbc->monitor_id == i) {
+                                               c |= c2;
+                                               monitors[i] = true;
+                                       }
+                               }
+                               if (!monitors[i]) {
+                                       currprefs.gfx_monitor[i].gfx_size_fs.width = changed_prefs.gfx_monitor[i].gfx_size_fs.width;
+                                       currprefs.gfx_monitor[i].gfx_size_fs.height = changed_prefs.gfx_monitor[i].gfx_size_fs.height;
+                                       currprefs.gfx_monitor[i].gfx_size_win.width = changed_prefs.gfx_monitor[i].gfx_size_win.width;
+                                       currprefs.gfx_monitor[i].gfx_size_win.height = changed_prefs.gfx_monitor[i].gfx_size_win.height;
+                               }
+                       } else {
+                               c |= c2;
+                               monitors[i] = true;
+                       }
                }
                if (WIN32GFX_IsPicassoScreen(&AMonitors[i])) {
                        struct gfx_filterdata *gfc = &changed_prefs.gf[1];