From db4b4e40cb5c9d00940cdb76478b632804cdf244 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Mon, 20 Apr 2020 23:16:07 -0500 Subject: InputCommon / DolphinQt / Core: Add a "RelativeMouse" input which provides the raw delta mouse input Co-authored-by: Jordan Woyak --- .../InputCommon/ControllerInterface/ControllerInterface.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index 1d198ca494..fe176ce7f7 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -37,6 +37,8 @@ ControllerInterface g_controller_interface; +static thread_local ciface::InputChannel tls_input_channel = ciface::InputChannel::Host; + void ControllerInterface::Initialize(const WindowSystemInfo& wsi) { if (m_is_init) @@ -274,6 +276,16 @@ void ControllerInterface::UpdateInput() } } +void ControllerInterface::SetCurrentInputChannel(ciface::InputChannel input_channel) +{ + tls_input_channel = input_channel; +} + +ciface::InputChannel ControllerInterface::GetCurrentInputChannel() +{ + return tls_input_channel; +} + void ControllerInterface::SetAspectRatioAdjustment(float value) { m_aspect_ratio_adjustment = value; -- cgit v1.2.3