wined3d: Fix CheckDeviceMultiSampleType when queried with D3DMULTISAMPLE_NONE.

This commit is contained in:
Louis Lenders 2009-05-27 17:29:46 +00:00 committed by Alexandre Julliard
parent cc688148ac
commit 06936f04c0
2 changed files with 6 additions and 3 deletions

View File

@ -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 );

View File

@ -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