This commit is contained in:
Eduardo Bart
2011-03-20 18:46:57 -03:00
4 changed files with 54 additions and 27 deletions

View File

@@ -71,10 +71,13 @@ int main(int argc, const char *argv[])
signal(SIGTERM, signal_handler);
signal(SIGINT, signal_handler);
// init platform stuff
Platform::init("OTClient");
// init resources
g_resources.init(argv[0]);
if(g_resources.setWriteDir(Platform::getAppUserDir("OTClient")))
g_resources.addToSearchPath(Platform::getAppUserDir("OTClient"));
if(g_resources.setWriteDir(Platform::getAppUserDir()))
g_resources.addToSearchPath(Platform::getAppUserDir());
g_resources.addToSearchPath("data");
// before loading configurations set the default ones
@@ -86,9 +89,6 @@ int main(int argc, const char *argv[])
notice("OTClient 0.1.0");
// init platform stuff
Platform::init();
// create the window
Platform::createWindow(g_config.getInteger("window x"), g_config.getInteger("window y"),
g_config.getInteger("window width"), g_config.getInteger("window height"),