diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/export/export.cpp | 16 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 31 | ||||
-rw-r--r-- | platform/uwp/export/export.cpp | 4 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 2 |
4 files changed, 28 insertions, 25 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 3c5c0fda23..d691bd7629 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -540,14 +540,14 @@ class EditorExportAndroid : public EditorExportPlatform { //print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size())); - uint32_t string_count; - uint32_t styles_count; - uint32_t string_flags; - uint32_t string_data_offset; - - uint32_t styles_offset; - uint32_t string_table_begins; - uint32_t string_table_ends; + uint32_t string_count = 0; + uint32_t styles_count = 0; + uint32_t string_flags = 0; + uint32_t string_data_offset = 0; + + uint32_t styles_offset = 0; + uint32_t string_table_begins = 0; + uint32_t string_table_ends = 0; Vector<uint8_t> stable_extra; String version_name = p_preset->get("version/name"); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index a0e5610591..ac8d367366 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -521,21 +521,6 @@ void OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, i #undef SET_EM_CALLBACK #undef EM_CHECK - /* clang-format off */ - EM_ASM_ARGS({ - const send_notification = Module.cwrap('send_notification', null, ['number']); - const notifs = arguments; - (['mouseover', 'mouseleave', 'focus', 'blur']).forEach(function(event, i) { - Module.canvas.addEventListener(event, send_notification.bind(this, notifs[i])); - }); - }, - MainLoop::NOTIFICATION_WM_MOUSE_ENTER, - MainLoop::NOTIFICATION_WM_MOUSE_EXIT, - MainLoop::NOTIFICATION_WM_FOCUS_IN, - MainLoop::NOTIFICATION_WM_FOCUS_OUT - ); -/* clang-format on */ - #ifdef JAVASCRIPT_EVAL_ENABLED javascript_eval = memnew(JavaScript); ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaScript", javascript_eval)); @@ -818,7 +803,23 @@ void OS_JavaScript::main_loop_begin() { if (main_loop) main_loop->init(); + + /* clang-format off */ + EM_ASM_ARGS({ + const send_notification = Module.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])); + }); + }, + MainLoop::NOTIFICATION_WM_MOUSE_ENTER, + MainLoop::NOTIFICATION_WM_MOUSE_EXIT, + MainLoop::NOTIFICATION_WM_FOCUS_IN, + MainLoop::NOTIFICATION_WM_FOCUS_OUT + ); + /* clang-format on */ } + bool OS_JavaScript::main_loop_iterate() { if (!main_loop) diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index f9b8422004..a2be126c58 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -866,7 +866,7 @@ class EditorExportUWP : public EditorExportPlatform { Vector<uint8_t> _get_image_data(const Ref<EditorExportPreset> &p_preset, const String &p_path) { Vector<uint8_t> data; - StreamTexture *image; + StreamTexture *image = NULL; if (p_path.find("StoreLogo") != -1) { image = p_preset->get("images/store_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/store_logo"))); @@ -882,6 +882,8 @@ class EditorExportUWP : public EditorExportPlatform { image = p_preset->get("images/wide310x150_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/wide310x150_logo"))); } else if (p_path.find("SplashScreen") != -1) { image = p_preset->get("images/splash_screen").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/splash_screen"))); + } else { + ERR_PRINT("Unable to load logo"); } if (!image) return data; diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 2d33d25773..f96343c92c 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1237,7 +1237,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { unsigned int keycode = KeyMappingX11::get_keycode(keysym_keycode); - /* Phase 3, obtain an unicode character from the keysym */ + /* Phase 3, obtain a unicode character from the keysym */ // KeyMappingX11 also translates keysym to unicode. // It does a binary search on a table to translate |