summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-07-08 15:32:56 +0000
committerNils Wallménius <nils@rockbox.org>2007-07-08 15:32:56 +0000
commit3f8c075f24fdcb4c471a4a0ae149f730e339450d (patch)
treed46767b1ff78debeaad90b9d9dfaf4615adbd29a
parent979c2b7c663ad6fc46263a3407abbd0c4b78e07f (diff)
downloadrockbox-3f8c075f24fdcb4c471a4a0ae149f730e339450d.zip
rockbox-3f8c075f24fdcb4c471a4a0ae149f730e339450d.tar.gz
rockbox-3f8c075f24fdcb4c471a4a0ae149f730e339450d.tar.bz2
rockbox-3f8c075f24fdcb4c471a4a0ae149f730e339450d.tar.xz
ifdef out charging screen for targets that do not use it, + minor cleaning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13820 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/screens.c12
-rw-r--r--apps/screens.h5
2 files changed, 9 insertions, 8 deletions
diff --git a/apps/screens.c b/apps/screens.c
index 79bfa42..2e9ab22 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -173,7 +173,8 @@ int mmc_remove_request(void)
}
#endif
-#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING)
+/* the charging screen is only used for archos targets */
+#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) && defined(CPU_SH)
#ifdef HAVE_LCD_BITMAP
static void charging_display_info(bool animate)
@@ -367,7 +368,7 @@ int charging_screen(void)
action_signalscreenchange();
return rc;
}
-#endif /* CONFIG_CHARGING && !HAVE_POWEROFF_WHILE_CHARGING */
+#endif /* CONFIG_CHARGING && !HAVE_POWEROFF_WHILE_CHARGING && defined(CPU_SH) */
#ifdef HAVE_PITCHSCREEN
@@ -867,7 +868,7 @@ bool set_time_screen(const char* title, struct tm *tm)
unsigned int julianday;
unsigned int realyear;
unsigned int min = 0, steps = 0;
- unsigned int statusbar_height;
+ unsigned int statusbar_height = 0;
unsigned int width, height;
unsigned int separator_width, weekday_width;
unsigned int line_height, prev_line_height;
@@ -892,8 +893,6 @@ bool set_time_screen(const char* title, struct tm *tm)
if(global_settings.statusbar)
statusbar_height = STATUSBAR_HEIGHT;
- else
- statusbar_height = 0;
while ( !done ) {
/* calculate the number of days in febuary */
@@ -1009,9 +1008,8 @@ bool set_time_screen(const char* title, struct tm *tm)
lcd_puts(0, 4, str(LANG_TIME_SET));
lcd_puts(0, 5, str(LANG_TIME_REVERT));
-#ifdef HAVE_LCD_BITMAP
gui_syncstatusbar_draw(&statusbars, true);
-#endif
+
lcd_update();
/* calculate the minimum and maximum for the number under cursor */
diff --git a/apps/screens.h b/apps/screens.h
index 6b576f1..4d7704f 100644
--- a/apps/screens.h
+++ b/apps/screens.h
@@ -24,10 +24,13 @@
struct screen;
-void usb_display_info(struct screen * display);
void usb_screen(void);
+#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) && defined(CPU_SH)
int charging_screen(void);
+#endif
+#if CONFIG_CHARGING || defined(SIMULATOR)
void charging_splash(void);
+#endif
#ifdef HAVE_MMC
int mmc_remove_request(void);