Diff for /np2/wince/np2.cpp between versions 1.2 and 1.4

version 1.2, 2003/12/01 03:38:52 version 1.4, 2003/12/01 21:15:13
Line 42  static const TCHAR szAppCaption[] = STRL Line 42  static const TCHAR szAppCaption[] = STRL
 static const TCHAR szClassName[] = STRLITERAL("NP2-MainWindow");  static const TCHAR szClassName[] = STRLITERAL("NP2-MainWindow");
   
   
                 NP2OSCFG        np2oscfg = {0, 2, 0, 0};                  NP2OSCFG        np2oscfg = {0, 2, 0, 0,
   #if defined(WIN32_PLATFORM_PSPC)
                                                                   0, 0,
   #endif
                                                           };
                 HWND            hWndMain;                  HWND            hWndMain;
                 HINSTANCE       hInst;                  HINSTANCE       hInst;
                 HINSTANCE       hPrev;                  HINSTANCE       hPrev;
                 char            modulefile[MAX_PATH];                  char            modulefile[MAX_PATH];
                   GXKeyList       gx_keylist;
   
 static  BOOL            sysrunning;  enum {
           SYSRUNNING_MAIN         = 1,
           SYSRUNNING_FORE         = 2
   };
   
   static  UINT            sysrunning;
 static  UINT            framecnt;  static  UINT            framecnt;
 static  UINT            waitcnt;  static  UINT            waitcnt;
 static  UINT            framemax = 1;  static  UINT            framemax = 1;
Line 200  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 210  LRESULT CALLBACK WndProc(HWND hWnd, UINT
   
 #if defined(SUPPORT_SOFTKBD)  #if defined(SUPPORT_SOFTKBD)
                                 softkbd_up();                                  softkbd_up();
                                 TRACEOUT(("%d %d", LOWORD(lParam), HIWORD(lParam)));  
                                 if (menuvram) {                                  if (menuvram) {
                                         menubase_moving(LOWORD(lParam), HIWORD(lParam), 2);                                          menubase_moving(LOWORD(lParam), HIWORD(lParam), 2);
                                 }                                  }
Line 241  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 250  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                         if (sysrunning) {                          if (sysrunning) {
                                 if (LOWORD(wParam) != WA_INACTIVE) {                                  if (LOWORD(wParam) != WA_INACTIVE) {
                                         GXResume();                                          GXResume();
   #if defined(WIN32_PLATFORM_PSPC)
                                         scrnmng_enable(TRUE);                                          scrnmng_enable(TRUE);
   #endif
                                         scrndraw_redraw();                                          scrndraw_redraw();
                                         soundmng_enable(SNDPROC_MAIN);                                          soundmng_enable(SNDPROC_MAIN);
                                           sysrunning |= SYSRUNNING_FORE;
                                 }                                  }
                                 else {                                  else {
                                           sysrunning &= ~SYSRUNNING_FORE;
                                         soundmng_disable(SNDPROC_MAIN);                                          soundmng_disable(SNDPROC_MAIN);
   #if defined(WIN32_PLATFORM_PSPC)
                                         scrnmng_enable(FALSE);                                          scrnmng_enable(FALSE);
   #endif
                                         GXSuspend();                                          GXSuspend();
                                 }                                  }
                         }                          }
Line 400  int WINAPI WinMain(HINSTANCE hInstance,  Line 415  int WINAPI WinMain(HINSTANCE hInstance, 
                 DestroyWindow(hWnd);                  DestroyWindow(hWnd);
                 goto np2main_err3;                  goto np2main_err3;
         }          }
           gx_keylist = GXGetDefaultKeys(GX_NORMALKEYS);
           scrnmng_keybinds();
   #if defined(WIN32_PLATFORM_PSPC)
           winkbd_bindinit();
   #endif
   
         soundmng_initialize();          soundmng_initialize();
         commng_initialize();          commng_initialize();
Line 411  int WINAPI WinMain(HINSTANCE hInstance,  Line 431  int WINAPI WinMain(HINSTANCE hInstance, 
         pccore_reset();          pccore_reset();
         scrndraw_redraw();          scrndraw_redraw();
   
         sysrunning = TRUE;  #if defined(WIN32_PLATFORM_PSPC)
           winkbd_bindcur(np2oscfg.bindcur);
           winkbd_bindbtn(np2oscfg.bindbtn);
   #endif
   
           sysrunning |= SYSRUNNING_MAIN | SYSRUNNING_FORE;
   
         if (np2oscfg.resume) {          if (np2oscfg.resume) {
                 id = flagload(str_sav, str_resume, FALSE);                  id = flagload(str_sav, str_resume, FALSE);
Line 437  int WINAPI WinMain(HINSTANCE hInstance,  Line 462  int WINAPI WinMain(HINSTANCE hInstance, 
 #endif  #endif
                         DispatchMessage(&msg);                          DispatchMessage(&msg);
                 }                  }
                 else {                  else if (sysrunning & SYSRUNNING_FORE) {
                         if (np2oscfg.NOWAIT) {                          if (np2oscfg.NOWAIT) {
                                 pccore_exec(framecnt == 0);                                  pccore_exec(framecnt == 0);
                                 if (np2oscfg.DRAW_SKIP) {                       // nowait frame skip                                  if (np2oscfg.DRAW_SKIP) {                       // nowait frame skip
Line 493  int WINAPI WinMain(HINSTANCE hInstance,  Line 518  int WINAPI WinMain(HINSTANCE hInstance, 
                                 }                                  }
                         }                          }
                 }                  }
                   else {
                           Sleep(100);
                   }
         }          }
   
         soundmng_disable(SNDPROC_MAIN);          soundmng_disable(SNDPROC_MAIN);

Removed from v.1.2  
changed lines
  Added in v.1.4


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