From 517f0b9189bed37c06110f8cb6bc2ab7763ce8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Fri, 29 May 2020 21:31:06 +0300 Subject: fix fix fix --- src/core/Frontend.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index a38df5e0..b95deee3 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -959,6 +959,10 @@ CMenuManager::Draw() } #endif +#ifdef CUSTOM_FRONTEND_OPTIONS + static int lastOption = m_nCurrOption; +#endif + for (int i = 0; i < NUM_MENUROWS; ++i) { #ifdef CUSTOM_FRONTEND_OPTIONS bool isOptionDisabled = false; @@ -1344,7 +1348,6 @@ CMenuManager::Draw() } #ifdef CUSTOM_FRONTEND_OPTIONS - static int lastOption = m_nCurrOption; if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_TRIGGERFUNC) { FrontendOption &option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu]; if (option.onlyApplyOnEnter && m_nCurrOption != i) @@ -1355,7 +1358,6 @@ CMenuManager::Draw() if (oldOption.type == FEOPTION_DYNAMIC) oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS); } - lastOption = m_nCurrOption; } #endif @@ -1402,6 +1404,10 @@ CMenuManager::Draw() } } +#ifdef CUSTOM_FRONTEND_OPTIONS + lastOption = m_nCurrOption; +#endif + switch (m_nCurrScreen) { case MENUPAGE_CONTROLLER_SETTINGS: case MENUPAGE_SOUND_SETTINGS: -- cgit v1.2.3