|
@@ -373,12 +373,12 @@ bool Cocoa_InitMouse(SDL_VideoDevice *_this)
|
|
{
|
|
{
|
|
NSPoint location;
|
|
NSPoint location;
|
|
SDL_Mouse *mouse = SDL_GetMouse();
|
|
SDL_Mouse *mouse = SDL_GetMouse();
|
|
- SDL_MouseData *internal = (SDL_MouseData *)SDL_calloc(1, sizeof(SDL_MouseData));
|
|
|
|
- if (internal == NULL) {
|
|
|
|
|
|
+ SDL_MouseData *data = (SDL_MouseData *)SDL_calloc(1, sizeof(SDL_MouseData));
|
|
|
|
+ if (data == NULL) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- mouse->internal = internal;
|
|
|
|
|
|
+ mouse->internal = data;
|
|
mouse->CreateCursor = Cocoa_CreateCursor;
|
|
mouse->CreateCursor = Cocoa_CreateCursor;
|
|
mouse->CreateSystemCursor = Cocoa_CreateSystemCursor;
|
|
mouse->CreateSystemCursor = Cocoa_CreateSystemCursor;
|
|
mouse->ShowCursor = Cocoa_ShowCursor;
|
|
mouse->ShowCursor = Cocoa_ShowCursor;
|
|
@@ -585,13 +585,6 @@ void Cocoa_HandleMouseWarp(CGFloat x, CGFloat y)
|
|
|
|
|
|
void Cocoa_QuitMouse(SDL_VideoDevice *_this)
|
|
void Cocoa_QuitMouse(SDL_VideoDevice *_this)
|
|
{
|
|
{
|
|
- SDL_Mouse *mouse = SDL_GetMouse();
|
|
|
|
- if (mouse) {
|
|
|
|
- if (mouse->internal) {
|
|
|
|
- SDL_free(mouse->internal);
|
|
|
|
- mouse->internal = NULL;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#endif // SDL_VIDEO_DRIVER_COCOA
|
|
#endif // SDL_VIDEO_DRIVER_COCOA
|