diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/javascript/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 11 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 2 |
3 files changed, 7 insertions, 12 deletions
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 905bb9ae24..d81aa25c32 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -114,9 +114,9 @@ void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportP void EditorExportPlatformJavaScript::get_export_options(List<ExportOption> *r_options) { - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), false)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), true)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/custom_html_shell", PROPERTY_HINT_GLOBAL_FILE, "html"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/head_include", PROPERTY_HINT_MULTILINE_TEXT), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "zip"), "")); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 3590c30579..e226ab6332 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -430,16 +430,11 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, // can't fulfil fullscreen request due to browser security video_mode.fullscreen = false; /* clang-format off */ - bool resize_canvas_on_start = EM_ASM_INT_V( - return Module.resizeCanvasOnStart; - ); - /* clang-format on */ - if (resize_canvas_on_start) { + if (EM_ASM_INT_V({ return Module.resizeCanvasOnStart })) { + /* clang-format on */ set_window_size(Size2(video_mode.width, video_mode.height)); } else { - Size2 canvas_size = get_window_size(); - video_mode.width = canvas_size.width; - video_mode.height = canvas_size.height; + set_window_size(get_window_size()); } char locale_ptr[16]; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 5736ae1585..9e22e8aaac 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -588,7 +588,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) mb->set_position(Vector2(old_x, old_y)); } - if (uMsg != WM_MOUSEWHEEL) { + if (uMsg != WM_MOUSEWHEEL && uMsg != WM_MOUSEHWHEEL) { if (mb->is_pressed()) { if (++pressrc > 0) |