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

Fixed interface version in pfnCreateDevice

Fixes a crash on old Intel drivers (issue #299).
This commit is contained in:
narzoul 2024-04-22 23:38:46 +02:00
parent 2dae9c125d
commit e7068b507a

View File

@ -434,7 +434,10 @@ namespace D3dDdi
HRESULT Adapter::pfnCreateDevice(D3DDDIARG_CREATEDEVICE* pCreateData)
{
DeviceCallbacks::hookVtable(*pCreateData->pCallbacks, m_runtimeVersion);
auto origInterface = pCreateData->Interface;
pCreateData->Interface = 9;
HRESULT result = m_origVtable.pfnCreateDevice(m_adapter, pCreateData);
pCreateData->Interface = origInterface;
if (SUCCEEDED(result))
{
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, m_driverVersion);