Skip to content

Commit

Permalink
Disable WebGL2, window maximize in editor builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Faless committed Oct 14, 2020
1 parent 0452c2f commit a3179aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform/javascript/os_javascript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit a3179aa

Please sign in to comment.