Skip to content

Commit 28353aa

Browse files
Synchronize changes from 1.6 branch [ci skip]
5a3494c Fix UB in CProxyDirect3D9
2 parents 17065a9 + 5a3494c commit 28353aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Client/core/DXHook/CProxyDirect3D9.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ bool CreateDeviceSecondCallCheck(HRESULT& hOutResult, IDirect3D9* pDirect3D, UIN
963963
if (pPresentationParameters->BackBufferWidth == 0)
964964
{
965965
WriteDebugEvent(SString(" Passing through call #%d to CreateDevice because size is invalid", uiCreateCount));
966+
hOutResult = pDirect3D->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
966967
return true;
967968
}
968969

@@ -972,6 +973,7 @@ bool CreateDeviceSecondCallCheck(HRESULT& hOutResult, IDirect3D9* pDirect3D, UIN
972973
SString strMessage(" Passing through call #%d to CreateDevice because not main thread", uiCreateCount);
973974
WriteDebugEvent(strMessage);
974975
AddReportLog(8627, strMessage);
976+
hOutResult = pDirect3D->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
975977
return true;
976978
}
977979

0 commit comments

Comments
 (0)