Skip to content

Commit

Permalink
Fix red4ext changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegmd committed Sep 25, 2023
1 parent 108b158 commit 6b1da70
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/overlay/Overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void Overlay::PostInitialize()

auto& d3d12 = CET::Get().GetD3D12();
d3d12.DelayedSetTrapInputInImGui(true);
ClipToCenter(RED4ext::CGameEngine::Get()->unkC0);
ClipToCenter(RED4ext::CGameEngine::Get()->unkD0);
}

m_initialized = true;
Expand Down Expand Up @@ -190,7 +190,7 @@ void Overlay::Update()
auto& d3d12 = CET::Get().GetD3D12();
d3d12.DelayedSetTrapInputInImGui(m_enabled);
auto* pEngine = RED4ext::CGameEngine::Get();
ClipToCenter(pEngine->unkC0);
ClipToCenter(pEngine->unkD0);
m_toggled = false;
}
}
Expand Down Expand Up @@ -219,7 +219,7 @@ bool Overlay::IsInitialized() const noexcept
return m_initialized;
}

BOOL Overlay::ClipToCenter(RED4ext::CGameEngine::UnkC0* apThis)
BOOL Overlay::ClipToCenter(RED4ext::CGameEngine::UnkD0* apThis)
{
const auto wnd = static_cast<HWND>(apThis->hWnd);
const HWND foreground = GetForegroundWindow();
Expand Down
4 changes: 2 additions & 2 deletions src/overlay/Overlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "widgets/GameLog.h"
#include "widgets/ImGuiDebug.h"

using TClipToCenter = HWND(RED4ext::CGameEngine::UnkC0*);
using TClipToCenter = HWND(RED4ext::CGameEngine::UnkD0*);

struct Overlay
{
Expand All @@ -30,7 +30,7 @@ struct Overlay
protected:
void Hook();

static BOOL ClipToCenter(RED4ext::CGameEngine::UnkC0* apThis);
static BOOL ClipToCenter(RED4ext::CGameEngine::UnkD0* apThis);

private:
void DrawToolbar();
Expand Down

0 comments on commit 6b1da70

Please sign in to comment.