Diff for /np2/macosx/np2.cpp between versions 1.46 and 1.47

version 1.46, 2004/01/05 07:22:02 version 1.47, 2004/01/11 16:58:47
Line 973  static pascal OSStatus np2appevent (Even Line 973  static pascal OSStatus np2appevent (Even
                 }                  }
 #endif  #endif
                 break;                  break;
                   case kEventClassKeyboard:
                   if (GetEventKind(event)==kEventRawKeyModifiersChanged) {
                                           static UInt32 backup = 0;
                       if (modif & shiftKey) keystat_senddata(0x70);
                       else keystat_senddata(0x70 | 0x80);
                       if (modif & optionKey) keystat_senddata(0x73);
                       else keystat_senddata(0x73 | 0x80);
                       if (modif & controlKey) keystat_senddata(0x74);
                       else keystat_senddata(0x74 | 0x80);
                       if ((modif & alphaLock) != (backup & alphaLock)) {
                           keystat_senddata(0x71);
                           backup = modif;
                       }
                       result = noErr;
                                   }
                                   break;
         default:          default:
             break;               break; 
     }      }
Line 994  static pascal OSStatus np2windowevent(Ev Line 1010  static pascal OSStatus np2windowevent(Ev
     eventClass = GetEventClass(event);      eventClass = GetEventClass(event);
     whatHappened = GetEventKind(event);      whatHappened = GetEventKind(event);
                   
     static UInt32 backup = 0;  
     switch (eventClass)      switch (eventClass)
     {              {        
         case kEventClassKeyboard:          case kEventClassKeyboard:
Line 1025  static pascal OSStatus np2windowevent(Ev Line 1040  static pascal OSStatus np2windowevent(Ev
                     }                      }
                     result = noErr;                      result = noErr;
                     break;                      break;
                 case kEventRawKeyModifiersChanged:  
                     if (modif & shiftKey) keystat_senddata(0x70);  
                     else keystat_senddata(0x70 | 0x80);  
                     if (modif & optionKey) keystat_senddata(0x73);  
                     else keystat_senddata(0x73 | 0x80);  
                     if (modif & controlKey) keystat_senddata(0x74);  
                     else keystat_senddata(0x74 | 0x80);  
                     if ((modif & alphaLock) != (backup & alphaLock)) {  
                         keystat_senddata(0x71);  
                         backup = modif;  
                     }  
                     result = noErr;  
                     break;  
                 default:                   default: 
                     break;                                   break;             
             }              }
Line 1084  static const EventTypeSpec appEventList[ Line 1086  static const EventTypeSpec appEventList[
                                 {kEventClassMouse,              kEventMouseMoved},                                  {kEventClassMouse,              kEventMouseMoved},
                                 {kEventClassMouse,              kEventMouseUp},                                  {kEventClassMouse,              kEventMouseUp},
 #endif  #endif
                                   {kEventClassKeyboard,   kEventRawKeyModifiersChanged},
                         };                          };
   
 static const EventTypeSpec windEventList[] = {  static const EventTypeSpec windEventList[] = {
Line 1096  static const EventTypeSpec windEventList Line 1099  static const EventTypeSpec windEventList
                                 {kEventClassKeyboard,   kEventRawKeyDown},                                  {kEventClassKeyboard,   kEventRawKeyDown},
                                 {kEventClassKeyboard,   kEventRawKeyUp},                                  {kEventClassKeyboard,   kEventRawKeyUp},
                                 {kEventClassKeyboard,   kEventRawKeyRepeat},                                  {kEventClassKeyboard,   kEventRawKeyRepeat},
                                 {kEventClassKeyboard,   kEventRawKeyModifiersChanged},  
                         };                          };
   
   
Line 1147  static bool setupMainWindow(void) { Line 1149  static bool setupMainWindow(void) {
     setUpCarbonEvent();      setUpCarbonEvent();
     if (backupwidth) scrnmng_setwidth(0, backupwidth);      if (backupwidth) scrnmng_setwidth(0, backupwidth);
     if (backupheight) scrnmng_setheight(0, backupheight);      if (backupheight) scrnmng_setheight(0, backupheight);
     SetWindowTitleWithCFString(hWndMain, CFStringCreateWithCString(NULL, np2oscfg.titles, kCFStringEncodingUTF8));          CFStringRef title = CFStringCreateWithCString(NULL, np2oscfg.titles, kCFStringEncodingUTF8);
           if (title) {
                   SetWindowTitleWithCFString(hWndMain, title);
                   CFRelease(title);
           }
         ShowWindow(hWndMain);          ShowWindow(hWndMain);
     return(true);      return(true);
 }  }

Removed from v.1.46  
changed lines
  Added in v.1.47


RetroPC.NET-CVS <cvs@retropc.net>