File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -154,14 +154,15 @@ static const char *GetCanvasId(void);
154
154
//----------------------------------------------------------------------------------
155
155
156
156
// Check if application should close
157
+ // This will always return false on a web-build as web builds have no control over this functionality
158
+ // Sleep is handled in EndDrawing for sync code
157
159
bool WindowShouldClose (void )
158
160
{
159
161
// Emterpreter-Async required to run sync code
160
162
// https://github.com/emscripten-core/emscripten/wiki/Emterpreter#emterpreter-async-run-synchronous-code
161
- // By default, this function is never called on a web-ready raylib example because we encapsulate
162
- // frame code in a UpdateDrawFrame() function, to allow browser manage execution asynchronously
163
- // but now emscripten allows sync code to be executed in an interpreted way, using emterpreter!
164
- emscripten_sleep (16 );
163
+ // This function should not called on a web-ready raylib build because you instead want to encapsulate
164
+ // frame code in an UpdateDrawFrame() function, to allow the browser to manage execution asynchronously
165
+ // using emscripten_set_main_loop
165
166
return false;
166
167
}
167
168
You can’t perform that action at this time.
0 commit comments