diff --git a/src/session.cpp b/src/session.cpp index bb36a9ac..827ad88d 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -21,6 +21,11 @@ #include "game.h" #include "guiinterface.h" #include "tinyxml.h" +#include + +#ifdef _WIN32 +#include +#endif using namespace std; @@ -32,9 +37,24 @@ Session::Session(GuiInterface* g) : actualGame(0), myGui(g) // Session an mainwindowimpl bergeben myGui->setSession(this); - //Konfiguration erstellen; + // Konfiguration erstellen + string configFileName; +#ifdef _WIN32 + const char *appDataPath = getenv("AppData"); + if (appDataPath) + { + configFileName = appDataPath; + configFileName += "\\pokerth\\"; + mkdir(configFileName.c_str()); + } +#else + // hier Linux/Mac Code zur Basispfadbestimmung, z.B. + configFileName = "~/pokerth"; + // wenn nicht existiert, erzeugen! +#endif + configFileName += "config.xml"; }