[ion/simulator] Relayout on any windows event

We might be relayouting a bit too often, but better safe than sorry!
Jokes aside, most SDL_WINDOWEVENT should trigger a relayout, and in
general those events aren't triggered on a regular basis anyway.
This commit is contained in:
Romain Goyet
2020-06-25 22:34:31 -04:00
committed by EmilieNumworks
parent 85a10ab084
commit 585bf65294

View File

@@ -175,9 +175,8 @@ Event getPlatformEvent() {
while (SDL_PollEvent(&event)) {
// The while is important: it'll do a fast-pass over all useless SDL events
if (event.type == SDL_WINDOWEVENT) {
if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
Ion::Simulator::Main::relayout();
}
Ion::Simulator::Main::relayout();
break;
}
if (event.type == SDL_QUIT) {
result = Termination;