diff --git a/SpaceCadetPinball/pb.cpp b/SpaceCadetPinball/pb.cpp index fe98f42..6a4282f 100644 --- a/SpaceCadetPinball/pb.cpp +++ b/SpaceCadetPinball/pb.cpp @@ -270,10 +270,10 @@ void pb::frame(float dtMilliSec) // Retained render prevents frame skip. The next best thing - complete refresh at fixed rate. render::update(false); + // Redraw is slower, as a compromise it is done at FPS = UPS / 2 auto targetFps = options::Options.TargetUps / 2.0f; targetFps = max(targetFps, 60.0f); // at least 60 - // Frame time at 60 FPS = 16.(6) ms auto targetTime = 1000.0f / targetFps; frameTime += dtMilliSec; diff --git a/SpaceCadetPinball/winmain.cpp b/SpaceCadetPinball/winmain.cpp index cac5784..92a7a69 100644 --- a/SpaceCadetPinball/winmain.cpp +++ b/SpaceCadetPinball/winmain.cpp @@ -224,12 +224,8 @@ int winmain::WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi pb::toggle_demo(); else pb::replay_level(0); - - // To have a smooth display, Updates Per Sec (UPS) should be fps*2. - // Defaulted to 125 UPS, to leave some time for rendering. - float TargetFrameTime = 1000.0f / options::Options.TargetUps; - TargetFrameTime = max(TargetFrameTime, 1); + float TargetFrameTime = 1000.0f / options::Options.TargetUps; DWORD someTimeCounter = 300u, prevTime = 0u, frameStart = timeGetTime(); float sleepRemainder = 0, frameDuration = TargetFrameTime; while (true)