sdl: handle SDL_WINDOWEVENT_EXPOSED event to fix redrawing issue

This commit is contained in:
roytam1 2024-07-29 23:09:31 +08:00
parent e5510dd9ae
commit 83afae5625

View File

@ -97,6 +97,9 @@ void Display::handle_events(const WindowEvent& wnd_event) {
if (wnd_event.sub_type == SDL_WINDOWEVENT_SIZE_CHANGED &&
wnd_event.window_id == impl->disp_wnd_id)
impl->resizing = false;
if (wnd_event.sub_type == SDL_WINDOWEVENT_EXPOSED &&
wnd_event.window_id == impl->disp_wnd_id)
SDL_RenderPresent(impl->renderer);
}
void Display::blank() {