Fixed bug where exit on page load was loading wrong collection.

This commit is contained in:
emb 2015-03-08 21:05:40 -05:00
parent 4024530975
commit d86e3df0dc

View File

@ -368,7 +368,7 @@ bool RetroFE::Back(bool &exit)
Config.GetProperty("exitOnFirstPageBack", exitOnBack);
exit = false;
if(CurrentPage->GetMenuDepth() == 0)
if(CurrentPage->GetMenuDepth() <= 1)
{
exit = exitOnBack;
}
@ -444,7 +444,10 @@ RetroFE::RETROFE_STATE RetroFE::ProcessUserInput(Page *page)
Config.SetCurrentCollection(NextPageItem->GetName());
CollectionInfo *info = GetCollection(NextPageItem->GetName());
MenuParser mp;
mp.GetMenuItems(info);
page->PushCollection(info);
state = RETROFE_NEXT_PAGE_REQUEST;
}
}
@ -452,7 +455,7 @@ RetroFE::RETROFE_STATE RetroFE::ProcessUserInput(Page *page)
if (keys[Input.GetScancode(UserInput::KeyCodeBack)])
{
if(Back(exit))
if(Back(exit) || exit)
{
state = (exit) ? RETROFE_QUIT_REQUEST : RETROFE_BACK_REQUEST;
}