summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c6
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 13c829805f..86e5c51128 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -133,7 +133,7 @@ static const struct plugin_api rockbox_api = {
#ifdef HAVE_LCD_INVERT
lcd_set_invert_display,
#endif /* HAVE_LCD_INVERT */
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
lcd_set_enable_hook,
&button_queue,
#endif
diff --git a/apps/plugin.h b/apps/plugin.h
index 4f747ea2b1..08d0b603ac 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -226,7 +226,7 @@ struct plugin_api {
void (*lcd_set_invert_display)(bool yesno);
#endif /* HAVE_LCD_INVERT */
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
void (*lcd_set_enable_hook)(void (*enable_hook)(void));
struct event_queue *button_queue;
#endif
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 519fd0f059..14863c943d 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -571,7 +571,7 @@ static int get_start_time(uint32_t duration)
lcd_(clear_display)();
lcd_(update)();
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
rb->lcd_set_enable_hook(get_start_time_lcd_enable_hook);
#endif
@@ -762,11 +762,11 @@ static int get_start_time(uint32_t duration)
rb->yield();
}
+#ifdef HAVE_LCD_COLOR
#ifdef HAVE_LCD_ENABLE
rb->lcd_set_enable_hook(NULL);
#endif
-
-#ifndef HAVE_LCD_COLOR
+#else
stream_gray_show(false);
grey_clear_display();
grey_update();
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index cb8c0d2133..5e34c2b041 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -612,11 +612,11 @@ static void wvs_backlight_on_video_mode(bool video_on)
/* Turn off backlight timeout */
/* backlight control in lib/helper.c */
backlight_force_on(rb);
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
rb->lcd_set_enable_hook(NULL);
#endif
} else {
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
rb->lcd_set_enable_hook(wvs_lcd_enable_hook);
#endif
/* Revert to user's backlight settings */
@@ -1605,7 +1605,7 @@ static void button_loop(void)
wvs_stop();
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
/* Be sure hook is removed before exiting since the stop will put it
* back because of the backlight restore. */
rb->lcd_set_enable_hook(NULL);