1
0
Fork 0
forked from len0rd/rockbox

Fixed disk icon display in remote status bar on iriver. * Rolled back led.c changes, introducing a changed #if condition only. Reduces code size on targets with real controllable LED.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8059 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-11-24 00:10:14 +00:00
parent 33289d090f
commit 548755adf1
7 changed files with 56 additions and 40 deletions

View file

@ -143,8 +143,10 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
#endif
bar->info.repeat = global_settings.repeat_mode;
bar->info.playmode = current_playmode();
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
if(!display->has_disk_led)
bar->info.led = led_read(HZ/2); /* delay should match polling interval */
#endif
#ifdef HAVE_USB_POWER
bar->info.usb_power = usb_powered();
@ -258,8 +260,10 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
#ifdef HAVE_RTC
gui_statusbar_time(display, bar->info.hour, bar->info.minute);
#endif /* HAVE_RTC */
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
if(!display->has_disk_led && bar->info.led)
gui_statusbar_led(display);
#endif
display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT);
bar->lastinfo = bar->info;
#endif /* HAVE_LCD_BITMAP */
@ -465,6 +469,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display)
STATUSBAR_LOCKR_WIDTH, STATUSBAR_HEIGHT);
}
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
/*
* no real LED: disk activity in status bar
*/
@ -475,6 +480,7 @@ void gui_statusbar_led(struct screen * display)
STATUSBAR_Y_POS, STATUSBAR_DISK_WIDTH,
STATUSBAR_HEIGHT);
}
#endif
#ifdef HAVE_RTC
/*

View file

@ -46,7 +46,9 @@ struct status_info {
#endif
bool battery_safe;
bool redraw_volume; /* true if the volume gauge needs updating */
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
bool led; /* disk LED simulation in the status bar */
#endif
#ifdef HAVE_USB_POWER
bool usb_power;

View file

@ -74,8 +74,12 @@ const unsigned char bitmap_icons_7x8[][7] =
};
/* Disk/MMC activity */
const unsigned char bitmap_icon_disk[12] =
const unsigned char bitmap_icon_disk[12] =
#ifdef HAVE_MMC
{0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f};
#else
{0x00,0x00,0x00,0x1c,0x22,0x41,0x49,0x41,0x22,0x1c,0x00,0x00};
#endif
#if LCD_WIDTH == 112 || LCD_WIDTH == 128 \
|| (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_WIDTH == 128)

View file

@ -100,7 +100,7 @@ void screen_init(struct screen * screen, enum screen_type screen_type)
screen->depth=LCD_DEPTH;
#if CONFIG_LED == LED_VIRTUAL
screen->has_disk_led=false;
#else
#elif defined(HAVE_REMOTE_LCD)
screen->has_disk_led=true;
#endif
#ifdef HAVE_LCD_BITMAP

View file

@ -54,7 +54,9 @@ struct screen
int depth;
int char_width;
int char_height;
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
bool has_disk_led;
#endif
#ifdef HAS_BUTTONBAR
bool has_buttonbar;
#endif