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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Mar 1 05:54:56 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 20a886164f8368af6c47d8891703ff83b6049b29
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=20a886164f8368af6c47d8891703ff83b6049b29

Author: Vitaliy Margolen <wine-patch at kievinfo.com>
Date:   Sat Feb 25 23:15:44 2006 -0700

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.

---

 dlls/x11drv/settings.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/x11drv/settings.c b/dlls/x11drv/settings.c
index 5e3665f..5187b8b 100644
--- a/dlls/x11drv/settings.c
+++ b/dlls/x11drv/settings.c
@@ -237,7 +237,7 @@ static const char * _DM_fields(DWORD fie
 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( LPC
         }
         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)




More information about the wine-cvs mailing list