summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormasoud bh <masoud.bh@chmail.ir>2015-11-15 01:13:14 +0330
committermasoudbh3 <masoudbh3@gmail.com>2015-11-20 12:47:55 +0330
commit6f718228d4798352cef3c4a55ee10a811e4fa187 (patch)
tree858741e2e2f78fc73bfa424620953da340be86a2 /core
parent85eedffbc77d9bdd92c8851aea09146feaf2d843 (diff)
Load binaryname.pck
if not found data.pck search for binaryname.pck in linux and windows
Diffstat (limited to 'core')
-rw-r--r--core/globals.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/globals.cpp b/core/globals.cpp
index ffd4cf5d5e..a4a5245f0b 100644
--- a/core/globals.cpp
+++ b/core/globals.cpp
@@ -332,6 +332,7 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) {
String candidate = d->get_current_dir();
String current_dir = d->get_current_dir();
+ String exec_name = OS::get_singleton()->get_executable_path().get_file().basename();
bool found = false;
bool first_time=true;
@@ -348,6 +349,15 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) {
}
break;
+ } else if (first_time && (_load_resource_pack(current_dir+"/"+exec_name+".pck") || _load_resource_pack(current_dir+"/"+exec_name+".pcz") )) {
+ if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) {
+
+ _load_settings("res://override.cfg");
+ found=true;
+
+
+ }
+ break;
} else if (_load_settings(current_dir+"/engine.cfg")==OK || _load_settings_binary(current_dir+"/engine.cfb")==OK) {
_load_settings(current_dir+"/override.cfg");