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