UICommon: Remove Steam user directory logic

This commit is contained in:
OatmealDome 2024-08-15 12:37:57 -04:00
parent 8a93620d06
commit f10f08d1c2
2 changed files with 0 additions and 34 deletions

View File

@ -11,7 +11,6 @@
#define ROOT_DIR "." #define ROOT_DIR "."
// The normal user directory // The normal user directory
#ifndef STEAM
#ifdef _WIN32 #ifdef _WIN32
#define NORMAL_USER_DIR "Dolphin Emulator" #define NORMAL_USER_DIR "Dolphin Emulator"
#elif defined(__APPLE__) #elif defined(__APPLE__)
@ -21,15 +20,6 @@
#else #else
#define NORMAL_USER_DIR "dolphin-emu" #define NORMAL_USER_DIR "dolphin-emu"
#endif #endif
#else // ifndef STEAM
#ifdef _WIN32
#define NORMAL_USER_DIR "Dolphin Emulator (Steam)"
#elif defined(__APPLE__)
#define NORMAL_USER_DIR "Library/Application Support/Dolphin (Steam)"
#else
#define NORMAL_USER_DIR "dolphin-emu-steam"
#endif
#endif
// The portable user directory // The portable user directory
#ifdef _WIN32 #ifdef _WIN32

View File

@ -308,21 +308,12 @@ void SetUserDirectory(std::string custom_path)
// -> Use AppData\Roaming\Dolphin Emulator as the User directory path // -> Use AppData\Roaming\Dolphin Emulator as the User directory path
// 6. Default // 6. Default
// -> Use GetExeDirectory()\User // -> Use GetExeDirectory()\User
//
// On Steam builds, we take a simplified approach:
// 1. GetExeDirectory()\portable.txt exists
// -> Use GetExeDirectory()\User
// 2. AppData\Roaming exists
// -> Use AppData\Roaming\Dolphin Emulator (Steam) as the User directory path
// 3. Default
// -> Use GetExeDirectory()\User
// Get AppData path in case we need it. // Get AppData path in case we need it.
wil::unique_cotaskmem_string appdata; wil::unique_cotaskmem_string appdata;
bool appdata_found = SUCCEEDED( bool appdata_found = SUCCEEDED(
SHGetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_DEFAULT, nullptr, appdata.put())); SHGetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_DEFAULT, nullptr, appdata.put()));
#ifndef STEAM
// Check our registry keys // Check our registry keys
wil::unique_hkey hkey; wil::unique_hkey hkey;
DWORD local = 0; DWORD local = 0;
@ -389,21 +380,6 @@ void SetUserDirectory(std::string custom_path)
{ {
user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP; user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
} }
#else // ifndef STEAM
if (File::Exists(File::GetExeDirectory() + DIR_SEP "portable.txt")) // Case 1
{
user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
}
else if (appdata_found) // Case 2
{
user_path = TStrToUTF8(appdata.get()) + DIR_SEP NORMAL_USER_DIR DIR_SEP;
}
else // Case 3
{
user_path = File::GetExeDirectory() + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
}
#endif
#else #else
if (File::IsDirectory(ROOT_DIR DIR_SEP EMBEDDED_USER_DIR)) if (File::IsDirectory(ROOT_DIR DIR_SEP EMBEDDED_USER_DIR))
{ {