diff --git a/r5dev/windows/id3dx.cpp b/r5dev/windows/id3dx.cpp index 526cc499..2f4cd242 100644 --- a/r5dev/windows/id3dx.cpp +++ b/r5dev/windows/id3dx.cpp @@ -531,14 +531,15 @@ void DirectX_Shutdown() } } -void HIDXGI::GetAdr(void) const +void VDXGI::GetAdr(void) const { /////////////////////////////////////////////////////////////////////////////// - spdlog::debug("| VAR: ID3D11DeviceContext : {:#18x} |\n", reinterpret_cast(g_pDeviceContext) ); - spdlog::debug("| VAR: ID3D11Device : {:#18x} |\n", reinterpret_cast(g_pDevice) ); - spdlog::debug("| VAR: ID3D11RenderTargetView : {:#18x} |\n", reinterpret_cast(g_pRenderTargetView) ); - spdlog::debug("| VAR: IDXGISwapChain : {:#18x} |\n", reinterpret_cast(g_pSwapChain) ); - spdlog::debug("| VAR: IDXGISwapChainPresent : {:#18x} |\n", reinterpret_cast(g_fnIDXGISwapChainPresent)); + spdlog::debug("| FUN: IDXGISwapChain::Present : {:#18x} |\n", reinterpret_cast(g_fnIDXGISwapChainPresent)); + spdlog::debug("| VAR: g_pSwapChain : {:#18x} |\n", reinterpret_cast(g_pSwapChain) ); + spdlog::debug("| VAR: g_pRenderTargetView : {:#18x} |\n", reinterpret_cast(g_pRenderTargetView) ); + spdlog::debug("| VAR: g_pDeviceContext : {:#18x} |\n", reinterpret_cast(g_pDeviceContext) ); + spdlog::debug("| VAR: g_pDevice : {:#18x} |\n", reinterpret_cast(g_pDevice) ); + spdlog::debug("| VAR: g_ppGameDevice : {:#18x} |\n", reinterpret_cast(g_ppGameDevice) ); spdlog::debug("+----------------------------------------------------------------+\n"); } diff --git a/r5dev/windows/id3dx.h b/r5dev/windows/id3dx.h index 918cc1aa..f41047e4 100644 --- a/r5dev/windows/id3dx.h +++ b/r5dev/windows/id3dx.h @@ -115,21 +115,19 @@ enum class DXGISwapChainVTbl : short inline CMemory p_gGameDevice; inline ID3D11Device** g_ppGameDevice = nullptr; -class HIDXGI : public IDetour +class VDXGI : public IDetour { virtual void GetAdr(void) const; virtual void GetFun(void) const { } virtual void GetVar(void) const { -#ifdef GAMEDLL_S3 - p_gGameDevice = g_mGameDll.FindPatternSIMD(reinterpret_cast("\xD3\xEA\x48\x8B\x0D\x00\x00\x00\x00"), "xxxxx????").OffsetSelf(0x2).ResolveRelativeAddressSelf(0x3, 0x7); + p_gGameDevice = g_mGameDll.FindPatternSIMD(reinterpret_cast("\xD3\xEA\x48\x8B\x0D\x00\x00\x00\x00"), "xxxxx????").FindPatternSelf("48 8B").ResolveRelativeAddressSelf(0x3, 0x7); g_ppGameDevice = p_gGameDevice.RCast(); /*D3 EA 48 8B 0D ? ? ? ?*/ -#endif } virtual void GetCon(void) const { } virtual void Attach(void) const { } virtual void Detach(void) const { } /////////////////////////////////////////////////////////////////////////////// }; -REGISTER(HIDXGI); +REGISTER(VDXGI); #endif // !DEDICATED