From 63c2118c05b0292df3cd6adff3ff398df7e5490f Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 27 Jan 2024 15:26:11 +0200 Subject: [PATCH] Fix HW RTG resolution changes not always updating window size correctly. --- gfxboard.cpp | 2 ++ od-win32/win32gfx.cpp | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gfxboard.cpp b/gfxboard.cpp index 8da3ddb9..1773bc3a 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -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) { diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 6eaa6aeb..b496f397 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -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 -- 2.47.3