summaryrefslogtreecommitdiffstats
path: root/apps/plugins/rockboy/sys_rockbox.c
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-03-04 12:48:29 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-03-04 12:48:29 +0000
commit984cd6e568c841f4110f070161ad28fbe4c85342 (patch)
tree862b29ed5a591a6032a2001177cd7d7019306e88 /apps/plugins/rockboy/sys_rockbox.c
parenta17ee5f282457dcd3dbfdb3edbd69e5fe70e706f (diff)
downloadrockbox-984cd6e568c841f4110f070161ad28fbe4c85342.tar.gz
rockbox-984cd6e568c841f4110f070161ad28fbe4c85342.tar.bz2
rockbox-984cd6e568c841f4110f070161ad28fbe4c85342.zip
New lcd mode; drop top 8 and bottom 8 lines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6135 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/sys_rockbox.c')
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 3773b67f02..9bc3a6b350 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -71,7 +71,7 @@ void joy_close(void)
#endif
-unsigned int oldbuttonstate = 0, newbuttonstate;
+unsigned int oldbuttonstate = 0, newbuttonstate,holdbutton;
void ev_poll(void)
{
@@ -82,7 +82,9 @@ void ev_poll(void)
pressed = newbuttonstate & ~oldbuttonstate;
oldbuttonstate = newbuttonstate;
#if CONFIG_KEYPAD == IRIVER_H100_PAD
- fb.mode=rb->button_hold();
+ if (rb->button_hold()&~holdbutton)
+ fb.mode=(fb.mode+1)%3;
+ holdbutton=rb->button_hold();
#endif
if(released) {
ev.type = EV_RELEASE;
@@ -161,7 +163,12 @@ void vid_update(int scanline)
#if LCD_HEIGHT == 64 /* Archos */
int balance = 0;
if (fb.mode==1)
- scanline-=16;
+ scanline-=16;
+ else if (fb.mode==2) {
+ scanline-=8;
+ if(scanline>=128)
+ return;
+ }
scanline_remapped = scanline / 16;
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
while (cnt < 160) {
@@ -235,6 +242,11 @@ void vid_update(int scanline)
#else /* LCD_HEIGHT != 64, iRiver */
if (fb.mode==1)
scanline-=16;
+ else if (fb.mode==2) {
+ scanline-=8;
+ if(scanline>=128)
+ return;
+ }
#ifdef GRAYSCALE
scanline_remapped = scanline / 4;
#else