mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-18 12:48:52 +01:00
Added rememberMenu global settings.conf parameter to remember position when re-entering menu (off by default).
This commit is contained in:
parent
31dd4c5ca8
commit
3da97be449
@ -41,6 +41,9 @@ exitOnFirstPageBack = yes
|
||||
# enter 0 attract mode, otherwise enter the number of seconds to wait before enabling attract mode
|
||||
attractModeTime = 45
|
||||
|
||||
# remember the last highlighted menu when re-entering a menu
|
||||
rememberMenu = no
|
||||
|
||||
#######################################
|
||||
# Base folders of media and ROM files
|
||||
#######################################
|
||||
|
||||
@ -393,6 +393,8 @@ RetroFE::RETROFE_STATE RetroFE::ProcessUserInput(Page *page)
|
||||
bool exit = false;
|
||||
RETROFE_STATE state = RETROFE_IDLE;
|
||||
if (SDL_PollEvent(&e) == 0) return state;
|
||||
bool rememberMenu = false;
|
||||
Config.GetProperty("rememberMenu", rememberMenu);
|
||||
|
||||
if(e.type == SDL_KEYDOWN || e.type == SDL_KEYUP)
|
||||
{
|
||||
@ -463,7 +465,7 @@ RetroFE::RETROFE_STATE RetroFE::ProcessUserInput(Page *page)
|
||||
mp.GetMenuItems(info);
|
||||
page->PushCollection(info);
|
||||
|
||||
if(LastMenuOffsets.find(NextPageItem->GetName()) != LastMenuOffsets.end())
|
||||
if(rememberMenu && LastMenuOffsets.find(NextPageItem->GetName()) != LastMenuOffsets.end())
|
||||
{
|
||||
page->SetScrollOffsetIndex(LastMenuOffsets[NextPageItem->GetName()]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user