1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 01:24:11 +01:00

[d3d9] Fix CreateQuery error return code

This commit is contained in:
WinterSnowfall 2024-10-14 12:08:25 +03:00 committed by Robin Kertels
parent 0c117595b1
commit 931796d1c2
2 changed files with 3 additions and 2 deletions

View File

@ -97,7 +97,8 @@ namespace dxvk {
};
if (FAILED(res)) {
if (DevInfoStructSize != sizeof(D3DDEVINFO_VCACHE))
// The struct size needs to be at least equal or larger
if (DevInfoStructSize < sizeof(D3DDEVINFO_VCACHE))
return D3DERR_INVALIDCALL;
memset(pDevInfoStruct, 0, sizeof(D3DDEVINFO_VCACHE));

View File

@ -3828,7 +3828,7 @@ namespace dxvk {
}
catch (const DxvkError & e) {
Logger::err(e.message());
return D3DERR_INVALIDCALL;
return D3DERR_NOTAVAILABLE;
}
}