summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/mylcd.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-12-07 01:50:52 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-12-18 19:16:26 -0500
commit371c86bf3f4d1708fc40db2aa7fa572eb429d0b4 (patch)
treebe339c62eac616ac6938c2929349b72377c10ee2 /apps/plugins/lib/mylcd.h
parentf668c3624184fedc14d34f87ad7b5f1e43bc87a1 (diff)
downloadrockbox-371c86bf3f4d1708fc40db2aa7fa572eb429d0b4.zip
rockbox-371c86bf3f4d1708fc40db2aa7fa572eb429d0b4.tar.gz
rockbox-371c86bf3f4d1708fc40db2aa7fa572eb429d0b4.tar.bz2
rockbox-371c86bf3f4d1708fc40db2aa7fa572eb429d0b4.tar.xz
Adapt OSD in plugin lib to be greylib compatible.
Requires addition of viewports and alternate framebuffers to greylib which are essentially similar to the core implementation except that the framebuffer can be any size and relationship to a viewport. Drawing is always fully clipped to the intersecting area. Adapt oscilloscope.c to the API change. FFT will use the new features (later update). Get rid of silly and wrong lcd_bmp_part use in OSD. Remove it from plugin API (must be made incompatible now). Change-Id: Iafa5e2174148fb8ad11db6b9d4add0dcabc5c563
Diffstat (limited to 'apps/plugins/lib/mylcd.h')
-rw-r--r--apps/plugins/lib/mylcd.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/plugins/lib/mylcd.h b/apps/plugins/lib/mylcd.h
index 48e8ca1..e363111 100644
--- a/apps/plugins/lib/mylcd.h
+++ b/apps/plugins/lib/mylcd.h
@@ -40,12 +40,13 @@
#define mylcd_(fn) pgfx_##fn
#define mylcd_ub_(fn) pgfx_##fn
-#elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 8) && defined(__GREY_H__)
+#elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__)
#define MYLCD_CFG_GREYLIB /* using greylib */
#define mylcd_(fn) grey_##fn
#define myxlcd_(fn) grey_##fn
#define mylcd_ub_(fn) grey_ub_##fn
#define myxlcd_ub_(fn) grey_ub_##fn
+#define mylcd_viewport_(fn) grey_viewport_##fn
/* Common colors */
#define MYLCD_BLACK GREY_BLACK
@@ -61,6 +62,7 @@
#define myxlcd_(fn) xlcd_##fn
#define mylcd_ub_(fn) rb->lcd_##fn
#define myxlcd_ub_(fn) xlcd_##fn
+#define mylcd_viewport_(fn) rb->viewport_##fn
/* Common colors */
#define MYLCD_BLACK LCD_BLACK
@@ -180,4 +182,11 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
#define mylcd_ub_scroll_down myxlcd_ub_(scroll_down)
#endif /* HAVE_LCD_BITMAP */
+/* Viewports */
+#ifdef HAVE_LCD_BITMAP
+#define mylcd_clear_viewport mylcd_(clear_viewport)
+#define mylcd_set_viewport mylcd_(set_viewport)
+#define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen)
+#endif /* HAVE_LCD_BITMAP */
+
#endif /* MYLCD_H */