My project is compiling and opening up on the web but the main loop is not working. The error seems to be that usleep is undefined. I'm not sure how I can correct this. As per the error message, I seem to be dividing by zero (undefined). I tried removing 'fps' but no luck.
#define emscripten_set_main_loop(func,fps,simulateInfiniteLoop)
while (1) { func(); usleep(1000000/fps); }
Expands to:
while (1) { loop(); usleep(1000000/0); }
identifier "usleep" is undefined C/C++(20)