mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +00:00
Fix internal Emscripten JS API calls
Emscripten 1.37.24 no longer exports these by default
This commit is contained in:
parent
50181da8a1
commit
cf5b074a95
3 changed files with 5 additions and 5 deletions
|
@ -566,7 +566,7 @@ void OS_JavaScript::set_css_cursor(const char *p_cursor) {
|
|||
|
||||
/* clang-format off */
|
||||
EM_ASM_({
|
||||
Module.canvas.style.cursor = Module.UTF8ToString($0);
|
||||
Module.canvas.style.cursor = UTF8ToString($0);
|
||||
}, p_cursor);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ const char *OS_JavaScript::get_css_cursor() const {
|
|||
char cursor[16];
|
||||
/* clang-format off */
|
||||
EM_ASM_INT({
|
||||
Module.stringToUTF8(Module.canvas.style.cursor ? Module.canvas.style.cursor : 'auto', $0, 16);
|
||||
stringToUTF8(Module.canvas.style.cursor ? Module.canvas.style.cursor : 'auto', $0, 16);
|
||||
}, cursor);
|
||||
/* clang-format on */
|
||||
return cursor;
|
||||
|
@ -792,7 +792,7 @@ void OS_JavaScript::main_loop_begin() {
|
|||
|
||||
/* clang-format off */
|
||||
EM_ASM_ARGS({
|
||||
const send_notification = Module.cwrap('send_notification', null, ['number']);
|
||||
const send_notification = cwrap('send_notification', null, ['number']);
|
||||
const notifs = arguments;
|
||||
(['mouseover', 'mouseleave', 'focus', 'blur']).forEach(function(event, i) {
|
||||
Module.canvas.addEventListener(event, send_notification.bind(null, notifs[i]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue