--- np2/wince/np2.cpp 2003/12/05 23:46:06 1.6 +++ np2/wince/np2.cpp 2004/02/18 06:52:34 1.13 @@ -29,7 +29,7 @@ #include "fddfile.h" #include "font.h" #include "timing.h" -#include "statsave.h" +#include "keystat.h" #include "vramhdl.h" #include "menubase.h" #include "sysmenu.h" @@ -42,14 +42,14 @@ static const TCHAR szAppCaption[] = STRL static const TCHAR szClassName[] = STRLITERAL("NP2-MainWindow"); - NP2OSCFG np2oscfg = {0, 2, 0, 0, + NP2OSCFG np2oscfg = {0, 0, 0, 0, #if !defined(GX_DLL) CW_USEDEFAULT, CW_USEDEFAULT, #endif #if defined(WIN32_PLATFORM_PSPC) 0, 0, #endif - }; + 0}; HWND hWndMain; HINSTANCE hInst; HINSTANCE hPrev; @@ -109,11 +109,11 @@ static int flagload(const char *ext, con getstatfilename(path, ext, sizeof(path)); id = DID_YES; ret = statsave_check(path, buf, sizeof(buf)); - if (ret & (~NP2FLAG_DISKCHG)) { + if (ret & (~STATFLAG_DISKCHG)) { menumbox("Couldn't restart", title, MBOX_OK | MBOX_ICONSTOP); id = DID_NO; } - else if ((!force) && (ret & NP2FLAG_DISKCHG)) { + else if ((!force) && (ret & STATFLAG_DISKCHG)) { SPRINTF(buf2, "Conflict!\n\n%s\nContinue?", buf); id = menumbox(buf2, title, MBOX_YESNOCAN | MBOX_ICONQUESTION); } @@ -232,8 +232,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT #if !defined(GX_DLL) case WM_MOVE: +#if !defined(_WIN32_WCE) if (!(GetWindowLong(hWnd, GWL_STYLE) & - (WS_MAXIMIZE | WS_MINIMIZE))) { + (WS_MAXIMIZE | WS_MINIMIZE))) +#endif + { RECT rc; GetWindowRect(hWnd, &rc); np2oscfg.winx = rc.left; @@ -266,7 +269,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT if (sysrunning) { if (LOWORD(wParam) != WA_INACTIVE) { GXResume(); -#if defined(WIN32_PLATFORM_PSPC) +#if defined(GX_DLL) scrnmng_enable(TRUE); #endif scrndraw_redraw(); @@ -276,7 +279,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT else { sysrunning &= ~SYSRUNNING_FORE; soundmng_disable(SNDPROC_MAIN); -#if defined(WIN32_PLATFORM_PSPC) +#if defined(GX_DLL) scrnmng_enable(FALSE); #endif GXSuspend(); @@ -305,9 +308,11 @@ static void processwait(UINT cnt) { timing_setcount(0); framereset(cnt); } +#if !defined(_WIN32_WCE) else { Sleep(1); } +#endif }