Windows save path bug fix.
This commit is contained in:
parent
3f100a0848
commit
b5bafa1b1e
|
@ -25,7 +25,7 @@ void createSaveFolder(void)
|
|||
char *userHome;
|
||||
char dir[MAX_FILENAME_LENGTH];
|
||||
|
||||
userHome = getenv("USERNAME");
|
||||
userHome = getenv("USERPROFILE");
|
||||
|
||||
if (!userHome)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ void createSaveFolder(void)
|
|||
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "User home = %s", userHome);
|
||||
|
||||
sprintf(dir, "%s/tbftss", userHome);
|
||||
sprintf(dir, "%s\\tbftss", userHome);
|
||||
if (mkdir(dir) != 0 && errno != EEXIST)
|
||||
{
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to create save dir '%s'. Will save to current dir.", dir);
|
||||
|
|
Loading…
Reference in New Issue