Fix crash with nvidia overlay
This commit is contained in:
parent
a7e69d0d05
commit
b082a6da30
@ -166,19 +166,19 @@ Hook::Hook()
|
||||
{
|
||||
ImGui::CreateContext();
|
||||
|
||||
// gtaRenderHook
|
||||
if (init(kiero::RenderType::D3D11) == kiero::Status::Success)
|
||||
if (init(kiero::RenderType::D3D9) == kiero::Status::Success)
|
||||
{
|
||||
Globals::renderer = Render_DirectX11;
|
||||
kiero::bind(8, (void**)&oPresent11, Dx11Handler);
|
||||
Globals::renderer = Render_DirectX9;
|
||||
kiero::bind(16, (void**)&oReset, Reset);
|
||||
kiero::bind(42, (void**)&oEndScene, Dx9Handler);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (init(kiero::RenderType::D3D9) == kiero::Status::Success)
|
||||
// gtaRenderHook
|
||||
if (init(kiero::RenderType::D3D11) == kiero::Status::Success)
|
||||
{
|
||||
Globals::renderer = Render_DirectX9;
|
||||
kiero::bind(16, (void**)&oReset, Reset);
|
||||
kiero::bind(42, (void**)&oEndScene, Dx9Handler);
|
||||
Globals::renderer = Render_DirectX11;
|
||||
kiero::bind(8, (void**)&oPresent11, Dx11Handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ private:
|
||||
inline static f_EndScene oEndScene;
|
||||
inline static f_Reset oReset;
|
||||
inline static bool m_bMouseVisibility;
|
||||
|
||||
|
||||
static void CALLBACK RenderFrame(void* ptr);
|
||||
static HRESULT CALLBACK Dx9Handler(IDirect3DDevice9* pDevice);
|
||||
static HRESULT CALLBACK Dx11Handler(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags);
|
||||
|
@ -8,6 +8,7 @@ Vehicle::Vehicle()
|
||||
{
|
||||
ParseVehiclesIDE();
|
||||
ParseCarcolsDAT();
|
||||
|
||||
Events::processScriptsEvent += [this]
|
||||
{
|
||||
if (!m_bImagesLoaded)
|
||||
|
@ -93,7 +93,7 @@ struct STextureStructure
|
||||
{
|
||||
std::string m_FileName;
|
||||
std::string m_CategoryName;
|
||||
void* m_pTexture;
|
||||
void* m_pTexture = nullptr;
|
||||
};
|
||||
|
||||
struct HotKeyData
|
||||
|
Loading…
Reference in New Issue
Block a user