X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fgui%2Fmenu.c;h=86e8f17dd4453cfc4bd277f48b8c9190c6042454;hb=ab03b5b37726fb8b39a6f6c915f8668bddd779ee;hp=b52f795ff360880719af49a1f190bce3fc3e8829;hpb=8ec6bf2e3bb3d87588ce76f0d6d9e83b98838d99;p=bertos.git diff --git a/bertos/gui/menu.c b/bertos/gui/menu.c index b52f795f..86e8f17d 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 @@ -42,6 +42,7 @@ #include "menu.h" #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 @@ -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 */ @@ -293,7 +295,7 @@ static void menu_layout( /* Clear rest of area */ gfx_rectClear(bm, bm->cr.xmin, ypos, bm->cr.xmax, bm->cr.ymax); - lcd_blitBitmap(&lcd_bitmap); + lcd_blitBitmap(bm); } /* Restore old cliprect */ @@ -440,7 +442,7 @@ iptr_t menu_handle(const struct Menu *menu) items_per_page = - (menu->bitmap->height / menu->bitmap->font->height) + (menu->bitmap->height / menu->bitmap->font->height - 1) #if CONFIG_MENU_MENUBAR - 1 /* menu bar labels */ #endif @@ -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;