mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-10 01:59:02 +00:00
parent
ea116fbbdf
commit
2b811d8272
899 changed files with 3723 additions and 285 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue