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 4f74e1a commit 418fe99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/web/web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ int main(int argc, char** argv) {
// Register cleanup function to be called on exit
atexit(cleanup);

// Set up the main loop for Emscripten with proper timing
// Set up the main loop for Emscripten
emscripten_set_main_loop(mainLoop, 0, true);
// Note: The second parameter (0) means use browser's requestAnimationFrame
// The third parameter (true) means simulate infinite loop
// Set timing mode after setting up the loop
emscripten_set_main_loop_timing(EM_TIMING_RAF, 0);

return 0;
}

0 comments on commit 418fe99

Please sign in to comment.