From a165534b3c2d3916f7ef84318bc072347605ce64 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 16 Jun 2024 20:27:05 +0200 Subject: [PATCH] InputSystem: implement GetAttachedWindow() No longer virtual in r5, but is still needed; reimplemented. --- src/inputsystem/inputsystem.cpp | 8 ++++++++ src/inputsystem/inputsystem.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/inputsystem/inputsystem.cpp b/src/inputsystem/inputsystem.cpp index a49bcf4a..68595e63 100644 --- a/src/inputsystem/inputsystem.cpp +++ b/src/inputsystem/inputsystem.cpp @@ -52,6 +52,14 @@ // return CallVFunc(index, this, pString); //} +//----------------------------------------------------------------------------- +// Returns the currently attached window +//----------------------------------------------------------------------------- +PlatWindow_t CInputSystem::GetAttachedWindow() const +{ + return (PlatWindow_t)m_hAttachedHWnd; +} + LRESULT CInputSystem::WindowProc(void* unused, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (g_pInputSystem->m_bEnabled && diff --git a/src/inputsystem/inputsystem.h b/src/inputsystem/inputsystem.h index e4697301..4569f2dd 100644 --- a/src/inputsystem/inputsystem.h +++ b/src/inputsystem/inputsystem.h @@ -11,6 +11,9 @@ class CInputSystem : public CTier1AppSystem< IInputSystem > { public: // !!!interface implemented in engine!!! +public: + PlatWindow_t GetAttachedWindow() const; + public: // Hook statics: static LRESULT WindowProc(void* unused, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);