diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-13 18:00:18 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-13 18:00:18 +0100 |
commit | 3dffe0b967e1fe1b5407bc02e3308748865ee21d (patch) | |
tree | cd923cc48249a7a53d3cad987ea25ec6af7cdaf7 /platform/android/export | |
parent | 3c9bf4bc210a8e6a208f30ca59de4d4d7e18c04d (diff) | |
parent | cebefc9f5d26bc5207e6ba399e67a82f76216f13 (diff) |
Merge pull request #63312 from bruvzg/one_click
[Export] Add one-click deploy over SSH for the desktop exports.
Diffstat (limited to 'platform/android/export')
-rw-r--r-- | platform/android/export/export_plugin.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index a602cc7926..bb1ad3d83b 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -43,10 +43,16 @@ #include "editor/editor_log.h" #include "editor/editor_node.h" #include "editor/editor_paths.h" +#include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "main/splash.gen.h" -#include "platform/android/logo.gen.h" -#include "platform/android/run_icon.gen.h" +#include "platform/android/logo_svg.gen.h" +#include "platform/android/run_icon_svg.gen.h" + +#include "modules/modules_enabled.gen.h" // For svg. +#ifdef MODULE_SVG_ENABLED +#include "modules/svg/image_loader_svg.h" +#endif #include <string.h> @@ -3238,8 +3244,17 @@ void EditorExportPlatformAndroid::resolve_platform_feature_priorities(const Ref< } EditorExportPlatformAndroid::EditorExportPlatformAndroid() { - logo = ImageTexture::create_from_image(memnew(Image(_android_logo))); - run_icon = ImageTexture::create_from_image(memnew(Image(_android_run_icon))); +#ifdef MODULE_SVG_ENABLED + Ref<Image> img = memnew(Image); + const bool upsample = !Math::is_equal_approx(Math::round(EDSCALE), EDSCALE); + + ImageLoaderSVG img_loader; + img_loader.create_image_from_string(img, _android_logo_svg, EDSCALE, upsample, false); + logo = ImageTexture::create_from_image(img); + + img_loader.create_image_from_string(img, _android_run_icon_svg, EDSCALE, upsample, false); + run_icon = ImageTexture::create_from_image(img); +#endif devices_changed.set(); plugins_changed.set(); |