summaryrefslogtreecommitdiff
path: root/apps/wps.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-22 22:45:20 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-22 22:45:20 +0000
commitfe689a8541e294c472d111759e334d3814bfc5ba (patch)
tree56c260d6cc4150955321603ee1851f2ba81efcc1 /apps/wps.c
parent97f94b4fac9dbbe81b66d96564e1fe80d5adc0c3 (diff)
downloadrockbox-fe689a8541e294c472d111759e334d3814bfc5ba.tar.gz
rockbox-fe689a8541e294c472d111759e334d3814bfc5ba.zip
First crude status display for Players
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1408 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/apps/wps.c b/apps/wps.c
index e983079461..5e6cfb0449 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -32,7 +32,7 @@
32#include "mpeg.h" 32#include "mpeg.h"
33#include "usb.h" 33#include "usb.h"
34#include "power.h" 34#include "power.h"
35#include "main_menu.h" 35#include "status.h"
36 36
37#define LINE_Y 1 /* initial line */ 37#define LINE_Y 1 /* initial line */
38 38
@@ -114,6 +114,7 @@ static void draw_screen(struct mp3entry* id3)
114 break; 114 break;
115 } 115 }
116 } 116 }
117 status_draw();
117 lcd_update(); 118 lcd_update();
118} 119}
119 120
@@ -140,7 +141,6 @@ int wps_show(void)
140 ( (id3->album?id3->album[0]:0) != lastalbum ) || 141 ( (id3->album?id3->album[0]:0) != lastalbum ) ||
141 ( (id3->title?id3->title[0]:0) != lasttitle ) ) 142 ( (id3->title?id3->title[0]:0) != lasttitle ) )
142 { 143 {
143 lcd_stop_scroll();
144 draw_screen(id3); 144 draw_screen(id3);
145 lastlength = id3->length; 145 lastlength = id3->length;
146 lastsize = id3->filesize; 146 lastsize = id3->filesize;
@@ -179,10 +179,12 @@ int wps_show(void)
179#endif 179#endif
180 } 180 }
181 181
182 status_draw();
183
182#ifdef HAVE_LCD_BITMAP 184#ifdef HAVE_LCD_BITMAP
183 /* draw battery indicator line */ 185 /* draw battery indicator line */
184 lcd_clearline(0,LCD_HEIGHT-1,LCD_WIDTH-1, LCD_HEIGHT-1); 186 lcd_clearline(0,LCD_HEIGHT-1,LCD_WIDTH-1, LCD_HEIGHT-1);
185 lcd_drawline(0,LCD_HEIGHT-1,battery_level() * (LCD_WIDTH-1) / 100, LCD_HEIGHT-1); 187 lcd_drawline(0,LCD_HEIGHT-1,battery_level() * LCD_WIDTH / 100, LCD_HEIGHT-1);
186#endif 188#endif
187 189
188 for ( i=0;i<5;i++ ) { 190 for ( i=0;i<5;i++ ) {
@@ -196,9 +198,15 @@ int wps_show(void)
196 case BUTTON_UP: 198 case BUTTON_UP:
197#endif 199#endif
198 if ( playing ) 200 if ( playing )
201 {
199 mpeg_pause(); 202 mpeg_pause();
203 status_set_playmode(STATUS_PAUSE);
204 }
200 else 205 else
206 {
201 mpeg_resume(); 207 mpeg_resume();
208 status_set_playmode(STATUS_PLAY);
209 }
202 210
203 playing = !playing; 211 playing = !playing;
204 break; 212 break;
@@ -226,21 +234,14 @@ int wps_show(void)
226 case BUTTON_RIGHT: 234 case BUTTON_RIGHT:
227 mpeg_next(); 235 mpeg_next();
228 break; 236 break;
229#ifdef HAVE_RECORDER_KEYPAD 237
230 case BUTTON_F1:
231#else
232 case BUTTON_MENU:
233#endif
234 lcd_stop_scroll();
235 main_menu();
236 draw_screen(id3);
237 break;
238#ifdef HAVE_RECORDER_KEYPAD 238#ifdef HAVE_RECORDER_KEYPAD
239 case BUTTON_OFF: 239 case BUTTON_OFF:
240#else 240#else
241 case BUTTON_DOWN: 241 case BUTTON_DOWN:
242#endif 242#endif
243 mpeg_stop(); 243 mpeg_stop();
244 status_set_playmode(STATUS_STOP);
244 break; 245 break;
245#ifndef SIMULATOR 246#ifndef SIMULATOR
246 case SYS_USB_CONNECTED: 247 case SYS_USB_CONNECTED: