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.tar.gz
rockbox-f7376e0e2e00e044223254fcc007e14d730f2028.zip
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 81ed976a61..f0f05cf8e9 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -28,14 +28,83 @@
28#include "mpeg.h" 28#include "mpeg.h"
29#include "usb.h" 29#include "usb.h"
30#include "settings.h" 30#include "settings.h"
31#include "status.h"
31#include "playlist.h" 32#include "playlist.h"
32 33
34#ifdef HAVE_LCD_BITMAP
35#define BMPHEIGHT_usb_logo 32
36#define BMPWIDTH_usb_logo 100
37static unsigned char usb_logo[] = {
38 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
39 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08,
41 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
42 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81,
43 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
44 0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
45 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0,
46 0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
47 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
48 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0,
49 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c,
50 0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
51 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00,
52 0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
53 0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01,
54 0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
55 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
56 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
57 0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f,
58 0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3,
59 0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02,
60 0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
61 0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00,
62 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
63 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
64 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80,
65 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
66 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87,
67 0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0,
68 0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
69 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00,
70};
71#endif
72
73void usb_display_info(void)
74{
75 lcd_stop_scroll();
76 lcd_clear_display();
77
78#ifdef HAVE_LCD_BITMAP
79 /* lcd_bitmap() only supports 16 pixels height! */
80 lcd_bitmap(usb_logo, 6, 16,
81 BMPWIDTH_usb_logo, 8, false);
82 lcd_bitmap(usb_logo+BMPWIDTH_usb_logo, 6, 24,
83 BMPWIDTH_usb_logo, 8, false);
84 lcd_bitmap(usb_logo+BMPWIDTH_usb_logo*2, 6, 32,
85 BMPWIDTH_usb_logo, 8, false);
86 lcd_bitmap(usb_logo+BMPWIDTH_usb_logo*3, 6, 40,
87 BMPWIDTH_usb_logo, 8, false);
88 status_draw();
89 lcd_update();
90#else
91 lcd_puts(0, 0, "[USB Mode]");
92 lcd_icon(ICON_PARAM, false);
93 lcd_icon(ICON_AUDIO, false);
94 lcd_icon(ICON_USB, true);
95#endif
96}
97
33void usb_screen(void) 98void usb_screen(void)
34{ 99{
35#ifndef SIMULATOR 100#ifndef SIMULATOR
36 backlight_on(); 101 backlight_on();
37 usb_acknowledge(SYS_USB_CONNECTED_ACK); 102 usb_acknowledge(SYS_USB_CONNECTED_ACK);
38 usb_wait_for_disconnect(&button_queue); 103 while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ/2)) {
104 if(usb_inserted()) {
105 usb_display_info();
106 }
107 }
39 backlight_on(); 108 backlight_on();
40#endif 109#endif
41} 110}
@@ -166,10 +235,11 @@ bool f2_screen(void)
166 char buf[32]; 235 char buf[32];
167 int oldrepeat = global_settings.repeat_mode; 236 int oldrepeat = global_settings.repeat_mode;
168 237
238 lcd_setfont(FONT_SYSFIXED);
239
169 /* Get the font height */ 240 /* Get the font height */
170 lcd_getstringsize("A",&w,&h); 241 lcd_getstringsize("A",&w,&h);
171 242
172 lcd_setfont(FONT_SYSFIXED);
173 lcd_stop_scroll(); 243 lcd_stop_scroll();
174 244
175 while (!exit) { 245 while (!exit) {