From bc26fe7a96d6f5e443003cb871dcb4bfba525352 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 4 Jun 2010 08:43:32 +0000 Subject: Add a wrapper header, mylcd.h, in the lib subdirectory, which lets plugins' code automatically call the proper functions depending if compilation is for greylib or color display, also forms proper call to grey_ and xlcd_. mylcd_ub_ call greylib unbuffered routines, regular lcd routines otherwise. Form is mylcd_, is the symbol name stripped of prefixes lcd_, grey_, or xlcd_. Convert a couple plugins I know well (easy job). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26542 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/mpegplayer/mpegplayer.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'apps/plugins/mpegplayer/mpegplayer.h') diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h index f6617cedff..79c25f6109 100644 --- a/apps/plugins/mpegplayer/mpegplayer.h +++ b/apps/plugins/mpegplayer/mpegplayer.h @@ -67,24 +67,14 @@ #define DISK_GUARDBUF_SIZE ALIGN_UP(65535+6, 4) #ifdef HAVE_LCD_COLOR -#define DRAW_BLACK LCD_BLACK -#define DRAW_DARKGRAY LCD_DARKGRAY -#define DRAW_LIGHTGRAY LCD_LIGHTGRAY -#define DRAW_WHITE LCD_WHITE -#define lcd_(fn) rb->lcd_##fn -#define lcd_splash splash - +#define mylcd_splash rb->splash #else - #include "lib/grey.h" -#define DRAW_BLACK GREY_BLACK -#define DRAW_DARKGRAY GREY_DARKGRAY -#define DRAW_LIGHTGRAY GREY_LIGHTGRAY -#define DRAW_WHITE GREY_WHITE -#define lcd_(fn) grey_##fn - +#define mylcd_splash grey_splash #endif +#include "lib/mylcd.h" + #include "mpeg2.h" #include "video_out.h" #include "mpeg_stream.h" -- cgit v1.2.3