Skip to content

Commit

Permalink
Update web.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaweees committed Dec 25, 2024
1 parent 7306ac7 commit d5b3f96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/web/web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ int main(int argc, char** argv) {
// Register cleanup function to be called on exit
atexit(cleanup);

// Set up the main loop for Emscripten first
emscripten_set_main_loop(mainLoop, 0, true);
// Set the timing mode before setting up the main loop
emscripten_set_main_loop_timing(EM_TIMING_RAF, 1);

// Then set the timing mode
emscripten_set_main_loop_timing(EM_TIMING_RAF, 0);
// Set up the main loop for Emscripten
emscripten_set_main_loop(mainLoop, 0, true);

return 0;
}

0 comments on commit d5b3f96

Please sign in to comment.