|
@@ -79,6 +79,11 @@ void EditorRunNative::_notification(int p_what) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void EditorRunNative::_confirm_run_native() {
|
|
|
+ run_confirmed = true;
|
|
|
+ resume_run_native();
|
|
|
+}
|
|
|
+
|
|
|
Error EditorRunNative::start_run_native(int p_id) {
|
|
|
if (p_id < 0) {
|
|
|
return OK;
|
|
@@ -86,9 +91,9 @@ Error EditorRunNative::start_run_native(int p_id) {
|
|
|
|
|
|
int platform = p_id / 10000;
|
|
|
int idx = p_id % 10000;
|
|
|
+ resume_id = p_id;
|
|
|
|
|
|
if (!EditorNode::get_singleton()->ensure_main_scene(true)) {
|
|
|
- resume_id = p_id;
|
|
|
return OK;
|
|
|
}
|
|
|
|
|
@@ -110,6 +115,22 @@ Error EditorRunNative::start_run_native(int p_id) {
|
|
|
return ERR_UNAVAILABLE;
|
|
|
}
|
|
|
|
|
|
+ String architecture = eep->get_device_architecture(idx);
|
|
|
+ if (!run_confirmed && !architecture.is_empty()) {
|
|
|
+ String preset_arch = "architectures/" + architecture;
|
|
|
+ bool is_arch_enabled = preset->get(preset_arch);
|
|
|
+
|
|
|
+ if (!is_arch_enabled) {
|
|
|
+ String warning_message = vformat(TTR("Warning: The CPU architecture '%s' is not active in your export preset.\n\n"), Variant(architecture));
|
|
|
+ warning_message += TTR("Run 'Remote Debug' anyway?");
|
|
|
+
|
|
|
+ run_native_confirm->set_text(warning_message);
|
|
|
+ run_native_confirm->popup_centered();
|
|
|
+ return OK;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ run_confirmed = false;
|
|
|
+
|
|
|
emit_signal(SNAME("native_run"), preset);
|
|
|
|
|
|
int flags = 0;
|
|
@@ -174,5 +195,9 @@ EditorRunNative::EditorRunNative() {
|
|
|
add_child(result_dialog);
|
|
|
result_dialog->hide();
|
|
|
|
|
|
+ run_native_confirm = memnew(ConfirmationDialog);
|
|
|
+ add_child(run_native_confirm);
|
|
|
+ run_native_confirm->connect("confirmed", callable_mp(this, &EditorRunNative::_confirm_run_native));
|
|
|
+
|
|
|
set_process(true);
|
|
|
}
|