--- np2/win9x/np2.cpp 2003/11/21 06:51:14 1.31 +++ np2/win9x/np2.cpp 2003/11/24 07:40:02 1.32 @@ -1226,6 +1226,7 @@ static void processwait(UINT cnt) { else { Sleep(1); } + soundmng_sync(); } @@ -1234,7 +1235,7 @@ int WINAPI WinMain(HINSTANCE hInstance, WNDCLASS wc; MSG msg; HMENU hMenu; - HWND hwndorg; + HWND hWnd; UINT i; #ifdef OPENING_WAIT UINT32 tick; @@ -1254,10 +1255,10 @@ int WINAPI WinMain(HINSTANCE hInstance, CopyMemory(szClassName, np2oscfg.winid, 3); - if ((hwndorg = FindWindow(szClassName, NULL)) != NULL) { + if ((hWnd = FindWindow(szClassName, NULL)) != NULL) { sstpmsg_running(); - ShowWindow(hwndorg, SW_RESTORE); - SetForegroundWindow(hwndorg); + ShowWindow(hWnd, SW_RESTORE); + SetForegroundWindow(hWnd); dosio_term(); return(FALSE); } @@ -1307,6 +1308,7 @@ int WINAPI WinMain(HINSTANCE hInstance, WS_THICKFRAME | WS_MINIMIZEBOX, np2oscfg.winx, np2oscfg.winy, 640, 400, NULL, NULL, hInstance, NULL); + hWnd = hWndMain; scrnmng_initialize(); xmenu_setsound(np2cfg.SOUND_SW); @@ -1330,8 +1332,8 @@ int WINAPI WinMain(HINSTANCE hInstance, xmenu_setsstp(np2oscfg.sstp); xmenu_setmouse(np2oscfg.MOUSE_SW); - ShowWindow(hWndMain, nCmdShow); - UpdateWindow(hWndMain); + ShowWindow(hWnd, nCmdShow); + UpdateWindow(hWnd); #ifdef OPENING_WAIT tick = GetTickCount(); @@ -1340,7 +1342,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // めにゅー追加 if (np2oscfg.statsave) { char buf[16]; - hMenu = GetMenu(hWndMain); + hMenu = GetMenu(hWnd); hStat = CreatePopupMenu(); for (i=0; i