Skip to content

Commit

Permalink
cocoa: Make sure wait for button enable can't be infinite.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 23, 2020
1 parent 7231651 commit 094655c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -876,7 +876,7 @@ when returning to windowed mode from a space (instead of using a pending
button = [nswindow standardWindowButton:NSWindowMiniaturizeButton];
if (button) {
int iterations = 0;
while (![button isEnabled]) {
while (![button isEnabled] && (iterations < 100)) {
SDL_Delay(10);
SDL_PumpEvents();
iterations++;
Expand Down

0 comments on commit 094655c

Please sign in to comment.