Mac: Hide cursor in relative mode.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Tue, 04 Jun 2013 13:53:55 -0700
changeset 7270 76df5476a6ce
parent 7269 f7a0cc4bf74d
child 7271 963d2ba35cfe
Mac: Hide cursor in relative mode. This hides the cursor when you SDL_SetRelativeMouseMode, as intended. Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1860
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Tue Jun 04 13:47:51 2013 -0700
+++ b/src/video/cocoa/SDL_cocoawindow.m	Tue Jun 04 13:53:55 2013 -0700
@@ -538,7 +538,7 @@
     [super resetCursorRects];
     SDL_Mouse *mouse = SDL_GetMouse();
 
-    if (mouse->cursor_shown && mouse->cur_cursor) {
+    if (mouse->cursor_shown && mouse->cur_cursor && !mouse->relative_mode) {
         [self addCursorRect:[self bounds]
                      cursor:mouse->cur_cursor->driverdata];
     } else {