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

Fixed 'back' command for CMS menus. (#9266)

Fixed 'back' command for CMS menus.
This commit is contained in:
Michael Keller 2019-12-10 01:48:23 +13:00 committed by GitHub
commit 7d215e8f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}
}
saveMenuInhibited = false;