GPU: Don't load the host's window-minimized bit from a savestate

skipDrawReason was saved whole, including the bit that says the host
window is minimized. A state saved while minimized (a rewind snapshot)
kept it set after loading in a normal window, and the other way round.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-19 20:54:29 +02:00
1 parent 130ea9ced9
commit ca0e40bb0a
1 file changed
+5
+5
View File
@@ -313,7 +313,12 @@ void GPUStateCache::DoState(PointerWrap &p) {
bool framebufChanged = false; // legacy
Do(p, framebufChanged);
// Minimized is about the host window now, whatever it was when the state was saved.
const u32 hostSkipDraw = skipDrawReason & SKIPDRAW_WINDOW_MINIMIZED;
Do(p, skipDrawReason);
if (p.mode == p.MODE_READ) {
skipDrawReason = (skipDrawReason & ~SKIPDRAW_WINDOW_MINIMIZED) | hostSkipDraw;
}
// Legacy, remove in the next bump.
UVScale uv{};