Diff for /np2/wince/np2.cpp between versions 1.16 and 1.19

version 1.16, 2004/06/14 13:35:40 version 1.19, 2004/07/15 13:48:39
Line 51  static const TCHAR szClassName[] = STRLI Line 51  static const TCHAR szClassName[] = STRLI
                 HWND            hWndMain;                  HWND            hWndMain;
                 HINSTANCE       hInst;                  HINSTANCE       hInst;
                 HINSTANCE       hPrev;                  HINSTANCE       hPrev;
                 char            modulefile[MAX_PATH];                  OEMCHAR         modulefile[MAX_PATH];
                 GXKeyList       gx_keylist;                  GXKeyList       gx_keylist;
   
 enum {  enum {
Line 198  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 198  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                 if (menuvram) {                                  if (menuvram) {
                                         menubase_moving(LOWORD(lParam), HIWORD(lParam), 1);                                          menubase_moving(LOWORD(lParam), HIWORD(lParam), 1);
                                 }                                  }
                                 else {                                  else if (scrnmng_kbdpos(&lParam) == SUCCESS) {
 #if defined(SUPPORT_SOFTKBD)  #if defined(SUPPORT_SOFTKBD)
                                         softkbd_down(LOWORD(lParam), HIWORD(lParam) - 200);                                          softkbd_down(LOWORD(lParam), HIWORD(lParam));
 #endif  #endif
                                 }                                  }
                         }                          }
Line 208  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 208  LRESULT CALLBACK WndProc(HWND hWnd, UINT
   
                 case WM_LBUTTONUP:                  case WM_LBUTTONUP:
                         if (scrnmng_mousepos(&lParam) == SUCCESS) {                          if (scrnmng_mousepos(&lParam) == SUCCESS) {
   
 #if defined(SUPPORT_SOFTKBD)  #if defined(SUPPORT_SOFTKBD)
                                 softkbd_up();                                  softkbd_up();
   #endif
                                 if (menuvram) {                                  if (menuvram) {
                                         menubase_moving(LOWORD(lParam), HIWORD(lParam), 2);                                          menubase_moving(LOWORD(lParam), HIWORD(lParam), 2);
                                 }                                  }
                                 else if ((LOWORD(lParam) < 32) && (HIWORD(lParam) >= 208)) {                                  else if (scrnmng_ismenu(lParam)) {
                                         sysmenu_menuopen(0, LOWORD(lParam), HIWORD(lParam));  
                                 }  
 #else  
                                 if (menuvram) {  
                                         menubase_moving(LOWORD(lParam), HIWORD(lParam), 2);  
                                 }  
                                 else {  
                                         sysmenu_menuopen(0, LOWORD(lParam), HIWORD(lParam));                                          sysmenu_menuopen(0, LOWORD(lParam), HIWORD(lParam));
                                 }                                  }
 #endif  
                         }                          }
                         break;                          break;
   
Line 316  static void processwait(UINT cnt) { Line 308  static void processwait(UINT cnt) {
   
 // ----  // ----
   
 #if !defined(UNICODE)  #if defined(UNICODE) && defined(OSLANG_SJIS)
 #define GetModuleFileName_A(a, b, c)    GetModuleFileName(a, b, c)  static DWORD _GetModuleFileName(HMODULE hModule,
 #else                                                                                  OEMCHAR *lpFileName, DWORD nSize) {
 static DWORD GetModuleFileName_A(HMODULE hModule,  
                                                                 LPSTR lpFileName, DWORD nSize) {  
   
         TCHAR   *FileNameW;          UINT16  ucs2[MAX_PATH];
         DWORD   len;  
   
         if (nSize) {          GetModuleFileName(hModule, ucs2, NELEMENTS(ucs2));
                 FileNameW = (TCHAR *)_MALLOC(nSize * sizeof(TCHAR), "ModuleFile");          nSize = WideCharToMultiByte(CP_ACP, 0, ucs2, -1,
                 if (FileNameW) {  
                         len = GetModuleFileName(hModule, FileNameW, nSize);  
                         nSize = WideCharToMultiByte(CP_ACP, 0, FileNameW, -1,  
                                                                                 lpFileName, nSize, NULL, NULL);                                                                                  lpFileName, nSize, NULL, NULL);
                         if (nSize) {          if (nSize) {
                                 nSize--;                  nSize--;
                         }  
                         _MFREE(FileNameW);  
                 }  
                 else {  
                         nSize = 0;  
                 }  
         }          }
         return(nSize);          return(nSize);
 }  }
   #elif defined(OSLANG_UTF8)
   static DWORD _GetModuleFileName(HMODULE hModule,
                                                                                   OEMCHAR *lpFileName, DWORD nSize) {
   
           UINT16  ucs2[MAX_PATH];
   
           GetModuleFileName(hModule, ucs2, NELEMENTS(ucs2));
           nSize = ucscnv_ucs2toutf8(lpFileName, nSize, ucs2, (UINT)-1);
           if (nSize) {
                   nSize--;
           }
           return(nSize);
   }
   #else
   #define _GetModuleFileName(a, b, c)             GetModuleFileName(a, b, c)
 #endif  #endif
   
   
 #if defined(_WIN32_WCE)  #if defined(_WIN32_WCE)
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInst,  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInst,
                                                                                 LPWSTR lpszCmdLine, int nCmdShow)                                                                                  LPWSTR lpszCmdLine, int nCmdShow)
Line 372  int WINAPI WinMain(HINSTANCE hInstance,  Line 368  int WINAPI WinMain(HINSTANCE hInstance, 
                 return(0);                  return(0);
         }          }
   
         GetModuleFileName_A(NULL, modulefile, sizeof(modulefile));          _GetModuleFileName(NULL, modulefile, sizeof(modulefile));
         dosio_init();          dosio_init();
         file_setcd(modulefile);          file_setcd(modulefile);
         initload();          initload();

Removed from v.1.16  
changed lines
  Added in v.1.19


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