Louis Lenders : wined3d: Fix CheckDeviceMultiSampleType when queried with D3DMULTISAMPLE_NONE.

Alexandre Julliard julliard at winehq.org
Thu May 28 09:39:44 CDT 2009


Module: wine
Branch: master
Commit: 06936f04c04869b611bd91b335a94fd9e2ae7157
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=06936f04c04869b611bd91b335a94fd9e2ae7157

Author: Louis Lenders <xerox_xerox2000 at yahoo.co.uk>
Date:   Wed May 27 17:29:46 2009 +0000

wined3d: Fix CheckDeviceMultiSampleType when queried with D3DMULTISAMPLE_NONE.

---

 dlls/d3d9/tests/device.c |    4 ++--
 dlls/wined3d/directx.c   |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 22f4234..f1d3595 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -173,12 +173,12 @@ static void test_checkdevicemultisampletype(void)
     hr = IDirect3D9_CheckDeviceMultiSampleType(pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE,
     D3DMULTISAMPLE_NONE, &qualityLevels);
     ok(SUCCEEDED(hr), "CheckDeviceMultiSampleType failed with (%08x)\n", hr);
-    todo_wine ok(qualityLevels == 1,"qualitylevel is not 1 but %d\n",qualityLevels);
+    ok(qualityLevels == 1,"qualitylevel is not 1 but %d\n",qualityLevels);
 
     hr = IDirect3D9_CheckDeviceMultiSampleType(pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, FALSE,
     D3DMULTISAMPLE_NONE, &qualityLevels);
     ok(SUCCEEDED(hr), "CheckDeviceMultiSampleType failed with (%08x)\n", hr);
-    todo_wine ok(qualityLevels == 1,"qualitylevel is not 1 but %d\n",qualityLevels);
+    ok(qualityLevels == 1,"qualitylevel is not 1 but %d\n",qualityLevels);
 
 cleanup:
     if (pD3d)     IUnknown_Release( pD3d );
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 6bad91e..eb78782 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1915,7 +1915,10 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U
 
     /* TODO: handle Windowed, add more quality levels */
 
-    if (WINED3DMULTISAMPLE_NONE == MultiSampleType) return WINED3D_OK;
+    if (WINED3DMULTISAMPLE_NONE == MultiSampleType) {
+        if(pQualityLevels) *pQualityLevels = 1;
+        return WINED3D_OK;
+    }
 
     /* By default multisampling is disabled right now as it causes issues
      * on some Nvidia driver versions and it doesn't work well in combination




More information about the wine-cvs mailing list