Skip to content

Commit

Permalink
Merge pull request #938 from lhecker/device4-crash-fix
Browse files Browse the repository at this point in the history
Fix ID2D1Device5/6 hook offsets
  • Loading branch information
snowie2000 committed May 31, 2023
2 parents 053e6f9 + fc3491b commit 0f5bd10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions directwrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@ void HookDevice(ID2D1Device* d2dDevice){
CComPtr<ID2D1Device5> ptr6;
hr = (d2dDevice)->QueryInterface(&ptr6);
if SUCCEEDED(hr) {
HOOK(ptr6, CreateDeviceContext6, 17);
HOOK(ptr6, CreateDeviceContext6, 19);
MyDebug(L"ID2D1Device5 hooked");
}
CComPtr<ID2D1Device6> ptr7;
hr = (d2dDevice)->QueryInterface(&ptr7);
if SUCCEEDED(hr) {
HOOK(ptr7, CreateDeviceContext7, 18);
HOOK(ptr7, CreateDeviceContext7, 20);
MyDebug(L"ID2D1Device6 hooked");
}
return true;
Expand Down

0 comments on commit 0f5bd10

Please sign in to comment.