diff options
Diffstat (limited to 'apps/plugins/rockboy/sys_rockbox.c')
-rw-r--r-- | apps/plugins/rockboy/sys_rockbox.c | 18 |
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) | |||
71 | 71 | ||
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | unsigned int oldbuttonstate = 0, newbuttonstate; | 74 | unsigned int oldbuttonstate = 0, newbuttonstate,holdbutton; |
75 | 75 | ||
76 | void ev_poll(void) | 76 | void 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 |