src/video/cocoa/SDL_cocoamouse.m
changeset 8928 f60f16d29e37
parent 8263 e22c4959e385
child 8951 692ba71b9c04
equal deleted inserted replaced
8927:be64f5daf64b 8928:f60f16d29e37
   272         return SDL_SetError("CGAssociateMouseAndMouseCursorPosition() failed");
   272         return SDL_SetError("CGAssociateMouseAndMouseCursorPosition() failed");
   273     }
   273     }
   274     return 0;
   274     return 0;
   275 }
   275 }
   276 
   276 
       
   277 static int
       
   278 Cocoa_CaptureMouse(SDL_Window *window)
       
   279 {
       
   280     /* our Cocoa event code already tracks the mouse outside the window,
       
   281         so all we have to do here is say "okay" and do what we always do. */
       
   282     return 0;
       
   283 }
       
   284 
   277 void
   285 void
   278 Cocoa_InitMouse(_THIS)
   286 Cocoa_InitMouse(_THIS)
   279 {
   287 {
   280     SDL_Mouse *mouse = SDL_GetMouse();
   288     SDL_Mouse *mouse = SDL_GetMouse();
   281 
   289 
   285     mouse->CreateSystemCursor = Cocoa_CreateSystemCursor;
   293     mouse->CreateSystemCursor = Cocoa_CreateSystemCursor;
   286     mouse->ShowCursor = Cocoa_ShowCursor;
   294     mouse->ShowCursor = Cocoa_ShowCursor;
   287     mouse->FreeCursor = Cocoa_FreeCursor;
   295     mouse->FreeCursor = Cocoa_FreeCursor;
   288     mouse->WarpMouse = Cocoa_WarpMouse;
   296     mouse->WarpMouse = Cocoa_WarpMouse;
   289     mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
   297     mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
       
   298     mouse->CaptureMouse = Cocoa_CaptureMouse;
   290 
   299 
   291     SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
   300     SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
   292 
   301 
   293     Cocoa_InitMouseEventTap(mouse->driverdata);
   302     Cocoa_InitMouseEventTap(mouse->driverdata);
   294 
   303