From 7474fc133a268eae12b7b89307cb0482e3781820 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 11 Jan 2017 16:52:21 -0300 Subject: Editor settings file is now versioned --- tools/editor/editor_settings.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index ef2aaeda53..526144754d 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -47,6 +47,9 @@ #include "io/compression.h" #include "os/keyboard.h" + +# + Ref EditorSettings::singleton=NULL; EditorSettings *EditorSettings::get_singleton() { @@ -240,6 +243,7 @@ void EditorSettings::create() { String exe_path = OS::get_singleton()->get_executable_path().get_base_dir(); DirAccess* d = DirAccess::create_for_path(exe_path); + if (d->file_exists(exe_path + "/._sc_")) { // editor is self contained @@ -325,11 +329,11 @@ void EditorSettings::create() { // path at least is validated, so validate config file - config_file_path = config_path+"/"+config_dir+"/editor_config.tres"; + config_file_path = config_path+"/"+config_dir+"/editor_settings-3.tres"; String open_path = config_file_path; - if (!dir->file_exists("editor_config.tres")) { + if (!dir->file_exists("editor_settings-3.tres")) { goto fail; } -- cgit v1.2.3