diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-06-04 08:43:32 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-06-04 08:43:32 +0000 |
commit | bc26fe7a96d6f5e443003cb871dcb4bfba525352 (patch) | |
tree | fa05f187ca308af7bbddbc74a0270cd46cb48b72 /apps/plugins/mpegplayer/mpegplayer.h | |
parent | e174a8ad8dc531ff093894b7f930f0b9750c74eb (diff) | |
download | rockbox-bc26fe7a96d6f5e443003cb871dcb4bfba525352.tar.gz rockbox-bc26fe7a96d6f5e443003cb871dcb4bfba525352.zip |
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
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.h')
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.h | 18 |
1 files changed, 4 insertions, 14 deletions
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 @@ | |||
67 | #define DISK_GUARDBUF_SIZE ALIGN_UP(65535+6, 4) | 67 | #define DISK_GUARDBUF_SIZE ALIGN_UP(65535+6, 4) |
68 | 68 | ||
69 | #ifdef HAVE_LCD_COLOR | 69 | #ifdef HAVE_LCD_COLOR |
70 | #define DRAW_BLACK LCD_BLACK | 70 | #define mylcd_splash rb->splash |
71 | #define DRAW_DARKGRAY LCD_DARKGRAY | ||
72 | #define DRAW_LIGHTGRAY LCD_LIGHTGRAY | ||
73 | #define DRAW_WHITE LCD_WHITE | ||
74 | #define lcd_(fn) rb->lcd_##fn | ||
75 | #define lcd_splash splash | ||
76 | |||
77 | #else | 71 | #else |
78 | |||
79 | #include "lib/grey.h" | 72 | #include "lib/grey.h" |
80 | #define DRAW_BLACK GREY_BLACK | 73 | #define mylcd_splash grey_splash |
81 | #define DRAW_DARKGRAY GREY_DARKGRAY | ||
82 | #define DRAW_LIGHTGRAY GREY_LIGHTGRAY | ||
83 | #define DRAW_WHITE GREY_WHITE | ||
84 | #define lcd_(fn) grey_##fn | ||
85 | |||
86 | #endif | 74 | #endif |
87 | 75 | ||
76 | #include "lib/mylcd.h" | ||
77 | |||
88 | #include "mpeg2.h" | 78 | #include "mpeg2.h" |
89 | #include "video_out.h" | 79 | #include "video_out.h" |
90 | #include "mpeg_stream.h" | 80 | #include "mpeg_stream.h" |