Disable fps limiter

This commit is contained in:
tovjemam 2026-05-24 23:12:07 +02:00
parent 3bb458e0ab
commit 0b3b1d09ab

View File

@ -428,21 +428,21 @@ static void Main() {
#endif #endif
SDL_GL_SetSwapInterval(0); SDL_GL_SetSwapInterval(0);
auto frame_dur = std::chrono::milliseconds(5); //auto frame_dur = std::chrono::milliseconds(0);
while (!s_quit) while (!s_quit)
{ {
auto t_start = std::chrono::steady_clock::now(); //auto t_start = std::chrono::steady_clock::now();
Frame(); Frame();
auto t_next = t_start + frame_dur; //auto t_next = t_start + frame_dur;
auto t_now = std::chrono::steady_clock::now(); //auto t_now = std::chrono::steady_clock::now();
if (t_now < t_next) //if (t_now < t_next)
{ //{
std::this_thread::sleep_for(t_next - t_now); //std::this_thread::sleep_for(t_next - t_now);
} //}
} }
s_app.reset(); s_app.reset();