1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-01 08:52:11 +01:00

[d3d9] Fixed return code on CheckAdapterFormat with D3DFMT_UNKNOWN

This commit is contained in:
WinterSnowfall 2024-10-14 10:29:59 +03:00 committed by Robin Kertels
parent a7c2eb140e
commit a760f4a8dc

View File

@ -114,6 +114,9 @@ namespace dxvk {
DWORD Usage, DWORD Usage,
D3DRESOURCETYPE RType, D3DRESOURCETYPE RType,
D3D9Format CheckFormat) { D3D9Format CheckFormat) {
if(unlikely(AdapterFormat == D3D9Format::Unknown))
return D3DERR_INVALIDCALL;
if (!IsSupportedAdapterFormat(AdapterFormat)) if (!IsSupportedAdapterFormat(AdapterFormat))
return D3DERR_NOTAVAILABLE; return D3DERR_NOTAVAILABLE;