I built an app that uses nested menus, but they only work the first try, then fail to pop.
Menus that exit by the X or by calling D4D_EscapeScreen(), as in the example, work fine.
When a menu calls another screen with a menu, and when all exits follow the X or D4D_EscapeScreen(), they also work fine.
But if a nested menu directly calls the main screen with D4D_ActivateScreen (D4D_TRUE), the next use of the menus fails to work.
I tried to unwind the history by calling D4D_EscapeScreen() twice, and this works. For example, if in the callback of the second menu:
However, this causes some screen flicker as the previous menu paints.
Is there a proper way to leave a nested menu that does not break the following use?