summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-01-13 12:55:30 +0200
committerAlon Levy <alevy@redhat.com>2012-01-13 17:42:23 +0200
commit96c292a0b491ac1ed8d352b4ee0bb099a6ec7332 (patch)
tree9f9c39a5aceea54debc79be576424baec7809917 /client
parentfe6119764379e20336989585fb13ab1a3ba945bc (diff)
downloadspice-96c292a0b491ac1ed8d352b4ee0bb099a6ec7332.tar.gz
spice-96c292a0b491ac1ed8d352b4ee0bb099a6ec7332.tar.xz
spice-96c292a0b491ac1ed8d352b4ee0bb099a6ec7332.zip
client/windows: arraysize(inf.bmiColors) == 1 in mingw32
Diffstat (limited to 'client')
-rw-r--r--client/windows/red_pixmap_gdi.cpp3
-rw-r--r--client/windows/red_pixmap_sw.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/client/windows/red_pixmap_gdi.cpp b/client/windows/red_pixmap_gdi.cpp
index 4336f461..2d93113d 100644
--- a/client/windows/red_pixmap_gdi.cpp
+++ b/client/windows/red_pixmap_gdi.cpp
@@ -64,9 +64,12 @@ RedPixmapGdi::RedPixmapGdi(int width, int height, RedDrawable::Format format, bo
bitmap_info.inf.bmiColors[0].rgbRed = 0;
bitmap_info.inf.bmiColors[0].rgbGreen = 0;
bitmap_info.inf.bmiColors[0].rgbBlue = 0;
+#ifndef __MINGW32__
+ // inf.bmiColors is [1] in mingw/include/wingdi.h
bitmap_info.inf.bmiColors[1].rgbRed = 0xff;
bitmap_info.inf.bmiColors[1].rgbGreen = 0xff;
bitmap_info.inf.bmiColors[1].rgbBlue = 0xff;
+#endif
break;
case RedDrawable::RGB16_565:
pixel_format = (DWORD *)bitmap_info.inf.bmiColors;
diff --git a/client/windows/red_pixmap_sw.cpp b/client/windows/red_pixmap_sw.cpp
index 991b6735..9ed1460d 100644
--- a/client/windows/red_pixmap_sw.cpp
+++ b/client/windows/red_pixmap_sw.cpp
@@ -77,9 +77,12 @@ RedPixmapSw::RedPixmapSw(int width, int height, RedDrawable::Format format,
bitmap_info.inf.bmiColors[0].rgbRed = 0;
bitmap_info.inf.bmiColors[0].rgbGreen = 0;
bitmap_info.inf.bmiColors[0].rgbBlue = 0;
+#ifndef __MINGW32__
+ // inf.bmiColors is [1] in mingw/include/wingdi.h
bitmap_info.inf.bmiColors[1].rgbRed = 0xff;
bitmap_info.inf.bmiColors[1].rgbGreen = 0xff;
bitmap_info.inf.bmiColors[1].rgbBlue = 0xff;
+#endif
break;
case RedDrawable::RGB16_565:
pixel_format = (DWORD *)bitmap_info.inf.bmiColors;