Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-01 19:57:03 +0000
committerStijn Buys <ingar@osirion.org>2008-08-01 19:57:03 +0000
commit089cb5f96e400d4ab7c9d8041cb51eb8f118d9c1 (patch)
tree9799137f41d5104ed4911ac5774f9f50406581d9 /src/core
parentcc335cfbf13a6b21c5f65febc6049eb5d4c16b63 (diff)
initial make install support
Diffstat (limited to 'src/core')
-rw-r--r--src/core/application.cc12
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);