diff options
| author | volzhs | 2016-06-24 21:20:43 +0900 |
|---|---|---|
| committer | volzhs | 2016-06-24 21:20:43 +0900 |
| commit | 3dd4cf3fed549820bdfcf04647fd21636de1b33b (patch) | |
| tree | 93825d90f9bb32e772789e1d201c0ec80b0f41b2 /tools/editor/editor_node.cpp | |
| parent | 9e0b6057e74181635bf3732879313d3d82bcfd93 (diff) | |
| download | godot-3dd4cf3fed549820bdfcf04647fd21636de1b33b.tar.gz godot-3dd4cf3fed549820bdfcf04647fd21636de1b33b.tar.zst godot-3dd4cf3fed549820bdfcf04647fd21636de1b33b.zip | |
Fix autosave when run on remote device
Fix #5367
Diffstat (limited to 'tools/editor/editor_node.cpp')
| -rw-r--r-- | tools/editor/editor_node.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 0f8ddafb2..a8118c2ba 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -2639,11 +2639,16 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } break; case RUN_PLAY_NATIVE: { - _menu_option_confirm(RUN_STOP,true); - emit_signal("play_pressed"); - editor_run.run_native_notify(); - - + + bool autosave = EDITOR_DEF("run/auto_save_before_running",true); + if (autosave) { + _menu_option_confirm(FILE_SAVE_SCENE, false); + } + if (run_native->is_deploy_debug_remote_enabled()){ + _menu_option_confirm(RUN_STOP,true); + emit_signal("play_pressed"); + editor_run.run_native_notify(); + } } break; case RUN_SCENE_SETTINGS: { |
