mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Fixed 'back' command for CMS menus.
This commit is contained in:
parent
18c485707e
commit
cd061168ec
1 changed files with 4 additions and 2 deletions
|
@ -550,9 +550,11 @@ static void cmsMenuCountPage(displayPort_t *pDisplay)
|
||||||
STATIC_UNIT_TESTED const void *cmsMenuBack(displayPort_t *pDisplay)
|
STATIC_UNIT_TESTED const void *cmsMenuBack(displayPort_t *pDisplay)
|
||||||
{
|
{
|
||||||
// Let onExit function decide whether to allow exit or not.
|
// Let onExit function decide whether to allow exit or not.
|
||||||
|
|
||||||
if (currentCtx.menu->onExit) {
|
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) {
|
if (!menuStackIdx) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue