diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/application.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/application.cc b/src/core/application.cc index 4d1ef86..5cf4d66 100644 --- a/src/core/application.cc +++ b/src/core/application.cc @@ -139,7 +139,7 @@ void Application::init(int count, char **arguments) con_debug << "Debug messages enabled\n"; con_print << "^BInitializing core...\n"; - filesystem::init(); + filesystem::init("base", ""); CommandBuffer::init(); @@ -328,7 +328,7 @@ void Application::frame(float seconds) void Application::save_config() { - std::string filename(filesystem::writedir); + std::string filename(filesystem::writedir()); if (!Cvar::sv_dedicated->value()) filename.append("client.cfg"); else @@ -350,15 +350,17 @@ void Application::save_config() ofs << "# this file is automaticly generated" << std::endl; for (Cvar::Registry::iterator it = Cvar::registry().begin(); it != Cvar::registry().end(); it++) { - if (((*it).second->flags() & Cvar::Archive) == Cvar::Archive) + if (((*it).second->flags() & Cvar::Archive) == Cvar::Archive) { + ofs << "# " << (*it).first << " " << (*it).second->info() << std::endl; ofs << "set " << (*it).first << " " << (*it).second->str() << std::endl; + } } ofs.close(); } void Application::load_config() { - std::string filename(filesystem::writedir); + std::string filename(filesystem::writedir()); if (!Cvar::sv_dedicated->value()) filename.append("client.cfg"); else @@ -387,7 +389,7 @@ void Application::load_autoexec() if (Cvar::sv_dedicated->value()) return; - std::string filename(filesystem::writedir); + std::string filename(filesystem::writedir()); filename.append("autoexec.cfg"); std::ifstream ifs(filename.c_str(), std::ifstream::in); |