1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

Fixed 'back' command for CMS menus.

This commit is contained in:
mikeller 2019-12-08 09:47:26 +13:00
parent 18c485707e
commit cd061168ec

View file

@ -550,9 +550,11 @@ static void cmsMenuCountPage(displayPort_t *pDisplay)
STATIC_UNIT_TESTED const void *cmsMenuBack(displayPort_t *pDisplay)
{
// Let onExit function decide whether to allow exit or not.
if (currentCtx.menu->onExit) {
return currentCtx.menu->onExit(pageTop + currentCtx.cursorRow);
const void *result = currentCtx.menu->onExit(pageTop + currentCtx.cursorRow);
if (result == MENU_CHAIN_BACK) {
return result;
}
}
if (!menuStackIdx) {