Diff for /np2/win9x/np2.cpp between versions 1.66 and 1.67

version 1.66, 2006/12/23 23:34:32 version 1.67, 2006/12/24 00:52:29
Line 8 Line 8
 #include        "parts.h"  #include        "parts.h"
 #include        "np2.h"  #include        "np2.h"
 #include        "np2arg.h"  #include        "np2arg.h"
 #include        "cputype.h"  
 #include        "dosio.h"  #include        "dosio.h"
 #include        "extromio.h"  #include        "extromio.h"
 #include        "commng.h"  #include        "commng.h"
Line 23 Line 22
 #include        "winloc.h"  #include        "winloc.h"
 #include        "sstp.h"  #include        "sstp.h"
 #include        "sstpmsg.h"  #include        "sstpmsg.h"
 #include        "dclock.h"  
 #include        "toolwin.h"  #include        "toolwin.h"
 #include        "juliet.h"  #include        "juliet.h"
 #include        "np2class.h"  #include        "np2class.h"
Line 45 Line 43
 #include        "debugsub.h"  #include        "debugsub.h"
 #include        "subwind.h"  #include        "subwind.h"
 #include        "viewer.h"  #include        "viewer.h"
   #if !defined(_WIN64)
   #include        "cputype.h"
   #endif
   #if defined(SUPPORT_DCLOCK)
   #include        "dclock.h"
   #endif
   
   
 #ifdef BETA_RELEASE  #ifdef BETA_RELEASE
Line 55  static TCHAR  szClassName[] = _T("NP2-Ma Line 59  static TCHAR  szClassName[] = _T("NP2-Ma
                 HWND            hWndMain;                  HWND            hWndMain;
                 HINSTANCE       hInst;                  HINSTANCE       hInst;
                 HINSTANCE       hPrev;                  HINSTANCE       hPrev;
   #if !defined(_WIN64)
                 int                     mmxflag;                  int                     mmxflag;
   #endif
                 UINT8           np2break = 0;                                                                   // ver0.30                  UINT8           np2break = 0;                                                                   // ver0.30
                 BOOL            winui_en;                  BOOL            winui_en;
   
Line 377  static void np2cmd(HWND hWnd, UINT16 cmd Line 383  static void np2cmd(HWND hWnd, UINT16 cmd
         UINT            update;          UINT            update;
         BOOL            b;          BOOL            b;
   
         hInst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);          hInst = GetWindowInst(hWnd);
         update = 0;          update = 0;
         switch(cmd) {          switch(cmd) {
                 case IDM_RESET:                  case IDM_RESET:
Line 1129  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1135  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                 BITMAP          bmp;                                  BITMAP          bmp;
                                 HDC                     hmdc;                                  HDC                     hmdc;
                                 HBRUSH          hbrush;                                  HBRUSH          hbrush;
                                 hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);                                  hinst = GetWindowInst(hWnd);
                                 GetClientRect(hWnd, &rect);                                  GetClientRect(hWnd, &rect);
                                 width = rect.right - rect.left;                                  width = rect.right - rect.left;
                                 height = rect.bottom - rect.top;                                  height = rect.bottom - rect.top;
Line 1266  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1272  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                                                                                                         HTCAPTION, 0L));                                                                                                                          HTCAPTION, 0L));
                                         }                                          }
                                 }                                  }
   #if defined(SUPPORT_DCLOCK)
                                 else {                                  else {
                                         POINT p;                                          POINT p;
                                         if ((GetCursorPos(&p)) && (p.y >= 466)) {                                          if ((GetCursorPos(&p)) && (p.y >= 466)) {
Line 1274  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1281  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                                 dclock_reset();                                                  dclock_reset();
                                         }                                          }
                                 }                                  }
   #endif
                                 return(DefWindowProc(hWnd, msg, wParam, lParam));                                  return(DefWindowProc(hWnd, msg, wParam, lParam));
                         }                          }
                         break;                          break;
Line 1295  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1303  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                 if (!scrnmng_isfullscreen()) {                                  if (!scrnmng_isfullscreen()) {
                                         np2popup(hWnd, lParam);                                          np2popup(hWnd, lParam);
                                 }                                  }
   #if defined(SUPPORT_DCLOCK)
                                 else {                                  else {
                                         POINT p;                                          POINT p;
                                         if ((GetCursorPos(&p)) && (p.y >= 466) &&                                          if ((GetCursorPos(&p)) && (p.y >= 466) &&
Line 1304  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1313  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                                 dclock_reset();                                                  dclock_reset();
                                         }                                          }
                                 }                                  }
   #endif
                                 return(DefWindowProc(hWnd, msg, wParam, lParam));                                  return(DefWindowProc(hWnd, msg, wParam, lParam));
                         }                          }
                         break;                          break;
Line 1417  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1427  LRESULT CALLBACK WndProc(HWND hWnd, UINT
 static void framereset(UINT cnt) {  static void framereset(UINT cnt) {
   
         framecnt = 0;          framecnt = 0;
   #if defined(SUPPORT_DCLOCK)
         scrnmng_dispclock();          scrnmng_dispclock();
   #endif
         kdispwin_draw((UINT8)cnt);          kdispwin_draw((UINT8)cnt);
         skbdwin_process();          skbdwin_process();
         mdbgwin_process();          mdbgwin_process();
Line 1482  int WINAPI WinMain(HINSTANCE hInstance,  Line 1494  int WINAPI WinMain(HINSTANCE hInstance, 
   
         hInst = loadextinst(hInstance);          hInst = loadextinst(hInstance);
         hPrev = hPreInst;          hPrev = hPreInst;
   #if !defined(_WIN64)
         mmxflag = (havemmx())?0:MMXFLAG_NOTSUPPORT;          mmxflag = (havemmx())?0:MMXFLAG_NOTSUPPORT;
         mmxflag += (np2oscfg.disablemmx)?MMXFLAG_DISABLE:0;          mmxflag += (np2oscfg.disablemmx)?MMXFLAG_DISABLE:0;
   #endif
         TRACEINIT();          TRACEINIT();
   
         xrollkey = (np2oscfg.xrollkey == 0);          xrollkey = (np2oscfg.xrollkey == 0);
Line 1703  int WINAPI WinMain(HINSTANCE hInstance,  Line 1717  int WINAPI WinMain(HINSTANCE hInstance, 
                                         joymng_sync();                                          joymng_sync();
                                         mousemng_sync();                                          mousemng_sync();
                                         pccore_exec(framecnt == 0);                                          pccore_exec(framecnt == 0);
   #if defined(SUPPORT_DCLOCK)
                                         dclock_callback();                                          dclock_callback();
   #endif
                                         if (np2oscfg.DRAW_SKIP) {               // nowait frame skip                                          if (np2oscfg.DRAW_SKIP) {               // nowait frame skip
                                                 framecnt++;                                                  framecnt++;
                                                 if (framecnt >= np2oscfg.DRAW_SKIP) {                                                  if (framecnt >= np2oscfg.DRAW_SKIP) {
Line 1722  int WINAPI WinMain(HINSTANCE hInstance,  Line 1738  int WINAPI WinMain(HINSTANCE hInstance, 
                                                 joymng_sync();                                                  joymng_sync();
                                                 mousemng_sync();                                                  mousemng_sync();
                                                 pccore_exec(framecnt == 0);                                                  pccore_exec(framecnt == 0);
   #if defined(SUPPORT_DCLOCK)
                                                 dclock_callback();                                                  dclock_callback();
   #endif
                                                 framecnt++;                                                  framecnt++;
                                         }                                          }
                                         else {                                          else {
Line 1735  int WINAPI WinMain(HINSTANCE hInstance,  Line 1753  int WINAPI WinMain(HINSTANCE hInstance, 
                                                 joymng_sync();                                                  joymng_sync();
                                                 mousemng_sync();                                                  mousemng_sync();
                                                 pccore_exec(framecnt == 0);                                                  pccore_exec(framecnt == 0);
   #if defined(SUPPORT_DCLOCK)
                                                 dclock_callback();                                                  dclock_callback();
   #endif
                                                 framecnt++;                                                  framecnt++;
                                                 cnt = timing_getcount();                                                  cnt = timing_getcount();
                                                 if (framecnt > cnt) {                                                  if (framecnt > cnt) {

Removed from v.1.66  
changed lines
  Added in v.1.67


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