1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Fixed a crash when the driver's WDDM version is higher than the OS supports

This commit is contained in:
narzoul 2024-08-17 16:16:10 +02:00
parent c8c6bd0ce9
commit ae10673b3e
2 changed files with 2 additions and 2 deletions

View File

@ -437,7 +437,7 @@ namespace D3dDdi
pCreateData->Interface = origInterface;
if (SUCCEEDED(result))
{
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, m_driverVersion);
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, std::min(m_runtimeVersion, m_driverVersion));
Device::add(*this, pCreateData->hDevice);
}
return result;

View File

@ -121,7 +121,7 @@ namespace
pOpenData->Interface = origInterface;
if (SUCCEEDED(result))
{
D3dDdi::AdapterFuncs::hookVtable(*pOpenData->pAdapterFuncs, pOpenData->DriverVersion);
D3dDdi::AdapterFuncs::hookVtable(*pOpenData->pAdapterFuncs, std::min(pOpenData->Version, pOpenData->DriverVersion));
D3dDdi::Adapter::add(*pOpenData);
}
return result;