InstallZip: Don't let each pane forget the other's views

CreateSettingsViews and CreateContentViews both cleared all the view
pointers, and which runs first depends on orientation. In landscape, Install
and Play were never disabled during an install; in portrait, the done and
error notices never showed. Reset them once in BeforeCreateViews instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-22 10:55:30 +02:00
1 parent 3e46790a00
commit bba29944e6
1 file changed
+7 -13
+7 -13
View File
@@ -78,11 +78,6 @@ void InstallZipScreen::CreateSettingsViews(UI::ViewGroup *parent) {
std::string shortFilename = zipPath_.GetFilename();
bool showDeleteCheckbox = false;
returnToHomebrew_ = false;
installChoice_ = nullptr;
playChoice_ = nullptr;
doneView_ = nullptr;
existingSaveView_ = nullptr;
std::vector<Path> destOptions;
@@ -144,12 +139,6 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) {
std::string shortFilename = zipPath_.GetFilename();
returnToHomebrew_ = false;
installChoice_ = nullptr;
playChoice_ = nullptr;
doneView_ = nullptr;
existingSaveView_ = nullptr;
overwriteWarning_ = nullptr;
destFolders_.clear();
std::vector<Path> destOptions;
@@ -320,8 +309,13 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) {
}
void InstallZipScreen::BeforeCreateViews() {
File::FileInfo fileInfo;
File::GetFileInfo(zipPath_, &fileInfo);
// The two panes are created in a different order depending on orientation, so neither can reset the other's views.
returnToHomebrew_ = false;
installChoice_ = nullptr;
playChoice_ = nullptr;
doneView_ = nullptr;
existingSaveView_ = nullptr;
overwriteWarning_ = nullptr;
}
bool InstallZipScreen::key(const KeyInput &key) {