Skip to content

Commit

Permalink
On linux, save config file in HOME dir
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Oct 29, 2013
1 parent 9fd245f commit e4ba442
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/files/config.cpp
Expand Up @@ -67,7 +67,11 @@ void SaveConfig(void)
sprintf(extension, "PROTCFGF");
Status_Box("Saving 'ptk.cfg'...");

#ifdef __linux__
sprintf(FileName, "%s/.ptk.cfg", getenv("HOME"));
#else
sprintf(FileName, "%s"SLASH"ptk.cfg", ExePath);
#endif

memset(KeyboardName, 0, sizeof(KeyboardName));
sprintf(KeyboardName, "%s", Keyboard_Name);
Expand Down Expand Up @@ -170,7 +174,11 @@ void LoadConfig(void)
char Win_Coords[64];
SDL_Surface *Desktop = NULL;

#ifdef __linux__
sprintf(FileName, "%s/.ptk.cfg", getenv("HOME"));
#else
sprintf(FileName, "%s"SLASH"ptk.cfg", ExePath);
#endif

memset(KeyboardName, 0, sizeof(KeyboardName));

Expand Down

0 comments on commit e4ba442

Please sign in to comment.