http://bugs.winehq.org/show_bug.cgi?id=14868
--- Comment #8 from David Hall (gringer) winehq@gringer.dis.org.nz 2008-08-15 21:05:57 --- Louis Lenders wrote:
just for completeness, here's the minimal patch to get the app running again:
I'm not convinced that is a good idea, as the default case for compression is covered by the line setting the compression further up in the code:
+ info->bmiHeader.biCompression = (bmp->bitmap.bmBitsPixel > 8) ? BI_BITFIELDS : BI_RGB;
[from 'git show baceb8d07e0ae08a00aaaac39c15b14f872c9d97']
I view that line as saying, "if the bits per pixel are greater than 8, set the compression to BI_BITFIELDS. Otherwise, set it to BI_RGB."
I view the the minimal patch you have as saying, "If the bits per pixel are not 15 or 24, set the compression to BI_RGB." That happens after that first line in the git patch, and seems to somewhat negate the effect of the ternary operator.
As I'm not too familiar with how the DIB format works, I hesitate to suggest another solution, but I think changing the line about the default compression before that case statement would be a better idea.
Note that the specification on MSDN mentions that BI_BITFIELDS "... is valid when used with 16- and 32-bpp bitmaps."
reference: BITMAPINFOHEADER [MSDN] http://msdn.microsoft.com/en-us/library/ms532290(VS.85).aspx