From 40a5cd15099d57ea20659be31fd87973dfee0ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 19 Feb 2026 13:13:51 +0100 Subject: [PATCH] Minor logging improvement, refresh gamescreen on deleted savedata --- Core/Dialog/SavedataParam.cpp | 2 +- Core/HW/MemoryStick.cpp | 7 +++++-- UI/GameScreen.cpp | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index c5273a889c..f00642a891 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -1458,7 +1458,7 @@ bool SavedataParam::GetSize(SceUtilitySavedataParam *param) { } } - INFO_LOG(Log::sceUtility, "SectorSize: %d FreeSectors: %d FreeKB: %d neededKb: %d overwriteKb: %d", + INFO_LOG(Log::sceUtility, "GETSIZE: SectorSize: %d FreeSectors: %d FreeKB: %d neededKb: %d overwriteKb: %d", param->sizeInfo->sectorSize, param->sizeInfo->freeSectors, param->sizeInfo->freeKB, param->sizeInfo->neededKB, param->sizeInfo->overwriteKB); NotifyMemInfo(MemBlockFlags::WRITE, param->sizeInfo.ptr, sizeof(PspUtilitySavedataSizeInfo), "SavedataGetSize"); diff --git a/Core/HW/MemoryStick.cpp b/Core/HW/MemoryStick.cpp index 1018284534..6c6d9a4d66 100644 --- a/Core/HW/MemoryStick.cpp +++ b/Core/HW/MemoryStick.cpp @@ -145,9 +145,12 @@ u64 MemoryStick_FreeSpace(std::string gameID) { realFreeSpace = memstickInitialFree - memstickCurrentUse; } } - INFO_LOG(Log::IO, "Done calculating free disk space (%0.3f s)", time_now_d() - start); - return std::min(simulatedFreeSpace, realFreeSpace); + u64 space = std::min(simulatedFreeSpace, realFreeSpace); + + INFO_LOG(Log::IO, "Done calculating free disk space (%0.3f s): %llu", time_now_d() - start, (unsigned long long)space); + + return space; } void MemoryStick_NotifyWrite() { diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index 7c7bb66ebf..f9199644e6 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -548,17 +548,17 @@ void GameScreen::OnDeleteSaveData(UI::EventParams &e) { Path gamePath = gamePath_; screenManager()->push( new UI::MessagePopupScreen(di->T("Delete"), di->T("DeleteConfirmAll", "Do you really want to delete all\nyour save data for this game?"), trashAvailable ? di->T("Move to trash") : di->T("Delete"), di->T("Cancel"), - [gamePath](bool yes) { + [this, gamePath](bool yes) { if (yes) { std::shared_ptr info_ = g_gameInfoCache->GetInfo(NULL, gamePath, GameInfoFlags::PARAM_SFO); info_->DeleteAllSaveData(); info_->saveDataSize = 0; info_->installDataSize = 0; + RecreateViews(); } })); } } - RecreateViews(); } void GameScreen::OnDeleteGame(UI::EventParams &e) {