diff options
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/export/export.cpp | 9 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 5704433650..487da77b10 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -114,6 +114,9 @@ void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportP r_features->push_back("etc"); } else if (driver == "GLES3") { r_features->push_back("etc2"); + if (ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2")) { + r_features->push_back("etc"); + } } } } @@ -211,6 +214,10 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese template_path = find_export_template(EXPORT_TEMPLATE_WEBASSEMBLY_RELEASE); } + if (!DirAccess::exists(p_path.get_base_dir())) { + return ERR_FILE_BAD_PATH; + } + if (template_path != String() && !FileAccess::exists(template_path)) { EditorNode::get_singleton()->show_warning(TTR("Template file not found:") + "\n" + template_path); return ERR_FILE_NOT_FOUND; @@ -360,7 +367,7 @@ Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_prese if (err) { return err; } - OS::get_singleton()->shell_open(path); + OS::get_singleton()->shell_open(String("file://") + path); return OK; } diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 57ae1b6e26..34781ce365 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -829,7 +829,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, RasterizerGLES3::make_current(); break; } else { - if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") { + if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) { p_video_driver = VIDEO_DRIVER_GLES2; gles3 = false; continue; |