From 0905eeee23386889f58b1e4980d331dd7b26d23d Mon Sep 17 00:00:00 2001 From: Alexey Gulev Date: Sun, 14 Jun 2020 12:13:07 +0200 Subject: [PATCH] Defold 1.2.170 fixes --- example/engine_template.html | 221 ++++++++++++++++++++------------- jstodef/lib/web/lib_jstodef.js | 10 +- 2 files changed, 139 insertions(+), 92 deletions(-) diff --git a/example/engine_template.html b/example/engine_template.html index ed86c1b..ce83161 100644 --- a/example/engine_template.html +++ b/example/engine_template.html @@ -3,43 +3,31 @@ - - + + + - {{DEFOLD_APP_TITLE}} - - - {{{DEFOLD_DEV_HEAD}}} -
-
- + +
+{{#html5.show_fullscreen_button}} +
Fullscreen
+{{/html5.show_fullscreen_button}} +{{#html5.show_made_with_defold}} + +{{/html5.show_made_with_defold}} +
- - - - {{{DEFOLD_DEV_INLINE}}} - + - - + - - diff --git a/jstodef/lib/web/lib_jstodef.js b/jstodef/lib/web/lib_jstodef.js index efe7b7a..75bf7a0 100644 --- a/jstodef/lib/web/lib_jstodef.js +++ b/jstodef/lib/web/lib_jstodef.js @@ -17,25 +17,25 @@ var LibJsToDef = { var msg_id = allocate(intArrayFromString(message_id), "i8", ALLOC_NORMAL); switch (typeof message) { case 'undefined': - Runtime.dynCall("vi", JsToDef._callback_empty, [msg_id]); + dynCall("vi", JsToDef._callback_empty, [msg_id]); break; case 'number': - Runtime.dynCall("vif", JsToDef._callback_number, [msg_id, message]); + dynCall("vif", JsToDef._callback_number, [msg_id, message]); break; case 'string': var msg = allocate(intArrayFromString(message), "i8", ALLOC_NORMAL); - Runtime.dynCall("vii", JsToDef._callback_string, [msg_id, msg]); + dynCall("vii", JsToDef._callback_string, [msg_id, msg]); Module._free(msg); break; case 'object': var msg = JSON.stringify(message); msg = allocate(intArrayFromString(msg), "i8", ALLOC_NORMAL); - Runtime.dynCall("vii", JsToDef._callback_object, [msg_id, msg]); + dynCall("vii", JsToDef._callback_object, [msg_id, msg]); Module._free(msg); break; case 'boolean': var msg = message ? 1 : 0; - Runtime.dynCall("vii", JsToDef._callback_bool, [msg_id, msg]); + dynCall("vii", JsToDef._callback_bool, [msg_id, msg]); break; default: console.warn("Unsupported message format: " + (typeof message));