At 01:06 AM 30/10/2001 -0800, you wrote: <snip lot of explanations>
First thanks for all this stuff, really enlightening.
This probably means that you have a 16bpp rgb565 screen. Which seems normal. It also means that the Dib is a bgr888 Dib which does not exist in Windows. So something weird is happening. Here are the interesting kind of lines:
trace:bitmap:X11DRV_DIB_SetImageBits Dib: depth=24 r=ff0000 g=ff00 b=ff trace:bitmap:X11DRV_DIB_SetImageBits Bmp: depth=16/16 r=f800 g=7e0 b=1f
This tells us that the Dib is a 24bpp dib and that it is an RGB dib, the only kind of 24bit DIB in Windows. What tells us that it's an RGB DIB is the r,g,b masks: the red color is encoded in the high bits of the 24bit value: 0xff0000. Then you hace the green, 0xff00, and the blue, 0xff, hence the rgb888 shorthand. Similarly the 'Bmp', i.e. an XImage, is a 16bpp rgb image. Here you will notice that the mask for the green color, 0x7e0, uses 6 bits instead of just 5. This gives you the rgb565 denomination. Finally we are in SetImage so we are converting the Dib into a Bmp, i.e. from rgb888 to rgb565 so we will call Convert_888_to_565_asis (since both are rgb). Now I suspect that with your application the Dib masks don't look like the above
Congratulations, you are entirely right. As in many cases, Wine does not work because it is not tolerant to strange parameters
Actually the dib masks are all equal to 0. Probably the correct fix is to assume an 'asis' (not reversed) conversion when the app does not set any mask.
Gerard
On Wed, 31 Oct 2001, Gerard Patel wrote:
Congratulations, you are entirely right. As in many cases, Wine does not work because it is not tolerant to strange parameters
Actually the dib masks are all equal to 0. Probably the correct fix is to assume an 'asis' (not reversed) conversion when the app does not set any mask.
You may want to find out where those masks are coming from first. For example, some of the DirectDraw code in Wine doesn't set the DIB masks properly for all bit depths.
Gerard Patel wrote:
At 01:06 AM 30/10/2001 -0800, you wrote:
[...]
Now I suspect that with your application the Dib masks don't look like the above
Congratulations, you are entirely right. As in many cases, Wine does not work because it is not tolerant to strange parameters
Actually the dib masks are all equal to 0. Probably the correct fix is to assume an 'asis' (not reversed) conversion when the app does not set any mask.
No no. Usually (0,0,0) means the default rgb layout. But if you always go to asis in that case, then things will be wrong for users with a bgr565 X configuration (should reverse in that case). SetImageBits_* and GetImageBits_* should never get (0,0,0) as the color masks. They don't know how to handle it and should not have to, their callers are supposed to take care of that. I think i found the source of the problem, some old code I had not changed. Can you try the attached patch?