summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Quartz
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-06-15 21:12:08 +0200
committerGitHub <noreply@github.com>2024-06-15 21:12:08 +0200
commited4a09fa56db3fb466e932c369fca0717d867472 (patch)
tree96661f8e73f548b6497a88d2f3bf622976c2d82f /Source/Core/InputCommon/ControllerInterface/Quartz
parent56fd9c177c0c907a342eedf0a91df089b8f0eea1 (diff)
parent42e73547eb9135ca9a93399e7300f49a5a0620f1 (diff)
Merge pull request #12850 from jordan-woyak/device-sorting
ControllerInterface: Adjust sort priorities to ensure default keyboard-mouse device is first.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Quartz')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h1
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm5
2 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h
index 07292f9039..7f526a07dd 100644
--- a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h
+++ b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h
@@ -69,6 +69,7 @@ public:
std::string GetName() const override;
std::string GetSource() const override;
+ int GetSortPriority() const override;
private:
void MainThreadInitialization(void* view);
diff --git a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm
index 9a8ddfc6df..58de0c302e 100644
--- a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm
+++ b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm
@@ -289,6 +289,11 @@ std::string KeyboardAndMouse::GetSource() const
return Quartz::GetSourceName();
}
+int KeyboardAndMouse::GetSortPriority() const
+{
+ return DEFAULT_DEVICE_SORT_PRIORITY;
+}
+
ControlState KeyboardAndMouse::Cursor::GetState() const
{
return std::max(0.0, ControlState(m_axis) / (m_positive ? 1.0 : -1.0));