Skip to content

Commit

Permalink
Add some comments and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 22, 2024
1 parent 902eed5 commit bd388fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion Core/Util/GameManager.cpp
Expand Up @@ -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());
Expand Down
6 changes: 5 additions & 1 deletion UI/GameInfoCache.cpp
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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)) {
Expand All @@ -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;
}
}
Expand Down

0 comments on commit bd388fc

Please sign in to comment.