summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar freiro2016-11-24 16:42:31 +0100
committerGravatar freiro2016-11-24 16:42:31 +0100
commit79317b63d9c509bae2457c7c52ea3b1e71c07ea0 (patch)
tree748391a0c05039605f1dff09a11561978258c71f /src
parentReturn by value and other fixes (diff)
downloadyuzu-79317b63d9c509bae2457c7c52ea3b1e71c07ea0.tar.gz
yuzu-79317b63d9c509bae2457c7c52ea3b1e71c07ea0.tar.xz
yuzu-79317b63d9c509bae2457c7c52ea3b1e71c07ea0.zip
Switch to AppData/Roaming
Diffstat (limited to '')
-rw-r--r--src/common/file_util.cpp6
-rw-r--r--src/common/file_util.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index a1c12cbce..6661fe96a 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -598,10 +598,10 @@ std::string& GetExeDirectory() {
598 return exe_path; 598 return exe_path;
599} 599}
600 600
601std::string AppDataLocalDirectory() { 601std::string AppDataRoamingDirectory() {
602 PWSTR pw_local_path = nullptr; 602 PWSTR pw_local_path = nullptr;
603 // Only supported by Windows Vista or later 603 // Only supported by Windows Vista or later
604 SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &pw_local_path); 604 SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &pw_local_path);
605 std::string local_path = Common::UTF16ToUTF8(pw_local_path); 605 std::string local_path = Common::UTF16ToUTF8(pw_local_path);
606 CoTaskMemFree(pw_local_path); 606 CoTaskMemFree(pw_local_path);
607 return local_path; 607 return local_path;
@@ -685,7 +685,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new
685 paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP; 685 paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
686 if (!FileUtil::IsDirectory(paths[D_USER_IDX])) { 686 if (!FileUtil::IsDirectory(paths[D_USER_IDX])) {
687 paths[D_USER_IDX] = 687 paths[D_USER_IDX] =
688 AppDataLocalDirectory() + DIR_SEP EMU_DATA_DIR DIR_SEP USERDATA_DIR DIR_SEP; 688 AppDataRoamingDirectory() + DIR_SEP EMU_DATA_DIR DIR_SEP USERDATA_DIR DIR_SEP;
689 } 689 }
690 690
691 paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP; 691 paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
diff --git a/src/common/file_util.h b/src/common/file_util.h
index 4c5ab676e..ac58607c5 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -154,7 +154,7 @@ std::string GetBundleDirectory();
154 154
155#ifdef _WIN32 155#ifdef _WIN32
156std::string& GetExeDirectory(); 156std::string& GetExeDirectory();
157std::string AppDataLocalDirectory(); 157std::string AppDataRoamingDirectory();
158#endif 158#endif
159 159
160size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename); 160size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename);