src/video/cocoa/SDL_cocoamouse.m
changeset 6301 e8a69c5378e7
parent 6138 4c64952a58fb
child 6676 4ff261ffaa42
equal deleted inserted replaced
6300:82f95e6af4cd 6301:e8a69c5378e7
    90 static int
    90 static int
    91 Cocoa_ShowCursor(SDL_Cursor * cursor)
    91 Cocoa_ShowCursor(SDL_Cursor * cursor)
    92 {
    92 {
    93     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    93     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    94 
    94 
    95     if (SDL_GetMouseFocus()) {
    95     if (cursor) {
    96         if (cursor) {
    96         NSCursor *nscursor = (NSCursor *)cursor->driverdata;
    97             NSCursor *nscursor = (NSCursor *)cursor->driverdata;
       
    98 
    97 
    99             [nscursor set];
    98         [nscursor set];
   100             [NSCursor unhide];
    99         [NSCursor unhide];
   101         } else {
   100     } else {
   102             [NSCursor hide];
   101         [NSCursor hide];
   103         }
       
   104     }
   102     }
   105 
   103 
   106     [pool release];
   104     [pool release];
   107 
   105 
   108     return 0;
   106     return 0;