Hi,
I have some comments on this patch :
if (devmode->dmFields & DM_BITSPERPEL)
{
if (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP))
continue;
}
This may cause problems... It's not per-se a problem in your patch, but from what I know Windows applications expect to have '32' on a 24/32 display and Wine stores here '24'.
So you may 'refuse' some modes that should be valid.
(again, if ever you have a graphic card still supporting 24/24 mode, please tell me so that I can torture your XFree libraries to find a valid way of checking the difference between 24/24 and 24/32)
SYSMETRICS_Set( SM_CXSCREEN, devmode->dmPelsWidth );
SYSMETRICS_Set( SM_CYSCREEN, devmode->dmPelsHeight );
This are actually 'User' internal functions ? In that case, why not just do the resolution change in the X11 driver and let User itself handle the sysmetric change ? I.e. call these in the 'ChangeDisplaySettingsExW' function and not in the low-level graphic driver.
Now my most important grief : did you think about all the people who 1) use Desktop mode and 2) disable XVidMode in their config file ? For those, applications may now abort saying 'Vidmode not supported' (whereas it was working just fine before because we accepted all modes that are smaller than the actual screen size).
So I would say that if no VidMode is present or if the User driver function does not exist in the driver, the old 'stub' API should remain as it is.
Lionel