Explorar o código

cocoa: Make sure wait for button enable can't be infinite.

Ryan C. Gordon %!s(int64=6) %!d(string=hai) anos
pai
achega
094655cff9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/video/cocoa/SDL_cocoawindow.m

+ 1 - 1
src/video/cocoa/SDL_cocoawindow.m

@@ -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++;