Commit 20a88616 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

x11drv: Convert 24-bit into 32-bit color before looking for an

available screen resolution. We do this during enumeration, so there would be no 24-bit modes available.
parent ba2c1e51
......@@ -237,7 +237,7 @@ static const char * _DM_fields(DWORD fields)
LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
HWND hwnd, DWORD flags, LPVOID lpvoid )
{
DWORD i;
DWORD i, dwBpp;
DEVMODEW dm;
TRACE("(%s,%p,%p,0x%08lx,%p)\n",debugstr_w(devname),devmode,hwnd,flags,lpvoid);
......@@ -259,12 +259,13 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
}
devmode = &dm;
}
dwBpp = (devmode->dmBitsPerPel == 24) ? 32 : devmode->dmBitsPerPel;
for (i = 0; i < dd_mode_count; i++)
{
if (devmode->dmFields & DM_BITSPERPEL)
{
if (devmode->dmBitsPerPel != dd_modes[i].dwBPP)
if (dwBpp != dd_modes[i].dwBPP)
continue;
}
if (devmode->dmFields & DM_PELSWIDTH)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment