]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Don't reopen if mode is still same.
authorToni Wilen <twilen@winuae.net>
Sat, 19 Oct 2019 17:05:52 +0000 (20:05 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 19 Oct 2019 17:05:52 +0000 (20:05 +0300)
od-win32/win32gfx.cpp

index b464a3898a016adb26f8440d417f8483781f701b..f4131d749aa3ab46956f375b09b6ffee143891e9 100644 (file)
@@ -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);