Fix window surface cache

Closes #1
This commit is contained in:
Alexander Batalov 2022-05-24 00:18:41 +03:00
parent 2d54e41fdb
commit 21101ef355

View File

@ -1278,6 +1278,11 @@ void _GNW95_process_message()
case SDL_WINDOWEVENT_EXPOSED:
windowRefreshAll(&_scr_size);
break;
case SDL_WINDOWEVENT_SIZE_CHANGED:
// TODO: Recreate gSdlSurface in case size really changed (i.e.
// not alt-tabbing in fullscreen mode).
gSdlWindowSurface = SDL_GetWindowSurface(gSdlWindow);
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
gProgramIsActive = true;
windowRefreshAll(&_scr_size);