From 7c604e736ebb286ce077763af16438bc20e5a84f Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 31 Dec 2020 13:16:42 +1100 Subject: [PATCH] Webclient: Fix non vsync fps limit not applying at startup --- src/Game.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Game.c b/src/Game.c index 96ec35c6c..04ea5e708 100644 --- a/src/Game.c +++ b/src/Game.c @@ -643,6 +643,9 @@ static void Game_DoFrame(void) { static void Game_RunLoop(void) { lastRender = Stopwatch_Measure(); emscripten_set_main_loop(Game_DoFrame, 0, false); + /* The Game_SetFpsLimit call back in Game_Load does nothing because no main loop yet */ + /* Now thats there's a main loop, Game_SetFpsLimit will actually do something */ + Game_SetFpsLimit(Options_GetEnum(OPT_FPS_LIMIT, 0, FpsLimit_Names, FPS_LIMIT_COUNT)); } #else static void Game_RunLoop(void) {