From a3179aa8fcfa511125a49adba8b3573b9490714a Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Thu, 17 Sep 2020 15:04:51 +0200 Subject: [PATCH] Disable WebGL2, window maximize in editor builds. --- platform/javascript/os_javascript.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 1ee5649ab50..21025a1dea1 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -176,6 +176,7 @@ Size2 OS_JavaScript::get_window_size() const { void OS_JavaScript::set_window_maximized(bool p_enabled) { +#ifndef TOOLS_ENABLED if (video_mode.fullscreen) { window_maximized = p_enabled; set_window_fullscreen(false); @@ -193,6 +194,7 @@ void OS_JavaScript::set_window_maximized(bool p_enabled) { emscripten_enter_soft_fullscreen(canvas_id.utf8().get_data(), &strategy); window_maximized = p_enabled; } +#endif } bool OS_JavaScript::is_window_maximized() const { @@ -942,10 +944,14 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, set_window_per_pixel_transparency_enabled(true); } +#ifdef TOOLS_ENABLED + bool gles3 = false; +#else bool gles3 = true; if (p_video_driver == VIDEO_DRIVER_GLES2) { gles3 = false; } +#endif bool gl_initialization_error = false;