X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fgui%2Fmenu.c;h=d897ae946825284ca40eb1ce4357374423565cda;hb=6372954014a79d1c292a58588ebc01b2c8de2935;hp=a00d951914a440c3e1fe6b4e56267150a5b62e5a;hpb=0fbabc305e65dfc5538cfcae10c04f6be9daf657;p=bertos.git diff --git a/bertos/gui/menu.c b/bertos/gui/menu.c index a00d9519..d897ae94 100644 --- a/bertos/gui/menu.c +++ b/bertos/gui/menu.c @@ -27,13 +27,13 @@ * the GNU General Public License. * * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/) - * Copyright 2000 Bernardo Innocenti + * Copyright 2000 Bernie Innocenti * * --> * * \version $Id$ * - * \author Bernardo Innocenti + * \author Bernie Innocenti * \author Stefano Fedrigo * * \brief General pourpose menu handling functions @@ -41,7 +41,8 @@ #include "menu.h" -#include +#include "cfg/cfg_gfx.h" +#include "cfg/cfg_arch.h" #include #include @@ -168,9 +169,7 @@ static void menu_defaultRenderHook(struct Bitmap *bm, int ypos, bool selected, c } } -#warning FIXME:REVISE this code! -#if 0 -//#if CPU_HARVARD +#if CPU_HARVARD ((item->flags & MIF_RAMLABEL) ? text_xyprintf : text_xyprintf_P) #else text_xyprintf @@ -198,7 +197,7 @@ static void menu_layout( ypos = bm->cr.ymin; -#if 0 +#if 1 if (redraw) { /* Clear screen */ @@ -278,6 +277,9 @@ static void menu_layout( 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 RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook; /* Render menuitem */ @@ -540,6 +542,9 @@ 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 CONST_CAST(struct Menu *, menu)->selected = selected; return result;