summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-12-20 23:34:28 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-07 11:36:00 +0100
commitacee675a5e67635e812a2d325a0f450d3409d53a (patch)
tree93ace0e60f91747f8d53004b91dca33de7da2bc8
parent77836e57362f91cd037ea9c97a8fda00187d2070 (diff)
downloadrockbox-acee675a5e67635e812a2d325a0f450d3409d53a.tar.gz
rockbox-acee675a5e67635e812a2d325a0f450d3409d53a.tar.bz2
rockbox-acee675a5e67635e812a2d325a0f450d3409d53a.zip
lcd-charcell: Add set_drawmode() wrapper to multi-screen API.
Change-Id: Idb6477aca8b19cb346ba2c2f5b91074e4679b0dd
-rw-r--r--apps/screen_access.c13
-rw-r--r--apps/screen_access.h2
2 files changed, 12 insertions, 3 deletions
diff --git a/apps/screen_access.c b/apps/screen_access.c
index dd8b16e3fd..7f44cf5305 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -91,6 +91,15 @@ static void screen_helper_setuifont(int font)
}
#endif
+static void screen_helper_set_drawmode(int mode)
+{
+#ifdef HAVE_LCD_BITMAP
+ lcd_set_drawmode(mode);
+#else
+ (void) mode;
+#endif
+}
+
#if NB_SCREENS == 2
static int screen_helper_remote_getcharwidth(void)
{
@@ -172,6 +181,7 @@ struct screen screens[NB_SCREENS] =
#elif defined(HAVE_REMOTE_LCD)
.has_disk_led=true,
#endif
+ .set_drawmode=&screen_helper_set_drawmode,
.set_viewport=&lcd_set_viewport,
.getwidth=&lcd_getwidth,
.getheight=&lcd_getheight,
@@ -182,7 +192,6 @@ struct screen screens[NB_SCREENS] =
.setuifont=screen_helper_setuifont,
.mono_bitmap=&lcd_mono_bitmap,
.mono_bitmap_part=&lcd_mono_bitmap_part,
- .set_drawmode=&lcd_set_drawmode,
.bitmap=(screen_bitmap_func*)&lcd_bitmap,
.bitmap_part=(screen_bitmap_part_func*)&lcd_bitmap_part,
#if LCD_DEPTH <= 2
@@ -284,6 +293,7 @@ struct screen screens[NB_SCREENS] =
.getcharwidth=screen_helper_remote_getcharwidth,
.getcharheight=screen_helper_remote_getcharheight,
.has_disk_led=false,
+ .set_drawmode=&lcd_remote_set_drawmode,
.set_viewport=&lcd_remote_set_viewport,
.getwidth=&lcd_remote_getwidth,
.getheight=&lcd_remote_getheight,
@@ -296,7 +306,6 @@ struct screen screens[NB_SCREENS] =
.mono_bitmap_part=&lcd_remote_mono_bitmap_part,
.bitmap=(screen_bitmap_func*)&lcd_remote_bitmap,
.bitmap_part=(screen_bitmap_part_func*)&lcd_remote_bitmap_part,
- .set_drawmode=&lcd_remote_set_drawmode,
#if LCD_REMOTE_DEPTH <= 2
/* No transparency yet for grayscale and mono lcd */
.transparent_bitmap=(screen_bitmap_func*)&lcd_remote_bitmap,
diff --git a/apps/screen_access.h b/apps/screen_access.h
index d5bcd7e095..26c9977bf2 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -66,6 +66,7 @@ struct screen
#ifdef HAVE_BUTTONBAR
bool has_buttonbar;
#endif
+ void (*set_drawmode)(int mode);
void (*set_viewport)(struct viewport* vp);
int (*getwidth)(void);
int (*getheight)(void);
@@ -101,7 +102,6 @@ struct screen
void (*bmp)(const struct bitmap *bm, int x, int y);
void (*bmp_part)(const struct bitmap* bm, int src_x, int src_y,
int x, int y, int width, int height);
- void (*set_drawmode)(int mode);
#if defined(HAVE_LCD_COLOR) && defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1
unsigned (*color_to_native)(unsigned color);
#endif