[Change] Use a config file from home directory.

This commit is contained in:
Allanis 2013-06-02 16:28:37 +01:00
parent 7261454fbc
commit 28e936b828

View File

@ -75,6 +75,8 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine,
int main(int argc, char** argv) {
#endif
char buf[PATH_MAX];
// Print the version.
snprintf(version, VERSION_LEN, "%d.%d.%d", VMAJOR, VMINOR, VREV);
LOG(" "APPNAME" v%s", version);
@ -90,8 +92,9 @@ int main(int argc, char** argv) {
WARN("Unable to create lephisto directory '%s'", lfile_basePath());
// Set the configuration.
snprintf(buf, PATH_MAX, "%s"CONF_FILE, lfile_basePath());
conf_setDefaults(); // Default config values.
conf_loadConfig(CONF_FILE); // Have Lua parse config.
conf_loadConfig(buf); // Have Lua parse config.
conf_parseCLI(argc, argv); // Parse CLI arguments.
// Load the data basics.