more stuff (#1)

Co-authored-by: JosJuice <josjuice@gmail.com>
This commit is contained in:
Nora 2022-02-28 18:48:25 -05:00 committed by GitHub
commit 2b811d8272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
899 changed files with 3723 additions and 285 deletions

View file

@ -269,17 +269,8 @@ void SetUserDirectory(std::string custom_path)
// Get Documents path in case we need it.
// TODO: Maybe use WIL when it's available?
PWSTR my_documents = nullptr;
bool my_documents_found =
SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, KF_FLAG_DEFAULT, nullptr, &my_documents));
if (local) // Case 1-2
user_path = File::GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
else if (configPath) // Case 3
user_path = TStrToUTF8(configPath.get());
else if (my_documents_found) // Case 4
user_path = TStrToUTF8(my_documents) + DIR_SEP "Dolphin Emulator" DIR_SEP;
else // Case 5
user_path = File::GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
user_path = File::GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
CoTaskMemFree(my_documents);
#else