summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2017-05-09 13:57:07 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2017-05-09 15:05:47 +0200
commit3b123367a1202e62f31d24e54c8280a97f00aa97 (patch)
treeadf68a7fde5329cd2eff19d39ef3e6fa47af4f11
parent98eb58a93cb34f42e42e6ee4f9f74fc15d4e9d85 (diff)
Display remote_host/port in network->debug settings
-rw-r--r--editor/editor_export.cpp6
-rw-r--r--editor/editor_run.cpp2
-rw-r--r--editor/editor_settings.cpp10
3 files changed, 11 insertions, 7 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 3774c8d4c3..cb1b958cca 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -210,7 +210,7 @@ EditorExportPreset::EditorExportPreset() {
void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug_host");
+ String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
host = "localhost";
@@ -620,7 +620,7 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, co
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug_host");
+ String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
host = "localhost";
@@ -2108,7 +2108,7 @@ static int _get_pad(int p_alignment, int p_n) {
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug_host");
+ String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (p_flags&EXPORT_REMOTE_DEBUG_LOCALHOST)
host="localhost";
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 12bfd9bc50..e0ebe985cd 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -41,7 +41,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
List<String> args;
String resource_path = GlobalConfig::get_singleton()->get_resource_path();
- String remote_host = EditorSettings::get_singleton()->get("network/debug_host");
+ String remote_host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (resource_path != "") {
args.push_back("-path");
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index f70f34af4c..b69bf59fea 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -407,7 +407,8 @@ void EditorSettings::setup_network() {
IP::get_singleton()->get_local_addresses(&local_ip);
String lip;
String hint;
- String current = has("network/debug_host") ? get("network/debug_host") : "";
+ String current = has("network/debug/remote_host") ? get("network/debug/remote_host") : "";
+ int port = has("network/debug/remote_port") ? (int)get("network/debug/remote_port") : 6007;
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
@@ -422,8 +423,11 @@ void EditorSettings::setup_network() {
hint += ip;
}
- set("network/debug_host", lip);
- add_property_hint(PropertyInfo(Variant::STRING, "network/debug_host", PROPERTY_HINT_ENUM, hint));
+ set("network/debug/remote_host", lip);
+ add_property_hint(PropertyInfo(Variant::STRING, "network/debug/remote_host", PROPERTY_HINT_ENUM, hint));
+
+ set("network/debug/remote_port", port);
+ add_property_hint(PropertyInfo(Variant::INT, "network/debug/remote_port", PROPERTY_HINT_RANGE, "1,65535,1"));
}
void EditorSettings::save() {