summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/lcd-bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/lcd-bitmap.c')
-rw-r--r--uisimulator/sdl/lcd-bitmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c
index 438b133804..fa3e5d2b0d 100644
--- a/uisimulator/sdl/lcd-bitmap.c
+++ b/uisimulator/sdl/lcd-bitmap.c
@@ -45,8 +45,11 @@ static unsigned long get_lcd_pixel(int x, int y)
45#elif LCD_DEPTH == 2 45#elif LCD_DEPTH == 2
46#if LCD_PIXELFORMAT == HORIZONTAL_PACKING 46#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
47 return ((lcd_framebuffer[y][x/4] >> (2 * (~x & 3))) & 3); 47 return ((lcd_framebuffer[y][x/4] >> (2 * (~x & 3))) & 3);
48#else 48#elif LCD_PIXELFORMAT == VERTICAL_PACKING
49 return ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); 49 return ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
50#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
51 unsigned bits = (lcd_framebuffer[y/8][x] >> (y & 7)) & 0x0101;
52 return (bits | (bits >> 7)) & 3;
50#endif 53#endif
51#elif LCD_DEPTH == 16 54#elif LCD_DEPTH == 16
52#if LCD_PIXELFORMAT == RGB565SWAPPED 55#if LCD_PIXELFORMAT == RGB565SWAPPED