mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
'g_ppGameDevice' confirmed compatible with earlier builds
This commit is contained in:
parent
b3ed5d4052
commit
d4f9e68930
@ -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<uintptr_t>(g_pDeviceContext) );
|
||||
spdlog::debug("| VAR: ID3D11Device : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pDevice) );
|
||||
spdlog::debug("| VAR: ID3D11RenderTargetView : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pRenderTargetView) );
|
||||
spdlog::debug("| VAR: IDXGISwapChain : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pSwapChain) );
|
||||
spdlog::debug("| VAR: IDXGISwapChainPresent : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_fnIDXGISwapChainPresent));
|
||||
spdlog::debug("| FUN: IDXGISwapChain::Present : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_fnIDXGISwapChainPresent));
|
||||
spdlog::debug("| VAR: g_pSwapChain : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pSwapChain) );
|
||||
spdlog::debug("| VAR: g_pRenderTargetView : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pRenderTargetView) );
|
||||
spdlog::debug("| VAR: g_pDeviceContext : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pDeviceContext) );
|
||||
spdlog::debug("| VAR: g_pDevice : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pDevice) );
|
||||
spdlog::debug("| VAR: g_ppGameDevice : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_ppGameDevice) );
|
||||
spdlog::debug("+----------------------------------------------------------------+\n");
|
||||
}
|
||||
|
||||
|
@ -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<rsig_t>("\xD3\xEA\x48\x8B\x0D\x00\x00\x00\x00"), "xxxxx????").OffsetSelf(0x2).ResolveRelativeAddressSelf(0x3, 0x7);
|
||||
p_gGameDevice = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\xD3\xEA\x48\x8B\x0D\x00\x00\x00\x00"), "xxxxx????").FindPatternSelf("48 8B").ResolveRelativeAddressSelf(0x3, 0x7);
|
||||
g_ppGameDevice = p_gGameDevice.RCast<ID3D11Device**>(); /*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
|
||||
|
Loading…
x
Reference in New Issue
Block a user