--- np2/win9xc/np2.cpp 2003/10/16 17:59:18 1.1 +++ np2/win9xc/np2.cpp 2003/10/23 12:58:44 1.4 @@ -51,7 +51,7 @@ static const char szClassName[] = "NP2-M NP2OSCFG np2oscfg = { - CW_USEDEFAULT, CW_USEDEFAULT, 1, 1, 0, 2, + CW_USEDEFAULT, CW_USEDEFAULT, 0, 2, KEY_UNKNOWN, 0, 0, 0, 0, {1, 2, 2, 1}, 0}; @@ -565,8 +565,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT HBITMAP hbmp; BITMAP bmp; HINSTANCE hinst; - int sx = 640 + np2oscfg.paddingx; - int sy = 400 + np2oscfg.paddingy; + int sx = 640; + int sy = 400; hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); #if 1 @@ -756,8 +756,6 @@ int WINAPI WinMain(HINSTANCE hInstance, srand((unsigned)time(NULL)); -// np2arg_analize(lpszCmdLine); - if ((hwndorg = FindWindow(szClassName, NULL)) != NULL) { ShowWindow(hwndorg, SW_RESTORE); SetForegroundWindow(hwndorg); @@ -930,21 +928,29 @@ int WINAPI WinMain(HINSTANCE hInstance, } else { // auto skip if (!waitcnt) { + UINT cnt; joy_flash(); mouse_callback(); pccore_exec(framecnt == 0); framecnt++; - if (timing_getcount() < framecnt) { + cnt = timing_getcount(); + if (framecnt > cnt) { waitcnt = framecnt; if (framemax > 1) { framemax--; } } else if (framecnt >= framemax) { - waitcnt = framecnt; if (framemax < 12) { framemax++; } + if (cnt >= 12) { + timing_reset(); + } + else { + timing_setcount(cnt - framecnt); + } + framecnt = 0; } } else {