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:
parent
eee04c4ad2
commit
182c911977
1 changed files with 3 additions and 1 deletions
|
@ -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(...)
|
||||
|
|
Loading…
Add table
Reference in a new issue