InstallZipScreen: Handle the Play choice properly.

This commit is contained in:
Henrik Rydgård committed 2026-03-27 14:34:18 -06:00
1 parent 99d5bcc26d
commit 9cf0c64343
1 file changed
+6 -1
+6 -1
View File
@@ -92,7 +92,7 @@ void InstallZipScreen::CreateSettingsViews(UI::ViewGroup *parent) {
installChoice_->OnClick.Handle(this, &InstallZipScreen::OnInstall);
// NOTE: We detect PBP isos (like demos) as game dirs currently. Can't play them directly.
if (zipFileInfo_.contents == ZipFileContents::ISO_FILE) {
if (zipFileInfo_.contents == ZipFileContents::ISO_FILE && zipFileInfo_.archiveType == ArchiveType::ZIP) {
playChoice_ = parent->Add(new Choice(ga->T("Play"), ImageID("I_PLAY")));
playChoice_->OnClick.Handle(this, &InstallZipScreen::OnPlay);
}
@@ -380,6 +380,11 @@ void InstallZipScreen::update() {
if (doneView_) {
doneView_->SetText(iz->T("Installed!"));
}
if (playChoice_) {
// Encourage the user to back out and play directly from the main screen,
// instead of unpacking into memory.
playChoice_->SetEnabled(false);
}
MainScreen::showHomebrewTab = returnToHomebrew_;
}
}