summaryrefslogtreecommitdiff
path: root/apps/plugins/rockblox.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-11-23 23:00:29 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2022-11-23 23:00:29 -0500
commit97a82ee3eca1be69bd2d08e8fd9db09c0807ae5d (patch)
treeb032a1397fd33240d8fdc7d6e17059723d0ffe55 /apps/plugins/rockblox.c
parent3745c813f924b12232c4f37610aecd23fe5654b8 (diff)
downloadrockbox-97a82ee3eca1be69bd2d08e8fd9db09c0807ae5d.tar.gz
rockbox-97a82ee3eca1be69bd2d08e8fd9db09c0807ae5d.zip
plugins HAVE_BACKLIGHT helper remove ifdefs in favor of dummy functions
lessen the ifdef hell Change-Id: I52f830284e4599f3fc3a75c27dda27058b8de1a3
Diffstat (limited to 'apps/plugins/rockblox.c')
-rw-r--r--apps/plugins/rockblox.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index 927710b37b..cc719e5067 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -1498,16 +1498,13 @@ static int rockblox_loop (void)
1498#ifdef HAS_BUTTON_HOLD 1498#ifdef HAS_BUTTON_HOLD
1499 if (rb->button_hold ()) { 1499 if (rb->button_hold ()) {
1500 /* Turn on backlight timeout (revert to settings) */ 1500 /* Turn on backlight timeout (revert to settings) */
1501#ifdef HAVE_BACKLIGHT
1502 backlight_use_settings(); 1501 backlight_use_settings();
1503#endif
1504 rb->splash(0, "Paused"); 1502 rb->splash(0, "Paused");
1505 while (rb->button_hold ()) 1503 while (rb->button_hold ())
1506 rb->sleep(HZ/10); 1504 rb->sleep(HZ/10);
1507#ifdef HAVE_BACKLIGHT
1508 /* Turn off backlight timeout */ 1505 /* Turn off backlight timeout */
1509 backlight_ignore_timeout(); 1506 backlight_ignore_timeout();
1510#endif 1507
1511 /* get rid of the splash text */ 1508 /* get rid of the splash text */
1512 rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); 1509 rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT);
1513 show_details (); 1510 show_details ();
@@ -1677,10 +1674,9 @@ enum plugin_status plugin_start (const void *parameter)
1677 1674
1678 rb->lcd_setfont (FONT_SYSFIXED); 1675 rb->lcd_setfont (FONT_SYSFIXED);
1679 1676
1680#ifdef HAVE_BACKLIGHT
1681 /* Turn off backlight timeout */ 1677 /* Turn off backlight timeout */
1682 backlight_ignore_timeout(); 1678 backlight_ignore_timeout();
1683#endif 1679
1684 load_game(); 1680 load_game();
1685 resume_file = resume; 1681 resume_file = resume;
1686 1682
@@ -1728,9 +1724,8 @@ enum plugin_status plugin_start (const void *parameter)
1728 1724
1729 /* Save user's HighScore */ 1725 /* Save user's HighScore */
1730 highscore_save(SCORE_FILE, highscores, NUM_SCORES); 1726 highscore_save(SCORE_FILE, highscores, NUM_SCORES);
1731#ifdef HAVE_BACKLIGNT 1727
1732 backlight_use_settings(); 1728 backlight_use_settings();
1733#endif
1734 1729
1735 return PLUGIN_OK; 1730 return PLUGIN_OK;
1736} 1731}