summaryrefslogtreecommitdiffstats
path: root/uisimulator/win32/lcd-win32.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-14 22:15:10 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-14 22:15:10 +0000
commitc19773c2b4d40082af017a8f5353bcaaf07600d9 (patch)
tree209bff249b129154f5c9ca25ed889de3c372ae99 /uisimulator/win32/lcd-win32.c
parentfebb52fc037959ba8ce55091efa5bdc90475da6b (diff)
downloadrockbox-c19773c2b4d40082af017a8f5353bcaaf07600d9.tar.gz
rockbox-c19773c2b4d40082af017a8f5353bcaaf07600d9.tar.bz2
rockbox-c19773c2b4d40082af017a8f5353bcaaf07600d9.zip
Win32 sim: better bitmap initialisation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7148 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/lcd-win32.c')
-rw-r--r--uisimulator/win32/lcd-win32.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c
index 216aa65a0e..40f74ee2d6 100644
--- a/uisimulator/win32/lcd-win32.c
+++ b/uisimulator/win32/lcd-win32.c
@@ -276,6 +276,10 @@ void lcd_backlight (bool on)
void lcdcolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
{
int i;
+
+ bmi.bmiHeader.biClrUsed = index + count;
+ bmi.bmiHeader.biClrImportant = index + count;
+
count--;
for (i = 0; i <= count; i++)
{
@@ -293,6 +297,10 @@ void lcdcolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
void lcdremotecolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
{
int i;
+
+ remote_bmi.bmiHeader.biClrUsed = index + count;
+ remote_bmi.bmiHeader.biClrImportant = index + count;
+
count--;
for (i = 0; i <= count; i++)
{
@@ -309,8 +317,6 @@ void lcdremotecolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
/* initialise simulator lcd driver */
void simlcdinit(void)
{
- bmi.bmiHeader.biClrUsed = (1<<LCD_DEPTH);
- bmi.bmiHeader.biClrImportant = (1<<LCD_DEPTH);
lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max);
#ifdef HAVE_REMOTE_LCD
lcdremotecolors(0, (1<<LCD_REMOTE_DEPTH), &remote_color_zero, &remote_color_max);