X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fgui%2Fmenu.c;h=432927895e28e03f63bf4243259378877cb50969;hb=39e200e1f43474a96888f97e2271728c9605ccbe;hp=556985f645a3ed7cf6c832f88f4664c2e0395122;hpb=e5c5c9f3b2e4299d768cd098106b0ad8a2024ab8;p=bertos.git diff --git a/bertos/gui/menu.c b/bertos/gui/menu.c index 556985f6..43292789 100644 --- a/bertos/gui/menu.c +++ b/bertos/gui/menu.c @@ -49,6 +49,8 @@ #include #include +#include + #include #include /* strcpy() */ @@ -269,10 +271,7 @@ static void menu_layout( /* Only print visible items */ if (!(item->flags & MIF_HIDDEN)) { - /* Check if a special render function is supplied, otherwise use defaults */ - #if (ARCH & ARCH_NIGHTTEST) - #warning __FILTER_NEXT_WARNING__ - #endif + #warning __FILTER_NEXT_WARNING__ RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook; /* Render menuitem */ @@ -467,6 +466,7 @@ iptr_t menu_handle(const struct Menu *menu) #if CONFIG_MENU_SMOOTH || (CONFIG_MENU_TIMEOUT != 0) key = kbd_peek(); + cpu_relax(); #else key = kbd_get(); #endif @@ -535,9 +535,7 @@ iptr_t menu_handle(const struct Menu *menu) /* Store currently selected item before leaving. */ if (menu->flags & MF_SAVESEL) - #if (ARCH & ARCH_NIGHTTEST) - #warning __FILTER_NEXT_WARNING__ - #endif + #warning __FILTER_NEXT_WARNING__ CONST_CAST(struct Menu *, menu)->selected = selected; return result;