From 5040cc53ec0e0281b2824b3a82d360adc60eff4c Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Tue, 23 Dec 2003 23:41:45 +0000 Subject: Screen buffer transposed, such that bytes in X-direction are consecutive. This enables my turbocharged lcd_write_data() for regular screen updates. Please check the X11 sim, Win32 works. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4177 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/win32/lcd-win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'uisimulator/win32') diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c index dcdb16f1f1..243e83dd2e 100644 --- a/uisimulator/win32/lcd-win32.c +++ b/uisimulator/win32/lcd-win32.c @@ -23,7 +23,7 @@ #include "lcd.h" #include "lcd-playersim.h" -unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8]; /* the display */ +unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; /* the display */ char bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */ BITMAPINFO2 bmi = @@ -80,7 +80,7 @@ void lcd_update() for (x = 0; x < LCD_WIDTH; x++) for (y = 0; y < LCD_HEIGHT; y++) - bitmap[y][x] = ((lcd_framebuffer[x][y/8] >> (y & 7)) & 1); + bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); InvalidateRect (hGUIWnd, NULL, FALSE); @@ -107,7 +107,7 @@ void lcd_update_rect(int x_start, int y_start, for (x = x_start; x < xmax; x++) for (y = y_start; y < ymax; y++) - bitmap[y][x] = ((lcd_framebuffer[x][y/8] >> (y & 7)) & 1); + bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); /* Bagder: If I only knew how, I would make this call only invalidate the actual rectangle we want updated here, this NULL thing here will -- cgit v1.2.3