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
1 changed files with 5 additions and 0 deletions

View File

@ -1278,6 +1278,11 @@ void _GNW95_process_message()
case SDL_WINDOWEVENT_EXPOSED: case SDL_WINDOWEVENT_EXPOSED:
windowRefreshAll(&_scr_size); windowRefreshAll(&_scr_size);
break; 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: case SDL_WINDOWEVENT_FOCUS_GAINED:
gProgramIsActive = true; gProgramIsActive = true;
windowRefreshAll(&_scr_size); windowRefreshAll(&_scr_size);