Parcourir la source

Flip this around to do the simpler condition first.

Ryan C. Gordon il y a 11 ans
Parent
commit
ded970f70f
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/video/cocoa/SDL_cocoawindow.m

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

@@ -745,8 +745,8 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
     x = (int)point.x;
     y = (int)(window->h - point.y);
 
-    if (x < 0 || x >= window->w || y < 0 || y >= window->h) {
-        if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
+    if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
+        if (x < 0 || x >= window->w || y < 0 || y >= window->h) {
             if (x < 0) {
                 x = 0;
             } else if (x >= window->w) {