Diff for /np2/macosx/np2.cpp between versions 1.34 and 1.35

version 1.34, 2003/11/11 16:33:50 version 1.35, 2003/11/12 19:06:33
Line 53 Line 53
 static  UINT            framecnt = 0;  static  UINT            framecnt = 0;
 static  UINT            waitcnt = 0;  static  UINT            waitcnt = 0;
 static  UINT            framemax = 1;  static  UINT            framemax = 1;
         BYTE            scrnmode;          BYTE            scrnmode = 0;
   
   
 #define DRAG_THRESHOLD          5  #define DRAG_THRESHOLD          5
Line 694  int main(int argc, char *argv[]) { Line 694  int main(int argc, char *argv[]) {
         AppendMenuItemTextWithCFString(GetMenuRef(IDM_OTHER), CFCopyLocalizedString(CFSTR("i286 save"),"i286"), kMenuItemAttrIconDisabled, NULL,NULL);          AppendMenuItemTextWithCFString(GetMenuRef(IDM_OTHER), CFCopyLocalizedString(CFSTR("i286 save"),"i286"), kMenuItemAttrIconDisabled, NULL,NULL);
     }      }
   
         scrnmode = 0;          scrnmng_initialize();
         if (scrnmng_create(scrnmode) != SUCCESS) {          if (scrnmng_create(scrnmode) != SUCCESS) {
                 TRACETERM();                  TRACETERM();
                 macossub_term();                  macossub_term();
Line 882  static pascal OSStatus np2appevent (Even Line 882  static pascal OSStatus np2appevent (Even
                     long start, fin;                      long start, fin;
                     const char  urlStr[] = "http://retropc.net/tk800/np2x/help.html";                      const char  urlStr[] = "http://retropc.net/tk800/np2x/help.html";
   
                     ICStart(&inst, '????');                      ICStart(&inst, 'SMil');
                     start = 0;                      start = 0;
                     fin = strlen(urlStr);                      fin = strlen(urlStr);
                     ICLaunchURL(inst, "\p", urlStr, strlen(urlStr), &start, &fin);                      ICLaunchURL(inst, "\p", urlStr, strlen(urlStr), &start, &fin);
Line 1072  static void setUpCarbonEvent(void) { Line 1072  static void setUpCarbonEvent(void) {
                                                                 windEventList, 0, NULL);                                                                  windEventList, 0, NULL);
 }  }
   
   static short    backupwidth=0, backupheight=0;
   
 static bool setupMainWindow(void) {  static bool setupMainWindow(void) {
 #if defined(NP2GCC)  #if defined(NP2GCC)
     OSStatus    err;      OSStatus    err;
Line 1100  static bool setupMainWindow(void) { Line 1102  static bool setupMainWindow(void) {
         }          }
         SizeWindow(hWndMain, 640, 400, TRUE);          SizeWindow(hWndMain, 640, 400, TRUE);
 #endif  #endif
         scrnmng_initialize();  
     setUpCarbonEvent();      setUpCarbonEvent();
       if (backupwidth) scrnmng_setwidth(0, backupwidth);
       if (backupheight) scrnmng_setheight(0, backupheight);
         ShowWindow(hWndMain);          ShowWindow(hWndMain);
     return(true);      return(true);
 }  }
Line 1109  static bool setupMainWindow(void) { Line 1113  static bool setupMainWindow(void) {
 static void toggleFullscreen(void) {  static void toggleFullscreen(void) {
     static Ptr  bkfullscreen;      static Ptr  bkfullscreen;
     static BYTE mouse = 0;      static BYTE mouse = 0;
       MenuRef     menu = GetMenuRef(IDM_SCREEN);
       Rect        bounds;
       short       w = 640, h = 480;
   
     soundmng_stop();      soundmng_stop();
     if (!scrnmode & SCRNMODE_FULLSCREEN) {      if (!(scrnmode & SCRNMODE_FULLSCREEN)) {
         RGBColor col = {0, 0, 0};          HandleMenuChoice(IDM_ROLNORMAL);
         short   w=640, h=480;          GetWindowBounds(hWndMain, kWindowContentRgn, &bounds);
           backupwidth = bounds.right - bounds.left;
           backupheight = bounds.bottom - bounds.top;
           toolwin_close();
         DisposeWindow(hWndMain);          DisposeWindow(hWndMain);
         BeginFullScreen(&bkfullscreen,0,&w,&h,&hWndMain,&col,(fullScreenAllowEvents | fullScreenDontChangeMenuBar));              BeginFullScreen(&bkfullscreen,0,&w,&h,&hWndMain,NULL,(fullScreenAllowEvents | fullScreenDontChangeMenuBar));    
           DisableMenuItem(menu, IDM_ROLNORMAL);
           DisableMenuItem(menu, IDM_ROLLEFT);
           DisableMenuItem(menu, IDM_ROLRIGHT);
         HideMenuBar();          HideMenuBar();
         setUpCarbonEvent();          setUpCarbonEvent();
         if (!np2oscfg.MOUSE_SW) {          if (!np2oscfg.MOUSE_SW) {
Line 1134  static void toggleFullscreen(void) { Line 1147  static void toggleFullscreen(void) {
             mouse_running(MOUSE_OFF);              mouse_running(MOUSE_OFF);
             menu_setmouse(0);              menu_setmouse(0);
         }          }
           EnableMenuItem(menu, IDM_ROLNORMAL);
           EnableMenuItem(menu, IDM_ROLLEFT);
           EnableMenuItem(menu, IDM_ROLRIGHT);
         ShowMenuBar();          ShowMenuBar();
           if (np2oscfg.toolwin) {
               toolwin_open();
           }
     }      }
     CheckMenuItem(GetMenuHandle(IDM_SCREEN), LoWord(IDM_FULLSCREEN), scrnmode & SCRNMODE_FULLSCREEN);      CheckMenuItem(GetMenuHandle(IDM_SCREEN), LoWord(IDM_FULLSCREEN), scrnmode & SCRNMODE_FULLSCREEN);
     soundmng_play();      soundmng_play();

Removed from v.1.34  
changed lines
  Added in v.1.35


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