1
0
Fork 0
forked from len0rd/rockbox

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_<fnname>, <fnname> 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
This commit is contained in:
Michael Sevakis 2010-06-04 08:43:32 +00:00
parent e174a8ad8d
commit bc26fe7a96
7 changed files with 278 additions and 156 deletions

View file

@ -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"