mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #109987 from van800/shakhov/dap-devices
Refactor debugging on a device with DAP - now possible with all device types
This commit is contained in:
commit
afa07c1a76
6 changed files with 39 additions and 42 deletions
|
|
@ -142,10 +142,20 @@ void EditorExport::remove_export_platform(const Ref<EditorExportPlatform> &p_pla
|
|||
should_reload_presets = true;
|
||||
}
|
||||
|
||||
int EditorExport::get_export_platform_count() {
|
||||
int EditorExport::get_export_platform_count() const {
|
||||
return export_platforms.size();
|
||||
}
|
||||
|
||||
int EditorExport::get_export_platform_index_by_name(const String &p_name) {
|
||||
for (int j = 0; j < get_export_platform_count(); j++) {
|
||||
Ref<EditorExportPlatform> plat = get_export_platform(j);
|
||||
if (!plat.is_null() && plat->get_name().nocasecmp_to(p_name) == 0) {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Ref<EditorExportPlatform> EditorExport::get_export_platform(int p_idx) {
|
||||
ERR_FAIL_INDEX_V(p_idx, export_platforms.size(), Ref<EditorExportPlatform>());
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,14 @@ protected:
|
|||
public:
|
||||
static EditorExport *get_singleton() { return singleton; }
|
||||
|
||||
// Encodes a platform/device pair into a single menu/device id and decodes it back.
|
||||
static int encode_platform_device_id(int p_platform_idx, int p_device_idx) { return p_platform_idx * 10000 + p_device_idx; }
|
||||
static int decode_platform_from_id(int p_id) { return p_id / 10000; }
|
||||
static int decode_device_from_id(int p_id) { return p_id % 10000; }
|
||||
|
||||
void add_export_platform(const Ref<EditorExportPlatform> &p_platform);
|
||||
int get_export_platform_count();
|
||||
int get_export_platform_count() const;
|
||||
int get_export_platform_index_by_name(const String &p_name);
|
||||
Ref<EditorExportPlatform> get_export_platform(int p_idx);
|
||||
void remove_export_platform(const Ref<EditorExportPlatform> &p_platform);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue