diff options
author | Alexander Hartmann <alex.hart.278@gmail.com> | 2024-02-21 00:01:33 +0100 |
---|---|---|
committer | Alexander Hartmann <alex.hart.278@gmail.com> | 2024-02-23 01:37:32 +0100 |
commit | 293c34a2d20dc86f1962f7c41c2f3f33abf8abc3 (patch) | |
tree | edb20cf789f472102ab1b67e23d09492f833a72c /platform/android/export | |
parent | 1aab6e96b96af734d1fe5979d30d1a4232cb270d (diff) | |
download | redot-engine-293c34a2d20dc86f1962f7c41c2f3f33abf8abc3.tar.gz |
Display a warning if device CPU architecture is not active in the export preset.
Diffstat (limited to 'platform/android/export')
-rw-r--r-- | platform/android/export/export_plugin.cpp | 9 | ||||
-rw-r--r-- | platform/android/export/export_plugin.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 28ab8e3335..471fda74bf 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -379,7 +379,8 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { } else if (p.begins_with("ro.build.version.sdk=")) { d.api_level = p.get_slice("=", 1).to_int(); } else if (p.begins_with("ro.product.cpu.abi=")) { - d.description += "CPU: " + p.get_slice("=", 1).strip_edges() + "\n"; + d.architecture = p.get_slice("=", 1).strip_edges(); + d.description += "CPU: " + d.architecture + "\n"; } else if (p.begins_with("ro.product.manufacturer=")) { d.description += "Manufacturer: " + p.get_slice("=", 1).strip_edges() + "\n"; } else if (p.begins_with("ro.board.platform=")) { @@ -1992,6 +1993,12 @@ String EditorExportPlatformAndroid::get_option_tooltip(int p_index) const { return s; } +String EditorExportPlatformAndroid::get_device_architecture(int p_index) const { + ERR_FAIL_INDEX_V(p_index, devices.size(), ""); + MutexLock lock(device_lock); + return devices[p_index].architecture; +} + Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) { ERR_FAIL_INDEX_V(p_device, devices.size(), ERR_INVALID_PARAMETER); diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h index e25655c6cc..b968302449 100644 --- a/platform/android/export/export_plugin.h +++ b/platform/android/export/export_plugin.h @@ -76,6 +76,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { String name; String description; int api_level = 0; + String architecture; }; struct APKExportData { @@ -221,6 +222,8 @@ public: virtual String get_option_tooltip(int p_index) const override; + virtual String get_device_architecture(int p_index) const override; + virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) override; virtual Ref<Texture2D> get_run_icon() const override; |