Flip this around to do the simpler condition first.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 24 May 2014 18:23:56 -0400
changeset 8929 7b459b49fa92
parent 8928 f60f16d29e37
child 8930 d000e6339d41
Flip this around to do the simpler condition first.
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Sat May 24 18:23:39 2014 -0400
+++ b/src/video/cocoa/SDL_cocoawindow.m	Sat May 24 18:23:56 2014 -0400
@@ -745,8 +745,8 @@
     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) {