Fixed display being lost when window is resized

This commit is contained in:
Andrew Alderwick 2021-08-08 20:47:01 +01:00
parent c66260982f
commit 7d8600c679
1 changed files with 2 additions and 0 deletions

View File

@ -455,6 +455,8 @@ run(Uxn *u)
case SDL_WINDOWEVENT: case SDL_WINDOWEVENT:
if(event.window.event == SDL_WINDOWEVENT_EXPOSED) if(event.window.event == SDL_WINDOWEVENT_EXPOSED)
redraw(u); redraw(u);
else if(event.window.event == SDL_WINDOWEVENT_RESIZED)
winSurface = SDL_GetWindowSurface(gWindow);
break; break;
default: default:
if(event.type == stdin_event) { if(event.type == stdin_event) {