diff options
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/api/javascript_tools_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | platform/javascript/export/export.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/platform/javascript/api/javascript_tools_editor_plugin.cpp b/platform/javascript/api/javascript_tools_editor_plugin.cpp index ac4e6a1256..b35ccd087f 100644 --- a/platform/javascript/api/javascript_tools_editor_plugin.cpp +++ b/platform/javascript/api/javascript_tools_editor_plugin.cpp @@ -72,7 +72,7 @@ void JavaScriptToolsEditorPlugin::_download_zip(Variant p_v) { FileAccess *f = FileAccess::open("/tmp/project.zip", FileAccess::READ); ERR_FAIL_COND_MSG(!f, "Unable to create zip file"); Vector<uint8_t> buf; - buf.resize(f->get_len()); + buf.resize(f->get_length()); f->get_buffer(buf.ptrw(), buf.size()); godot_js_os_download_buffer(buf.ptr(), buf.size(), "project.zip", "application/zip"); } @@ -84,7 +84,7 @@ void JavaScriptToolsEditorPlugin::_zip_file(String p_path, String p_base_path, z return; } Vector<uint8_t> data; - uint64_t len = f->get_len(); + uint64_t len = f->get_length(); data.resize(len); f->get_buffer(data.ptrw(), len); f->close(); diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index e398072312..5096285e33 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -547,7 +547,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> & EditorNode::get_singleton()->show_warning(TTR("Could not read file:") + "\n" + sw_path); return ERR_FILE_CANT_READ; } - sw.resize(f->get_len()); + sw.resize(f->get_length()); f->get_buffer(sw.ptrw(), sw.size()); memdelete(f); f = nullptr; @@ -651,7 +651,7 @@ void EditorExportPlatformJavaScript::get_export_options(List<ExportOption> *r_op r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/experimental_virtual_keyboard"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "progressive_web_app/enabled"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/offline_page", PROPERTY_HINT_FILE, "*.html"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "progressive_web_app/display", PROPERTY_HINT_ENUM, "Fullscreen,Standalone,Minimal Ui,Browser"), 1)); + r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "progressive_web_app/display", PROPERTY_HINT_ENUM, "Fullscreen,Standalone,Minimal UI,Browser"), 1)); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "progressive_web_app/orientation", PROPERTY_HINT_ENUM, "Any,Landscape,Portrait"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_144x144", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "progressive_web_app/icon_180x180", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz"), "")); @@ -781,13 +781,13 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese FileAccess *f = nullptr; f = FileAccess::open(pck_path, FileAccess::READ); if (f) { - file_sizes[pck_path.get_file()] = (uint64_t)f->get_len(); + file_sizes[pck_path.get_file()] = (uint64_t)f->get_length(); memdelete(f); f = nullptr; } f = FileAccess::open(base_path + ".wasm", FileAccess::READ); if (f) { - file_sizes[base_name + ".wasm"] = (uint64_t)f->get_len(); + file_sizes[base_name + ".wasm"] = (uint64_t)f->get_length(); memdelete(f); f = nullptr; } @@ -800,7 +800,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese EditorNode::get_singleton()->show_warning(TTR("Could not read HTML shell:") + "\n" + html_path); return ERR_FILE_CANT_READ; } - html.resize(f->get_len()); + html.resize(f->get_length()); f->get_buffer(html.ptrw(), html.size()); memdelete(f); f = nullptr; |