Skip to content
Permalink
Browse files

Implement SDL_CaptureMouse() for Mac OS X.

  • Loading branch information
icculus committed May 24, 2014
1 parent b7d2c0e commit 668025c23902ddf1c020c18172a34aec357c9bc4
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/video/cocoa/SDL_cocoamouse.m
@@ -274,6 +274,14 @@ + (NSCursor *)invisibleCursor
return 0;
}

static int
Cocoa_CaptureMouse(SDL_Window *window)
{
/* our Cocoa event code already tracks the mouse outside the window,
so all we have to do here is say "okay" and do what we always do. */
return 0;
}

void
Cocoa_InitMouse(_THIS)
{
@@ -287,6 +295,7 @@ + (NSCursor *)invisibleCursor
mouse->FreeCursor = Cocoa_FreeCursor;
mouse->WarpMouse = Cocoa_WarpMouse;
mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
mouse->CaptureMouse = Cocoa_CaptureMouse;

SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());

0 comments on commit 668025c

Please sign in to comment.