Stefan Dösinger : wined3d: Blacklist WINED3DFMT_R8G8B8 .

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 27 05:42:28 CDT 2006


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Thu Jul 27 00:56:09 2006 +0200

wined3d: Blacklist WINED3DFMT_R8G8B8.

---

 dlls/wined3d/directx.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index d804f93..51d41e7 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1494,12 +1494,24 @@ static HRESULT WINAPI IWineD3DImpl_Check
         }
     }
 
+    /* This format is nothing special and it is supported perfectly.
+     * However, ati and nvidia driver on windows do not mark this format
+     * supported(tested with the dxCapsViewer) and pretending to
+     * support this format uncovers a bug in Battlefield 1942(fonts are missing)
+     * So do the same as Windows drivers and pretend not to support it on dx8 and 9
+     * Enable it on dx7. It will need additional checking on dx10 when we support it.
+     */
+    if(This->dxVersion > 7 && CheckFormat == WINED3DFMT_R8G8B8) {
+        TRACE_(d3d_caps)("[FAILED]\n");
+        return WINED3DERR_NOTAVAILABLE;
+    }
+
     switch (CheckFormat) {
 
         /*****
          *  supported: RGB(A) formats
          */
-        case WINED3DFMT_R8G8B8:
+        case WINED3DFMT_R8G8B8: /* Enable for dx7, blacklisted for 8 and 9 above */
         case WINED3DFMT_A8R8G8B8:
         case WINED3DFMT_X8R8G8B8:
         case WINED3DFMT_R5G6B5:




More information about the wine-cvs mailing list