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.
This commit is contained in:
parent
ba2c1e5116
commit
20a886164f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue