summaryrefslogtreecommitdiffstats
path: root/editor/editor_run_native.cpp
diff options
context:
space:
mode:
authorEv1lbl0w <ricasubtil@gmail.com>2021-07-20 12:24:56 +0100
committerRicardo Subtil <ricasubtil@gmail.com>2021-08-31 15:17:58 +0100
commit292ed61c186f0c8416a0837f69817f747e4b5e26 (patch)
tree44a6082b0c596a1dc6142b38a5b3cf4f11bc512e /editor/editor_run_native.cpp
parentd8a8d32f2ef617944ceab77ecb519a9d8adc20b8 (diff)
downloadredot-engine-292ed61c186f0c8416a0837f69817f747e4b5e26.tar.gz
Implemented advanced features of DAP
Respect client "supportsVariableType" capability Implement "breakpointLocations" request Implement "restart" request Implement "evaluate" request Fix error messages not being shown, and improved wrong path message Removed thread option and behavior Implemented detailed inspection of complex variables Fix "const"ness of functions Added a configurable timeout for requests Implement Godot custom data request/event Implement syncing of breakpoints Added support for debugging native platforms
Diffstat (limited to 'editor/editor_run_native.cpp')
-rw-r--r--editor/editor_run_native.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index e115cd77e1..5828549bdc 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -52,8 +52,8 @@ void EditorRunNative::_notification(int p_what) {
small_icon.instantiate();
small_icon->create_from_image(im);
MenuButton *mb = memnew(MenuButton);
- mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::_run_native), varray(i));
- mb->connect("pressed", callable_mp(this, &EditorRunNative::_run_native), varray(-1, i));
+ mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native), varray(i));
+ mb->connect("pressed", callable_mp(this, &EditorRunNative::run_native), varray(-1, i));
mb->set_icon(small_icon);
add_child(mb);
menus[i] = mb;
@@ -93,22 +93,22 @@ void EditorRunNative::_notification(int p_what) {
}
}
-void EditorRunNative::_run_native(int p_idx, int p_platform) {
+Error EditorRunNative::run_native(int p_idx, int p_platform) {
if (!EditorNode::get_singleton()->ensure_main_scene(true)) {
resume_idx = p_idx;
resume_platform = p_platform;
- return;
+ return OK;
}
Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(p_platform);
- ERR_FAIL_COND(eep.is_null());
+ ERR_FAIL_COND_V(eep.is_null(), ERR_UNAVAILABLE);
if (p_idx == -1) {
if (eep->get_options_count() == 1) {
menus[p_platform]->get_popup()->hide();
p_idx = 0;
} else {
- return;
+ return ERR_INVALID_PARAMETER;
}
}
@@ -124,7 +124,7 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
if (preset.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("No runnable export preset found for this platform.\nPlease add a runnable preset in the Export menu or define an existing preset as runnable."));
- return;
+ return ERR_UNAVAILABLE;
}
emit_signal(SNAME("native_run"), preset);
@@ -149,11 +149,11 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_NAVIGATION;
}
- eep->run(preset, p_idx, flags);
+ return eep->run(preset, p_idx, flags);
}
void EditorRunNative::resume_run_native() {
- _run_native(resume_idx, resume_platform);
+ run_native(resume_idx, resume_platform);
}
void EditorRunNative::_bind_methods() {