Limit live-resize redraws to only happen during actual live-resize situations.

This commit is contained in:
Sasha Szpakowski
2025-06-22 17:01:40 -03:00
parent 0020317dc4
commit e7dd8c84ba
+2 -1
View File
@@ -98,7 +98,8 @@ static bool SDLCALL watchAppEvents(void *udata, SDL_Event *event)
}
break;
case SDL_EVENT_WINDOW_EXPOSED:
if (eventModule != nullptr && SDL_IsMainThread() && eventModule->allowModalDraws())
// Only redraw during live-resize events (data1 is 1 in that situation).
if (event->window.data1 == 1 && eventModule != nullptr && SDL_IsMainThread() && eventModule->allowModalDraws())
eventModule->modalDraw();
break;
default: