diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index 65b7817e56..6acc975c81 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -257,6 +257,11 @@ void GameScreen::RefreshInstalledUpdate() { hasInstalledUpdate_ = FindInstalledGameUpdate(info_->id, &installedUpdate_); } +// Both panes use isHomebrew_, and which is created first depends on orientation. +void GameScreen::BeforeCreateViews() { + isHomebrew_ = info_ && info_->region == GameRegion::HOMEBREW; +} + void GameScreen::CreateContentViews(UI::ViewGroup *parent) { if (!info_) { // Shouldn't happen @@ -579,8 +584,6 @@ void GameScreen::CreateSettingsViews(UI::ViewGroup *rightColumn) { }); } - isHomebrew_ = info_ && info_->region == GameRegion::HOMEBREW; - const bool packing = GamePacker::IsPacking(gamePath_); if (fileTypeSupportCRC && !isHomebrew_ && !Reporting::HasCRC(gamePath_) && !packing) { rightColumnItems->Add(new Choice(ga->T("Calculate CRC"), ImageID("I_CHECKMARK")))->OnClick.Add([this](UI::EventParams &) { diff --git a/UI/GameScreen.h b/UI/GameScreen.h index c2b667dc85..9c819c5e09 100644 --- a/UI/GameScreen.h +++ b/UI/GameScreen.h @@ -48,6 +48,7 @@ public: bool GameRemoved() const { return gameRemoved_; } protected: + void BeforeCreateViews() override; void CreateContentViews(UI::ViewGroup *parent) override; void CreateSettingsViews(UI::ViewGroup *parent) override; void CreateContextMenu(UI::ViewGroup *parent) override;