summaryrefslogtreecommitdiff
path: root/apps/plugins
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
parenta17ee5f282457dcd3dbfdb3edbd69e5fe70e706f (diff)
downloadrockbox-984cd6e568c841f4110f070161ad28fbe4c85342.tar.gz
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')
-rw-r--r--apps/plugins/rockboy/lcd.c11
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c18
2 files changed, 21 insertions, 8 deletions
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index e202e72b8b..637a44c9c9 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -739,13 +739,14 @@ void lcd_refreshline(void)
739 if (!(R_LCDC & 0x80)) 739 if (!(R_LCDC & 0x80))
740 return; /* should not happen... */ 740 return; /* should not happen... */
741 741
742 if ( ((fb.mode==0)&&(R_LY >= 128)) ||
743 ((fb.mode==1)&&(R_LY < 16)) ||
744 ((fb.mode==2)&&((R_LY<8)||(R_LY>=136)))
745
742#if LCD_HEIGHT == 64 746#if LCD_HEIGHT == 64
743 if ( ((fb.mode==0)&&(R_LY >= 128 || R_LY & 1)) || 747 || (R_LY & 1) /* calculate only even lines */
744 ((fb.mode==1)&&(R_LY < 16 || R_LY & 1))) /* calculate only even lines */
745#else
746 if ( ((fb.mode==0)&&(R_LY >= 128)) ||
747 ((fb.mode==1)&&(R_LY < 16)))
748#endif 748#endif
749 )
749 return; 750 return;
750 751
751 updatepatpix(); 752 updatepatpix();
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)
71 71
72#endif 72#endif
73 73
74unsigned int oldbuttonstate = 0, newbuttonstate; 74unsigned int oldbuttonstate = 0, newbuttonstate,holdbutton;
75 75
76void ev_poll(void) 76void ev_poll(void)
77{ 77{
@@ -82,7 +82,9 @@ void ev_poll(void)
82 pressed = newbuttonstate & ~oldbuttonstate; 82 pressed = newbuttonstate & ~oldbuttonstate;
83 oldbuttonstate = newbuttonstate; 83 oldbuttonstate = newbuttonstate;
84#if CONFIG_KEYPAD == IRIVER_H100_PAD 84#if CONFIG_KEYPAD == IRIVER_H100_PAD
85 fb.mode=rb->button_hold(); 85 if (rb->button_hold()&~holdbutton)
86 fb.mode=(fb.mode+1)%3;
87 holdbutton=rb->button_hold();
86#endif 88#endif
87 if(released) { 89 if(released) {
88 ev.type = EV_RELEASE; 90 ev.type = EV_RELEASE;
@@ -161,7 +163,12 @@ void vid_update(int scanline)
161#if LCD_HEIGHT == 64 /* Archos */ 163#if LCD_HEIGHT == 64 /* Archos */
162 int balance = 0; 164 int balance = 0;
163 if (fb.mode==1) 165 if (fb.mode==1)
164 scanline-=16; 166 scanline-=16;
167 else if (fb.mode==2) {
168 scanline-=8;
169 if(scanline>=128)
170 return;
171 }
165 scanline_remapped = scanline / 16; 172 scanline_remapped = scanline / 16;
166 frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; 173 frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
167 while (cnt < 160) { 174 while (cnt < 160) {
@@ -235,6 +242,11 @@ void vid_update(int scanline)
235#else /* LCD_HEIGHT != 64, iRiver */ 242#else /* LCD_HEIGHT != 64, iRiver */
236 if (fb.mode==1) 243 if (fb.mode==1)
237 scanline-=16; 244 scanline-=16;
245 else if (fb.mode==2) {
246 scanline-=8;
247 if(scanline>=128)
248 return;
249 }
238#ifdef GRAYSCALE 250#ifdef GRAYSCALE
239 scanline_remapped = scanline / 4; 251 scanline_remapped = scanline / 4;
240#else 252#else