diff --git a/UI/InstallZipScreen.cpp b/UI/InstallZipScreen.cpp index 47e96c044f..872560d4af 100644 --- a/UI/InstallZipScreen.cpp +++ b/UI/InstallZipScreen.cpp @@ -25,6 +25,7 @@ #include "Core/Util/GameManager.h" #include "UI/InstallZipScreen.h" +#include "UI/MainScreen.h" void InstallZipScreen::CreateViews() { using namespace UI; @@ -68,6 +69,7 @@ UI::EventReturn InstallZipScreen::OnInstall(UI::EventParams ¶ms) { if (g_GameManager.InstallGameOnThread(zipPath_, deleteZipFile_)) { installStarted_ = true; installChoice_->SetEnabled(false); + MainScreen::showHomebrewTab = true; } return UI::EVENT_DONE; } diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 32485e7386..b9c5eb1373 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -62,6 +62,8 @@ #include +bool MainScreen::showHomebrewTab = false; + class GameButton : public UI::Clickable { public: GameButton(const std::string &gamePath, bool gridStyle, UI::LayoutParams *layoutParams = 0) @@ -511,9 +513,10 @@ void MainScreen::CreateViews() { leftColumn->SetCurrentTab(1); } - if (backFromStore_) { + if (backFromStore_ || showHomebrewTab) { leftColumn->SetCurrentTab(2); backFromStore_ = false; + showHomebrewTab = false; } /* if (info) { diff --git a/UI/MainScreen.h b/UI/MainScreen.h index 503b18df07..01080a155a 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -32,6 +32,9 @@ public: virtual bool isTopLevel() const { return true; } + // Horrible hack to show the demos & homebrew tab after having installed a game from a zip file. + static bool showHomebrewTab; + protected: virtual void CreateViews(); virtual void update(InputState &input);