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:
parent
2dae9c125d
commit
e7068b507a
@ -434,7 +434,10 @@ namespace D3dDdi
|
|||||||
HRESULT Adapter::pfnCreateDevice(D3DDDIARG_CREATEDEVICE* pCreateData)
|
HRESULT Adapter::pfnCreateDevice(D3DDDIARG_CREATEDEVICE* pCreateData)
|
||||||
{
|
{
|
||||||
DeviceCallbacks::hookVtable(*pCreateData->pCallbacks, m_runtimeVersion);
|
DeviceCallbacks::hookVtable(*pCreateData->pCallbacks, m_runtimeVersion);
|
||||||
|
auto origInterface = pCreateData->Interface;
|
||||||
|
pCreateData->Interface = 9;
|
||||||
HRESULT result = m_origVtable.pfnCreateDevice(m_adapter, pCreateData);
|
HRESULT result = m_origVtable.pfnCreateDevice(m_adapter, pCreateData);
|
||||||
|
pCreateData->Interface = origInterface;
|
||||||
if (SUCCEEDED(result))
|
if (SUCCEEDED(result))
|
||||||
{
|
{
|
||||||
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, m_driverVersion);
|
DeviceFuncs::hookVtable(*pCreateData->pDeviceFuncs, m_driverVersion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user