src/video/quartz/SDL_QuartzEvents.m
changeset 816 428f688f2ad2
parent 782 dbc5905402b0
child 897 9e27fdb98eab
equal deleted inserted replaced
815:6176f9a0d61a 816:428f688f2ad2
   264     const int mapping[] = { SDLK_CAPSLOCK, SDLK_LSHIFT, SDLK_LCTRL, SDLK_LALT, SDLK_LMETA };
   264     const int mapping[] = { SDLK_CAPSLOCK, SDLK_LSHIFT, SDLK_LCTRL, SDLK_LALT, SDLK_LMETA };
   265 
   265 
   266     int i;
   266     int i;
   267     int bit;
   267     int bit;
   268     SDL_keysym key;
   268     SDL_keysym key;
       
   269     
       
   270     if (current_mods == newMods)
       
   271     	return;
   269 
   272 
   270     key.scancode    = 0;
   273     key.scancode    = 0;
   271     key.sym         = SDLK_UNKNOWN;
   274     key.sym         = SDLK_UNKNOWN;
   272     key.unicode     = 0;
   275     key.unicode     = 0;
   273     key.mod         = KMOD_NONE;
   276     key.mod         = KMOD_NONE;
   460             } while(0)
   463             } while(0)
   461             
   464             
   462             type = [ event type ];
   465             type = [ event type ];
   463             isInGameWin = QZ_IsMouseInWindow (this);
   466             isInGameWin = QZ_IsMouseInWindow (this);
   464 
   467 
       
   468             QZ_DoModifiers(this, [ event modifierFlags ] );
       
   469 
   465             switch (type) {
   470             switch (type) {
   466                 case NSLeftMouseDown:
   471                 case NSLeftMouseDown:
   467                     if ( getenv("SDL_HAS3BUTTONMOUSE") ) {
   472                     if ( getenv("SDL_HAS3BUTTONMOUSE") ) {
   468                         DO_MOUSE_DOWN (SDL_BUTTON_LEFT);
   473                         DO_MOUSE_DOWN (SDL_BUTTON_LEFT);
   469                     } else {
   474                     } else {
   611                     break;
   616                     break;
   612                 case NSKeyDown:
   617                 case NSKeyDown:
   613                     QZ_DoKey (this, SDL_PRESSED, event);
   618                     QZ_DoKey (this, SDL_PRESSED, event);
   614                     break;
   619                     break;
   615                 case NSFlagsChanged:
   620                 case NSFlagsChanged:
   616                     QZ_DoModifiers(this, [ event modifierFlags ] );
       
   617                     break;
   621                     break;
   618                 case NSAppKitDefined:
   622                 case NSAppKitDefined:
   619                     switch ( [ event subtype ] ) {
   623                     switch ( [ event subtype ] ) {
   620                         case NSApplicationActivatedEventType:
   624                         case NSApplicationActivatedEventType:
   621                             QZ_DoActivate (this);
   625                             QZ_DoActivate (this);