mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-31 00:09:19 +01:00
Implement SDL_CaptureMouse() for Mac OS X.
This commit is contained in:
parent
b7d2c0e9d6
commit
668025c239
@ -274,6 +274,14 @@ Cocoa_SetRelativeMouseMode(SDL_bool enabled)
|
|||||||
return 0;
|
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
|
void
|
||||||
Cocoa_InitMouse(_THIS)
|
Cocoa_InitMouse(_THIS)
|
||||||
{
|
{
|
||||||
@ -287,6 +295,7 @@ Cocoa_InitMouse(_THIS)
|
|||||||
mouse->FreeCursor = Cocoa_FreeCursor;
|
mouse->FreeCursor = Cocoa_FreeCursor;
|
||||||
mouse->WarpMouse = Cocoa_WarpMouse;
|
mouse->WarpMouse = Cocoa_WarpMouse;
|
||||||
mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
|
mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
|
||||||
|
mouse->CaptureMouse = Cocoa_CaptureMouse;
|
||||||
|
|
||||||
SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
|
SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user