cocoa: Make sure wait for button enable can't be infinite.
This commit is contained in:
parent
e939635f84
commit
3324453465
1 changed files with 1 additions and 1 deletions
|
@ -876,7 +876,7 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
|
|||
button = [nswindow standardWindowButton:NSWindowMiniaturizeButton];
|
||||
if (button) {
|
||||
int iterations = 0;
|
||||
while (![button isEnabled]) {
|
||||
while (![button isEnabled] && (iterations < 100)) {
|
||||
SDL_Delay(10);
|
||||
SDL_PumpEvents();
|
||||
iterations++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue