mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-03-06 14:27:44 +00:00
Settings: Don't create deprecated achievement cache directories
This commit is contained in:
parent
c6d14febd2
commit
7ac3e2fe50
src/core
|
@ -125,7 +125,6 @@ template<typename... T>
|
||||||
static void ReportFmtError(fmt::format_string<T...> fmt, T&&... args);
|
static void ReportFmtError(fmt::format_string<T...> fmt, T&&... args);
|
||||||
template<typename... T>
|
template<typename... T>
|
||||||
static void ReportRCError(int err, fmt::format_string<T...> fmt, T&&... args);
|
static void ReportRCError(int err, fmt::format_string<T...> fmt, T&&... args);
|
||||||
static void EnsureCacheDirectoryExists();
|
|
||||||
static void ClearGameInfo();
|
static void ClearGameInfo();
|
||||||
static void ClearGameHash();
|
static void ClearGameHash();
|
||||||
static std::string GetGameHash(CDImage* image);
|
static std::string GetGameHash(CDImage* image);
|
||||||
|
@ -427,8 +426,6 @@ bool Achievements::Initialize()
|
||||||
if (IsUsingRAIntegration())
|
if (IsUsingRAIntegration())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
EnsureCacheDirectoryExists();
|
|
||||||
|
|
||||||
auto lock = GetLock();
|
auto lock = GetLock();
|
||||||
AssertMsg(g_settings.achievements_enabled, "Achievements are enabled");
|
AssertMsg(g_settings.achievements_enabled, "Achievements are enabled");
|
||||||
Assert(!s_client && !s_http_downloader);
|
Assert(!s_client && !s_http_downloader);
|
||||||
|
@ -562,9 +559,6 @@ void Achievements::UpdateSettings(const Settings& old_config)
|
||||||
if (g_settings.achievements_unofficial_test_mode != old_config.achievements_unofficial_test_mode)
|
if (g_settings.achievements_unofficial_test_mode != old_config.achievements_unofficial_test_mode)
|
||||||
rc_client_set_unofficial_enabled(s_client, g_settings.achievements_unofficial_test_mode);
|
rc_client_set_unofficial_enabled(s_client, g_settings.achievements_unofficial_test_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// in case cache directory changed
|
|
||||||
EnsureCacheDirectoryExists();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Achievements::Shutdown(bool allow_cancel)
|
bool Achievements::Shutdown(bool allow_cancel)
|
||||||
|
@ -609,16 +603,6 @@ bool Achievements::Shutdown(bool allow_cancel)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Achievements::EnsureCacheDirectoryExists()
|
|
||||||
{
|
|
||||||
Error error;
|
|
||||||
if (const std::string path = Path::Combine(EmuFolders::Cache, CACHE_SUBDIRECTORY_NAME);
|
|
||||||
!FileSystem::EnsureDirectoryExists(path.c_str(), false, &error))
|
|
||||||
{
|
|
||||||
ReportFmtError("Failed to create cache directory '{}': {}", CACHE_SUBDIRECTORY_NAME, error.GetDescription());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Achievements::ClientMessageCallback(const char* message, const rc_client_t* client)
|
void Achievements::ClientMessageCallback(const char* message, const rc_client_t* client)
|
||||||
{
|
{
|
||||||
DEV_LOG(message);
|
DEV_LOG(message);
|
||||||
|
|
|
@ -1982,8 +1982,7 @@ bool EmuFolders::EnsureFoldersExist()
|
||||||
{
|
{
|
||||||
bool result = FileSystem::EnsureDirectoryExists(Bios.c_str(), false);
|
bool result = FileSystem::EnsureDirectoryExists(Bios.c_str(), false);
|
||||||
result = FileSystem::EnsureDirectoryExists(Cache.c_str(), false) && result;
|
result = FileSystem::EnsureDirectoryExists(Cache.c_str(), false) && result;
|
||||||
result = FileSystem::EnsureDirectoryExists(Path::Combine(Cache, "achievement_badge").c_str(), false) && result;
|
result = FileSystem::EnsureDirectoryExists(Path::Combine(Cache, "achievement_images").c_str(), false) && result;
|
||||||
result = FileSystem::EnsureDirectoryExists(Path::Combine(Cache, "achievement_gameicon").c_str(), false) && result;
|
|
||||||
result = FileSystem::EnsureDirectoryExists(Cheats.c_str(), false) && result;
|
result = FileSystem::EnsureDirectoryExists(Cheats.c_str(), false) && result;
|
||||||
result = FileSystem::EnsureDirectoryExists(Covers.c_str(), false) && result;
|
result = FileSystem::EnsureDirectoryExists(Covers.c_str(), false) && result;
|
||||||
result = FileSystem::EnsureDirectoryExists(Dumps.c_str(), false) && result;
|
result = FileSystem::EnsureDirectoryExists(Dumps.c_str(), false) && result;
|
||||||
|
|
Loading…
Reference in a new issue