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);