summaryrefslogtreecommitdiff
path: root/project-base/src/windows
diff options
context:
space:
mode:
Diffstat (limited to 'project-base/src/windows')
-rw-r--r--project-base/src/windows/platform.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/project-base/src/windows/platform.c b/project-base/src/windows/platform.c
index 119e08e..6e2c9b9 100644
--- a/project-base/src/windows/platform.c
+++ b/project-base/src/windows/platform.c
@@ -307,6 +307,19 @@ void platform_create_config_directory(char *directory)
}
}
+char* platform_get_save_location(char *buffer, char *directory)
+{
+ if(SUCCEEDED(SHGetFolderPathA(0, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, buffer)))
+ {
+ string_appendn(buffer, "\\", MAX_INPUT_LENGTH);
+ string_appendn(buffer, directory, MAX_INPUT_LENGTH);
+ string_appendn(buffer, "\\", MAX_INPUT_LENGTH);
+ return buffer;
+ }
+
+ return 0;
+}
+
char* platform_get_config_save_location(char *buffer, char *directory)
{
if(SUCCEEDED(SHGetFolderPathA(0, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, buffer)))
@@ -1298,6 +1311,7 @@ bool platform_write_file_content(char *path, const char *mode, char *buffer, s32
//done:
fclose(file);
+ return true;
done_failure:
return result;
}