Add _emscripten_set_main_loop to EMCC_EXPORT
This commit is contained in:
parent
da8f828e2d
commit
f0ea8218a7
3 changed files with 7 additions and 12 deletions
9
raylib/external/scripts/emcc-generate-js.sh
vendored
9
raylib/external/scripts/emcc-generate-js.sh
vendored
File diff suppressed because one or more lines are too long
7
raylib/external/web/mainloop.js
vendored
7
raylib/external/web/mainloop.js
vendored
|
@ -1,7 +0,0 @@
|
|||
function _emscripten_set_main_loop_go(fps, simulateInfiniteLoop) {
|
||||
if (_go_update_function !== undefined && typeof _go_update_function == 'function') {
|
||||
_emscripten_set_main_loop(_go_update_function, fps, simulateInfiniteLoop);
|
||||
}
|
||||
}
|
||||
|
||||
Module["_emscripten_set_main_loop_go"] = _emscripten_set_main_loop_go;
|
|
@ -20,8 +20,7 @@ func SetCallbackFunc(func(unsafe.Pointer)) {
|
|||
|
||||
// SetMainLoop - Sets main loop function
|
||||
func SetMainLoop(fn func(), fps int, infinite bool) {
|
||||
js.Global.Set("_go_update_function", fn)
|
||||
js.Global.Get("Module").Call("_emscripten_set_main_loop_go", fps, infinite)
|
||||
js.Global.Get("Module").Call("_emscripten_set_main_loop", fn, fps, infinite)
|
||||
}
|
||||
|
||||
// ShowCursor - Shows cursor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue