From bd388fc094fc9fa948f240857012389efb004e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 22 Jan 2024 10:08:50 +0100 Subject: [PATCH] Add some comments and logging --- Core/Util/GameManager.cpp | 1 - UI/GameInfoCache.cpp | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/Util/GameManager.cpp b/Core/Util/GameManager.cpp index bd678f355c..5140357d78 100644 --- a/Core/Util/GameManager.cpp +++ b/Core/Util/GameManager.cpp @@ -134,7 +134,6 @@ void GameManager::UninstallGame(const std::string &name) { AndroidJNIThreadContext context; // Destructor detaches. Path gameDir = GetSysDirectory(DIRECTORY_GAME) / name; - auto st = GetI18NCategory(I18NCat::STORE); INFO_LOG(HLE, "Uninstalling '%s'", gameDir.c_str()); diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 1b7a166487..80beb1d5e4 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -74,6 +74,7 @@ bool GameInfo::Delete() { { // Just delete the one file (TODO: handle two-disk games as well somehow). Path fileToRemove = filePath_; + INFO_LOG(SYSTEM, "Deleting file %s", fileToRemove.c_str()); File::Delete(fileToRemove); g_Config.RemoveRecent(filePath_.ToString()); return true; @@ -83,7 +84,7 @@ bool GameInfo::Delete() { { // TODO: This could be handled by Core/Util/GameManager too somehow. Path directoryToRemove = ResolvePBPDirectory(filePath_); - INFO_LOG(SYSTEM, "Deleting %s", directoryToRemove.c_str()); + INFO_LOG(SYSTEM, "Deleting directory %s", directoryToRemove.c_str()); if (!File::DeleteDirRecursively(directoryToRemove)) { ERROR_LOG(SYSTEM, "Failed to delete file"); return false; @@ -101,6 +102,7 @@ bool GameInfo::Delete() { case IdentifiedFileType::PPSSPP_GE_DUMP: { const Path &fileToRemove = filePath_; + INFO_LOG(SYSTEM, "Deleting file %s", fileToRemove.c_str()); File::Delete(fileToRemove); g_Config.RemoveRecent(filePath_.ToString()); return true; @@ -109,6 +111,7 @@ bool GameInfo::Delete() { case IdentifiedFileType::PPSSPP_SAVESTATE: { const Path &ppstPath = filePath_; + INFO_LOG(SYSTEM, "Deleting file %s", ppstPath.c_str()); File::Delete(ppstPath); const Path screenshotPath = filePath_.WithReplacedExtension(".ppst", ".jpg"); if (File::Exists(screenshotPath)) { @@ -118,6 +121,7 @@ bool GameInfo::Delete() { } default: + INFO_LOG(SYSTEM, "Don't know how to delete this type of file: %s", filePath_.c_str()); return false; } }