From 0c078a1421596cbe60a1d7b555d0e3f78c9c9d11 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 19 Oct 2019 20:05:52 +0300 Subject: [PATCH] Don't reopen if mode is still same. --- od-win32/win32gfx.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index b464a389..f4131d74 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -3174,7 +3174,12 @@ void gfx_set_picasso_modeinfo(int monid, RGBFTYPE rgbfmt) if (need > 0) { open_screen(mon); } else if (need < 0) { - open_windows(mon, true, true); + struct picasso96_state_struct *state = &picasso96_state[mon->monitor_id]; + struct winuae_currentmode *wc = &mon->currentmode; + if (state->Width != wc->current_width || + state->Height != wc->current_height || + state->BytesPerPixel * 8 != wc->current_depth) + open_windows(mon, true, true); } #ifdef RETROPLATFORM rp_set_hwnd(mon->hAmigaWnd); -- 2.47.3