Skip to content

Commit

Permalink
main: fix running too fast when vsync off
Browse files Browse the repository at this point in the history
Signed-off-by: Mahyar Koshkouei <[email protected]>
  • Loading branch information
deltabeard committed Feb 12, 2024
1 parent dca3c4e commit 9e58632
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deobfuscated.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,10 @@ int main(int, char**) {
nt = SDL_GetTicks64();
comp -= delay = comp += 16.7427 - (nt - ot);
ot = nt;
if(delay > 0)
if(delay > 0) {
SDL_Delay(delay);
ot = SDL_GetTicks64();
}
}

LY = (LY + 1) % 154;
Expand Down

0 comments on commit 9e58632

Please sign in to comment.