Skip to content

Commit

Permalink
Implement SDL_CaptureMouse() for Mac OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 24, 2014
1 parent b7d2c0e commit 668025c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/video/cocoa/SDL_cocoamouse.m
Expand Up @@ -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)
{
Expand All @@ -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());

Expand Down

0 comments on commit 668025c

Please sign in to comment.