Just a small nitpick :
- XF86VidModeModeInfo *mode;
- DWORD dwBpp = GetSystemMetrics(SM_WINE_BPP);
- if (dwBpp == 24) dwBpp = 32;
I would prefer this change to be done directly in the 'GetDeviceCaps' function of the X11DRV to always return 32 in case the scren depth is 24. I know for sure that this fixes at least one application and should not hurt others :-)
A part from that, the patch looks nice... If it breaks apps on Desktop mode, we will fix it then by re-adding the 'dummy' modes :-)
Lionel
Lionel Ulmer wrote:
Just a small nitpick :
- XF86VidModeModeInfo *mode;
- DWORD dwBpp = GetSystemMetrics(SM_WINE_BPP);
- if (dwBpp == 24) dwBpp = 32;
I would prefer this change to be done directly in the 'GetDeviceCaps' function of the X11DRV to always return 32 in case the scren depth is 24. I know for sure that this fixes at least one application and should not hurt others :-)
I tried changing the return for case BITSPIXEL in X11DRV_GetDeviceCaps, and now I get all sorts of errors from X11DRV_CreateBitmap: Trying to make bitmap with planes=1, bpp=32
That shows up because the screen_depth global variable is still set to 24, but the application gets 32 as the depth.
Interestingly, the applications I tried all still seem to work, even though they complain loudly.
Is there another variable or check that should change somewhere?
Alex
I tried changing the return for case BITSPIXEL in X11DRV_GetDeviceCaps, and now I get all sorts of errors from X11DRV_CreateBitmap: Trying to make bitmap with planes=1, bpp=32
Oh well, submit your patch as it is now. The 24 / 32 'problem' needs a specific fix anyway.
A work around for the issue would be to essentially consider 24 and 32 modes as identical in your code (this way one is sure to never 'accidently' refuse a mode due to this feature).
Lionel