summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-10-08 13:56:27 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-10-08 13:56:27 +0000
commitf7376e0e2e00e044223254fcc007e14d730f2028 (patch)
tree8c0b37f828344d579ae8faf0e9739dee6acfcd79
parentef5b2bb8f5b4521bef6676fd26508b486d42b266 (diff)
downloadrockbox-f7376e0e2e00e044223254fcc007e14d730f2028.zip
rockbox-f7376e0e2e00e044223254fcc007e14d730f2028.tar.gz
rockbox-f7376e0e2e00e044223254fcc007e14d730f2028.tar.bz2
rockbox-f7376e0e2e00e044223254fcc007e14d730f2028.tar.xz
f2_screen used the wrong font size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2532 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/screens.c74
1 files changed, 72 insertions, 2 deletions
diff --git a/apps/screens.c b/apps/screens.c
index 81ed976..f0f05cf 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -28,14 +28,83 @@
#include "mpeg.h"
#include "usb.h"
#include "settings.h"
+#include "status.h"
#include "playlist.h"
+#ifdef HAVE_LCD_BITMAP
+#define BMPHEIGHT_usb_logo 32
+#define BMPWIDTH_usb_logo 100
+static unsigned char usb_logo[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08,
+ 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0,
+ 0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0,
+ 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c,
+ 0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01,
+ 0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
+ 0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f,
+ 0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3,
+ 0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02,
+ 0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87,
+ 0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0,
+ 0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00,
+};
+#endif
+
+void usb_display_info(void)
+{
+ lcd_stop_scroll();
+ lcd_clear_display();
+
+#ifdef HAVE_LCD_BITMAP
+ /* lcd_bitmap() only supports 16 pixels height! */
+ lcd_bitmap(usb_logo, 6, 16,
+ BMPWIDTH_usb_logo, 8, false);
+ lcd_bitmap(usb_logo+BMPWIDTH_usb_logo, 6, 24,
+ BMPWIDTH_usb_logo, 8, false);
+ lcd_bitmap(usb_logo+BMPWIDTH_usb_logo*2, 6, 32,
+ BMPWIDTH_usb_logo, 8, false);
+ lcd_bitmap(usb_logo+BMPWIDTH_usb_logo*3, 6, 40,
+ BMPWIDTH_usb_logo, 8, false);
+ status_draw();
+ lcd_update();
+#else
+ lcd_puts(0, 0, "[USB Mode]");
+ lcd_icon(ICON_PARAM, false);
+ lcd_icon(ICON_AUDIO, false);
+ lcd_icon(ICON_USB, true);
+#endif
+}
+
void usb_screen(void)
{
#ifndef SIMULATOR
backlight_on();
usb_acknowledge(SYS_USB_CONNECTED_ACK);
- usb_wait_for_disconnect(&button_queue);
+ while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ/2)) {
+ if(usb_inserted()) {
+ usb_display_info();
+ }
+ }
backlight_on();
#endif
}
@@ -166,10 +235,11 @@ bool f2_screen(void)
char buf[32];
int oldrepeat = global_settings.repeat_mode;
+ lcd_setfont(FONT_SYSFIXED);
+
/* Get the font height */
lcd_getstringsize("A",&w,&h);
- lcd_setfont(FONT_SYSFIXED);
lcd_stop_scroll();
while (!exit) {