The code is hooking properly, but the new EndScene method is just never called...at all.
This is the new function
HRESULT WINAPI D3DEndScene_hook(IDirect3DDevice9* device)
{
__asm pushad;
MessageBoxA(NULL, "DX", "DX", MB_ICONEXCLAMATION);
__asm popad;
return D3DEndScene_orig(device);
}Basically a popup should appear every time EndScene is called, but it isn't. I am not sure where I am wrong.
Since the game uses LoadLibraryA to load d3d9.dll, I also used code from http://www.rohitab.c...ion-and-vtable/ to get the address of the loaded d3d9.dll and patch that.
EDIT:Fixed the problem, the code on github called device->Release();