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:
parent
c8c6bd0ce9
commit
ae10673b3e
@ -437,7 +437,7 @@ namespace D3dDdi
|
|||||||
pCreateData->Interface = origInterface;
|
pCreateData->Interface = origInterface;
|
||||||
if (SUCCEEDED(result))
|
if (SUCCEEDED(result))
|
||||||
{
|
{
|
||||||
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, m_driverVersion);
|
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, std::min(m_runtimeVersion, m_driverVersion));
|
||||||
Device::add(*this, pCreateData->hDevice);
|
Device::add(*this, pCreateData->hDevice);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -121,7 +121,7 @@ namespace
|
|||||||
pOpenData->Interface = origInterface;
|
pOpenData->Interface = origInterface;
|
||||||
if (SUCCEEDED(result))
|
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);
|
D3dDdi::Adapter::add(*pOpenData);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user