--- np2/wince/w32/Attic/np2.cpp 2003/10/23 12:58:44 1.2 +++ np2/wince/w32/Attic/np2.cpp 2003/10/25 13:52:24 1.3 @@ -29,8 +29,8 @@ #include "debugsub.h" -static const char szAppCaption[] = STRLITERAL("Neko Project II"); -static const char szClassName[] = STRLITERAL("NP2-MainWindow"); +static const TCHAR szAppCaption[] = STRLITERAL("Neko Project II"); +static const TCHAR szClassName[] = STRLITERAL("NP2-MainWindow"); NP2OSCFG np2oscfg = {0, 2}; @@ -97,19 +97,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT PostQuitMessage(0); break; - case WM_NP2CMD: - switch(LOWORD(lParam)) { - case NP2CMD_EXIT: - case NP2CMD_EXIT2: - PostQuitMessage(0); - break; - - case NP2CMD_RESET: - pccore_cfgupdate(); - pccore_reset(); - break; - } +#if defined(WAVEMNG_CBMAIN) + case MM_WOM_DONE: + soundmng_cb(MM_WOM_DONE, (HWAVEOUT)wParam, (WAVEHDR *)lParam); break; +#endif default: return(DefWindowProc(hWnd, msg, wParam, lParam)); @@ -131,11 +123,18 @@ static void processwait(UINT waitcnt) { int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInst, - LPSTR lpszCmdLine, int nCmdShow) { + LPTSTR lpszCmdLine, int nCmdShow) { WNDCLASS np2; MSG msg; HWND hwndorg; + hwndorg = FindWindow(szClassName, NULL); + if (hwndorg != NULL) { + ShowWindow(hwndorg, SW_RESTORE); + SetForegroundWindow(hwndorg); + return(FALSE); + } + GetModuleFileName(NULL, modulefile, sizeof(modulefile)); dosio_init(); file_setcd(modulefile); @@ -143,13 +142,6 @@ int WINAPI WinMain(HINSTANCE hInstance, srand((unsigned)time(NULL)); - if ((hwndorg = FindWindow(szClassName, NULL)) != NULL) { - ShowWindow(hwndorg, SW_RESTORE); - SetForegroundWindow(hwndorg); - dosio_term(); - return(FALSE); - } - hInst = hInstance; hPrev = hPreInst; TRACEINIT();