From 9e58632c781c321b1f12bd7e157e7927776ae803 Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Mon, 12 Feb 2024 18:59:10 +0000 Subject: [PATCH] main: fix running too fast when vsync off Signed-off-by: Mahyar Koshkouei --- deobfuscated.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deobfuscated.cc b/deobfuscated.cc index 59bbf51..7cfd654 100644 --- a/deobfuscated.cc +++ b/deobfuscated.cc @@ -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;