From c2415d7593b65a33e6e5ec533974c865abce9c70 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 7 Feb 2021 23:18:39 -0800 Subject: [PATCH] Savedata: Show corrupted data more clearly. Include the folder name and show a darkened icon so it's clearer. --- Core/Dialog/PSPSaveDialog.cpp | 5 ++++- Core/Dialog/SavedataParam.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index ee584cd69..374792794 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -380,6 +380,8 @@ void PSPSaveDialog::DisplaySaveList(bool canMove) { tw = fileInfo.texture->Width(); th = fileInfo.texture->Height(); PPGeDrawImage(x, y, w, h, 0, 0, 1, 1, tw, th, imageStyle); + } else { + PPGeDrawRect(x, y, x + w, y + h, 0x88666666); } PPGeSetDefaultTexture(); } @@ -463,11 +465,13 @@ static void FormatSaveDate(char *date, size_t sz, const tm &t) { void PSPSaveDialog::DisplaySaveDataInfo1() { std::lock_guard guard(paramLock); const SaveFileInfo &saveInfo = param.GetFileInfo(currentSelectedSave); + PPGeStyle saveTitleStyle = FadedStyle(PPGeAlign::BOX_LEFT, 0.55f); if (saveInfo.broken) { auto di = GetI18NCategory("Dialog"); PPGeStyle textStyle = FadedStyle(PPGeAlign::BOX_VCENTER, 0.6f); PPGeDrawText(di->T("Corrupted Data"), 180, 136, textStyle); + PPGeDrawText(saveInfo.title, 175, 159, saveTitleStyle); } else if (saveInfo.size == 0) { auto di = GetI18NCategory("Dialog"); PPGeStyle textStyle = FadedStyle(PPGeAlign::BOX_VCENTER, 0.6f); @@ -488,7 +492,6 @@ void PSPSaveDialog::DisplaySaveDataInfo1() { std::string saveDetailTxt = saveInfo.saveDetail; PPGeStyle titleStyle = FadedStyle(PPGeAlign::BOX_BOTTOM, 0.6f); - PPGeStyle saveTitleStyle = FadedStyle(PPGeAlign::BOX_LEFT, 0.55f); titleStyle.color = CalcFadedColor(0xFFC0C0C0); PPGeStyle textStyle = FadedStyle(PPGeAlign::BOX_LEFT, 0.5f); diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index 354fd3b82..e6aec396e 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -1576,6 +1576,7 @@ void SavedataParam::SetFileInfo(SaveFileInfo &saveInfo, PSPFileInfo &info, std:: } } else { saveInfo.broken = true; + truncate_cpy(saveInfo.title, saveDir.c_str()); } }