Fix save data manager dialog popup

This commit is contained in:
Henrik Rydgård 2024-09-07 16:17:28 +02:00
parent 48a0c0f068
commit 514f29d63b
2 changed files with 7 additions and 2 deletions

View file

@ -202,5 +202,5 @@ void InstallZipScreen::update() {
std::shared_ptr<GameInfo> ginfo = g_gameInfoCache->GetInfo(screenManager()->getDrawContext(), savedataToOverwrite_, GameInfoFlags::FILE_TYPE | GameInfoFlags::PARAM_SFO | GameInfoFlags::ICON | GameInfoFlags::SIZE);
existingSaveView_->Update(ginfo.get());
}
UIScreen::update();
UIDialogScreenWithBackground::update();
}

View file

@ -121,7 +121,11 @@ SavedataView::SavedataView(UIContext &dc, GameInfo *ginfo, IdentifiedFileType ty
"",
"",
showIcon,
layoutParams) {}
layoutParams) {
if (ginfo) {
Update(ginfo);
}
}
class SavedataPopupScreen : public PopupScreen {
public:
@ -129,6 +133,7 @@ public:
const char *tag() const override { return "SavedataPopup"; }
void update() override {
PopupScreen::update();
std::shared_ptr<GameInfo> ginfo = g_gameInfoCache->GetInfo(screenManager()->getDrawContext(), savePath_, GameInfoFlags::PARAM_SFO | GameInfoFlags::ICON | GameInfoFlags::SIZE);
if (!ginfo->Ready(GameInfoFlags::PARAM_SFO)) {
// Hm, this is no good. But hopefully the previous screen loaded it.