From 28e936b828dcdc7e4d89d130d46020f8da04a118 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Sun, 2 Jun 2013 16:28:37 +0100
Subject: [PATCH] [Change] Use a config file from home directory.

---
 src/lephisto.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lephisto.c b/src/lephisto.c
index 0d1e035..a0d6c2c 100644
--- a/src/lephisto.c
+++ b/src/lephisto.c
@@ -74,7 +74,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine,
 #else
 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.