summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-08 13:19:16 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-08 13:19:16 +0000
commitfd428ddf8efbf01dc8370979b60e672c753cc473 (patch)
treebc3fcbddba87a4c103b73e6bd96909370cb2a5ba
parentdb734b41d5004fabd7a0cb110040d7a05bd0adb4 (diff)
downloadrockbox-fd428ddf8efbf01dc8370979b60e672c753cc473.tar.gz
rockbox-fd428ddf8efbf01dc8370979b60e672c753cc473.zip
More SDL simulator LCD fixes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8628 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--uisimulator/sdl/lcd-sdl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/uisimulator/sdl/lcd-sdl.c b/uisimulator/sdl/lcd-sdl.c
index c66b8115aa..a90efbd204 100644
--- a/uisimulator/sdl/lcd-sdl.c
+++ b/uisimulator/sdl/lcd-sdl.c
@@ -71,15 +71,15 @@ void lcd_update_rect(int x_start, int y_start, int width, int height)
71 Uint8 *p = (Uint8 *)lcd_surface->pixels + y * lcd_surface->pitch + x * bpp; 71 Uint8 *p = (Uint8 *)lcd_surface->pixels + y * lcd_surface->pitch + x * bpp;
72 72
73#if LCD_DEPTH == 1 73#if LCD_DEPTH == 1
74 *(Uint8 *)p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); 74 *p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1);
75#elif LCD_DEPTH == 2 75#elif LCD_DEPTH == 2
76 *(Uint8 *)p = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); 76 *p = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
77#elif LCD_DEPTH == 16 77#elif LCD_DEPTH == 16
78#if LCD_PIXELFORMAT == RGB565SWAPPED 78#if LCD_PIXELFORMAT == RGB565SWAPPED
79 unsigned bits = lcd_framebuffer[y][x]; 79 unsigned bits = lcd_framebuffer[y][x];
80 *(Uint32 *)p = (bits >> 8) | (bits << 8); 80 *(Uint16 *)p = (bits >> 8) | (bits << 8);
81#else 81#else
82 *(Uint32 *)p = lcd_framebuffer[y][x]; 82 *(Uint16 *)p = lcd_framebuffer[y][x];
83#endif 83#endif
84#endif 84#endif
85 } 85 }
@@ -129,7 +129,7 @@ void lcd_remote_update_rect(int x_start, int y_start,
129 { 129 {
130 Uint8 *p = (Uint8 *)remote_surface->pixels + y * remote_surface->pitch + x * bpp; 130 Uint8 *p = (Uint8 *)remote_surface->pixels + y * remote_surface->pitch + x * bpp;
131 131
132 *(Uint8 *)p = ((lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 1); 132 *p = ((lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 1);
133 } 133 }
134 134
135 SDL_UnlockSurface(remote_surface); 135 SDL_UnlockSurface(remote_surface);