diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-02-08 12:43:14 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-02-08 12:43:14 +0000 |
commit | 3903807e62c1d810210d5ccc5972b7608dabed3b (patch) | |
tree | 8406a74f988b53d71ff0ae595a93e6ac2144604b /uisimulator/sdl/lcd-sdl.c | |
parent | 4220ed61d04711a72503792b430996832df1f579 (diff) | |
download | rockbox-3903807e62c1d810210d5ccc5972b7608dabed3b.tar.gz rockbox-3903807e62c1d810210d5ccc5972b7608dabed3b.zip |
The SDL simulator didn't draw the pixels correctly on targets with gray/mono LCD
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8624 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/lcd-sdl.c')
-rw-r--r-- | uisimulator/sdl/lcd-sdl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/uisimulator/sdl/lcd-sdl.c b/uisimulator/sdl/lcd-sdl.c index 758ab90ef9..ad3463c390 100644 --- a/uisimulator/sdl/lcd-sdl.c +++ b/uisimulator/sdl/lcd-sdl.c | |||
@@ -71,9 +71,9 @@ 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 | *(Uint32 *)p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); | 74 | *(Uint8 *)p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); |
75 | #elif LCD_DEPTH == 2 | 75 | #elif LCD_DEPTH == 2 |
76 | *(Uint32 *)p = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); | 76 | *(Uint8 *)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]; |