Fixed an issue where the system view style would not always get properly set.

This commit is contained in:
Leon Styhre 2021-04-05 12:37:52 +02:00
parent e0e1a05f1e
commit b51f99ab77

View file

@ -523,6 +523,19 @@ void ViewController::goToGameList(SystemData* system)
mState.viewing = GAME_LIST; mState.viewing = GAME_LIST;
mState.system = system; mState.system = system;
auto it = mGameListViews.find(system);
if (it != mGameListViews.cend()) {
std::string viewStyle = it->second->getName();
if (viewStyle == "basic")
mState.viewstyle = BASIC;
else if (viewStyle == "detailed")
mState.viewstyle = DETAILED;
else if (viewStyle == "video")
mState.viewstyle = VIDEO;
else if (viewStyle == "grid")
mState.viewstyle = GRID;
}
if (mCurrentView) if (mCurrentView)
mCurrentView->onShow(); mCurrentView->onShow();