From 8c1310d1d11352cc3385cde64def53e52186c531 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 20 Apr 2019 09:25:11 -0500 Subject: ControllerInterface/DInput: Optimize cursor position updating. --- .../InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h') diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h index a8de55fe7a..7d533314c3 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h @@ -13,7 +13,7 @@ namespace ciface { namespace DInput { -void InitKeyboardMouse(IDirectInput8* const idi8); +void InitKeyboardMouse(IDirectInput8* const idi8, HWND hwnd); class KeyboardMouse : public Core::Device { @@ -85,16 +85,21 @@ private: public: void UpdateInput() override; - KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device); + KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device, + HWND hwnd); ~KeyboardMouse(); std::string GetName() const override; std::string GetSource() const override; private: + void UpdateCursorInput(); + const LPDIRECTINPUTDEVICE8 m_kb_device; const LPDIRECTINPUTDEVICE8 m_mo_device; + const HWND m_hwnd; + DWORD m_last_update; State m_state_in; }; -- cgit v1.2.3