http://bugs.winehq.org/show_bug.cgi?id=7477
Andrey Turkin andrey.turkin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.turkin@gmail.com
--- Comment #10 from Andrey Turkin andrey.turkin@gmail.com 2007-12-23 14:56:04 --- Anastasius is right about SDL. This crash can happen only if X runs in 16-bit depth mode (so there are easy workaround). In SDL, root cause lies in DIB_SussScreenDepth function; namely, this: <snip> /* Convert the DDB to a DIB. We need to call GetDIBits twice: * the first call just fills in the BITMAPINFOHEADER; the * second fills in the bitfields or palette. */ GetDIBits(hdc, hbm, 0, 1, NULL, (LPBITMAPINFO) dib_hdr, DIB_RGB_COLORS); GetDIBits(hdc, hbm, 0, 1, NULL, (LPBITMAPINFO) dib_hdr, DIB_RGB_COLORS); DeleteObject(hbm); ReleaseDC(NULL, hdc);
depth = 0; switch( dib_hdr->biBitCount ) { case 8: depth = 8; break; case 24: depth = 24; break; case 32: depth = 32; break; case 16: if( dib_hdr->biCompression == BI_BITFIELDS ) { /* check the red mask */ switch( ((DWORD*)((char*)dib_hdr + dib_hdr->biSize))[0] ) { case 0xf800: depth = 16; break; /* 565 */ case 0x7c00: depth = 15; break; /* 555 */ } } </snip>
Difference between Windows and Wine is in GetDIBits - in Windows second GetDIBits invocation (with bit depth filled in) fills in color masks, while in Wine it does not. I have no idea how to properly fix the function.