From c1e97dba4d439fa767e388b601bbd0427bf4297e Mon Sep 17 00:00:00 2001 From: emb <> Date: Sun, 8 Mar 2015 14:30:49 -0500 Subject: [PATCH] Fixed exitOnFirstPageBack option. Readded support for nested subcollections. --- RetroFE/Source/RetroFE.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index b15a09b..ca8026a 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -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,6 +444,10 @@ RetroFE::RETROFE_STATE RetroFE::ProcessUserInput(Page *page) Config.SetCurrentCollection(NextPageItem->GetName()); CollectionInfo *info = GetCollection(NextPageItem->GetName()); + MenuParser mp; + mp.GetMenuItems(info); + CurrentPage->PushCollection(info); + page->PushCollection(info); state = RETROFE_NEXT_PAGE_REQUEST; } @@ -452,7 +456,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; }