summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c b/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c
index 3a12d984b8..9d11ae2acc 100644
--- a/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c
+++ b/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c
@@ -687,21 +687,21 @@ static void blit_rotated(fb_data *src, int x, int y, int w, int h)
687 rb->lcd_framebuffer[x_0 * LCD_WIDTH + y_0] = src[(LCD_WIDTH - y_0) * LCD_HEIGHT + x_0]; 687 rb->lcd_framebuffer[x_0 * LCD_WIDTH + y_0] = src[(LCD_WIDTH - y_0) * LCD_HEIGHT + x_0];
688} 688}
689 689
690//static fb_data tmp_fb[LCD_WIDTH * LCD_HEIGHT];
691
692static void ROCKBOX_UpdateRects(_THIS, int numrects, SDL_Rect *rects) 690static void ROCKBOX_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
693{ 691{
692 /* Direct mode writes directly to lcd_framebuffer. Update and
693 * exit! */
694 if(this->hidden->direct)
695 {
696 rb->lcd_update();
697 return;
698 }
699
694 if(this->screen->pixels) 700 if(this->screen->pixels)
695 { 701 {
696 for(int i = 0; i < numrects; ++i) 702 for(int i = 0; i < numrects; ++i)
697 { 703 {
698 /* no scaling */ 704 if(this->hidden->rotate)
699 if(this->hidden->direct)
700 {
701 /* no-op */
702 }
703 /* screen is rotated */
704 else if(this->hidden->rotate)
705 { 705 {
706 LOGF("rotated copy"); 706 LOGF("rotated copy");
707 blit_rotated(this->screen->pixels, rects[i].x, rects[i].y, rects[i].w, rects[i].h); 707 blit_rotated(this->screen->pixels, rects[i].x, rects[i].y, rects[i].w, rects[i].h);
@@ -769,9 +769,13 @@ static void ROCKBOX_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
769 /* FIXME: this won't work for rotated screen or overlapping rects */ 769 /* FIXME: this won't work for rotated screen or overlapping rects */
770 flip_pixels(rects[i].x, rects[i].y, rects[i].w, rects[i].h); 770 flip_pixels(rects[i].x, rects[i].y, rects[i].w, rects[i].h);
771#endif 771#endif
772 rb->lcd_update_rect(rects[i].x, rects[i].y, rects[i].w, rects[i].h); 772 /* We are lazy and do not want to figure out the new
773 * rectangle coordinates. See lcd_update() below. */
774 //rb->lcd_update_rect(rects[i].x, rects[i].y, rects[i].w, rects[i].h);
773 } /* for */ 775 } /* for */
774 } /* if */ 776 } /* if */
777
778 rb->lcd_update();
775} 779}
776 780
777int ROCKBOX_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors) 781int ROCKBOX_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors)