summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2021-04-01 01:05:00 -0400
committerGitHub <noreply@github.com>2021-04-01 01:05:00 -0400
commitce8e87c64b271b13a30fbc898b59427d28876a81 (patch)
tree969b78c3ba230a74bfc9d953427a65bfd4f50bed /Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
parent06439a2d40a06179633301e91ee85fa3059506fa (diff)
parent28e880efb628598090c715a7783a8dcbbbf18d50 (diff)
Merge pull request #8747 from iwubcode/map-freelook
Support controlling Free Look via input bindings (motion controls, gamepad, etc!)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp12
1 files changed, 12 insertions, 0 deletions
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;