Remove the 10ms delay before closing a window

This delay is to stop the loop running continously, it isn't necessary to do
that when we're about to exit the loop anyway. I'm unsure whether this makes
any noticeable difference, but it seems reasonable to remove delays when
possible.
This commit is contained in:
Steve Cotton 2021-07-03 09:50:11 +02:00 committed by Steve Cotton
parent eee04c4ad2
commit 182c911977

View file

@ -559,7 +559,9 @@ int window::show(const bool restore, const unsigned auto_close_timeout)
}
// Add a delay so we don't keep spinning if there's no event.
SDL_Delay(10);
if(status_ != status::CLOSED) {
SDL_Delay(10);
}
}
}
catch(...)