Skip to content

Commit

Permalink
Fix save data manager dialog popup
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Sep 7, 2024
1 parent 48a0c0f commit 514f29d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UI/InstallZipScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
7 changes: 6 additions & 1 deletion UI/SavedataScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,19 @@ SavedataView::SavedataView(UIContext &dc, GameInfo *ginfo, IdentifiedFileType ty
"",
"",
showIcon,
layoutParams) {}
layoutParams) {
if (ginfo) {
Update(ginfo);
}
}

class SavedataPopupScreen : public PopupScreen {
public:
SavedataPopupScreen(Path savePath, std::string_view title) : PopupScreen(StripSpaces(title)), savePath_(savePath) { }

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.
Expand Down

0 comments on commit 514f29d

Please sign in to comment.