]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix HW RTG resolution changes not always updating window size correctly.
authorToni Wilen <twilen@winuae.net>
Sat, 27 Jan 2024 13:26:11 +0000 (15:26 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 27 Jan 2024 13:26:11 +0000 (15:26 +0200)
gfxboard.cpp
od-win32/win32gfx.cpp

index 8da3ddb91d57597aef31b8ada32a9de8e67bfaad..1773bc3a1e85e11ae30aaad4a99d4e37edcf055e 100644 (file)
@@ -1659,6 +1659,8 @@ void gfxboard_vsync_handler(bool full_redraw_required, bool redraw_required)
                                if (gfxboard_checkchanged(gb)) {
                                        if (!gfxboard_setmode_ext(gb)) {
                                                gfxboard_rtg_disable(gb->monitor_id, i);
+                                       } else {
+                                               state->ModeChanged = true;
                                        }
                                }
                        } else if (gb->resolutionchange > 1) {
index 6eaa6aeb5d04dcb5bdbf73d1435b5b5d27eea6c6..b496f397d6517c40671ce9abac37d94f93c1ecf6 100644 (file)
@@ -2966,7 +2966,7 @@ static int modeswitchneeded(struct AmigaMonitor *mon, struct winuae_currentmode
                }
        } else if (isfullscreen () == 0) {
                /* windowed to windowed */
-               return -1;
+               return -2;
        } else {
                /* fullwindow to fullwindow */
                if (mon->screen_is_picasso) {
@@ -3073,16 +3073,13 @@ void gfx_set_picasso_modeinfo(int monid, RGBFTYPE rgbfmt)
        if (!mon->screen_is_picasso)
                return;
        gfx_set_picasso_colors(monid, rgbfmt);
+       update_gfxparams(mon);
        updatemodes(mon);
        need = modeswitchneeded(mon, &mon->currentmode);
-       update_gfxparams(mon);
        if (need > 0) {
                open_screen(mon);
        } else if (need < 0) {
-               struct winuae_currentmode *wc = &mon->currentmode;
-               if (state->ModeChanged) {
-                       open_windows(mon, true, true);
-               }
+               open_windows(mon, true, true);
        }
        state->ModeChanged = false;
 #ifdef RETROPLATFORM