Commit 6fb6386e authored by NTAuthority's avatar NTAuthority

fix maxfps 0 causing division by zero

parent b57cf170
Pipeline #53 skipped
......@@ -101,7 +101,7 @@ void Game::Run()
{
// limit frame rate and handle events
// TODO: non-busy wait?
int minMillis = (1000 / this->maxFPS);
int minMillis = (this->maxFPS > 0) ? (1000 / this->maxFPS) : 1;
uint32_t millis = 0;
uint64_t thisTime = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment