From: Toni Wilen Date: Thu, 21 Sep 2023 17:28:34 +0000 (+0300) Subject: Do not detect monitor as changed if monitor is not attached to any graphics board. X-Git-Tag: 5.1.0~99 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b41c238b931ac7c03bad91eeb31096dd649cb840;p=francis%2Fwinuae.git Do not detect monitor as changed if monitor is not attached to any graphics board. --- diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 33d5a381..9526a9cc 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -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];