summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
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/CoreDevice.h
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/CoreDevice.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/CoreDevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
index 5c7a8ed568..8dbbccf4b5 100644
--- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
+++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
@@ -4,6 +4,7 @@
#pragma once
#include <chrono>
+#include <limits>
#include <memory>
#include <mutex>
#include <optional>
@@ -147,6 +148,7 @@ public:
// A higher priority means it will be one of the first ones (smaller index), making it more
// likely to be index 0, which is automatically set as the default device when there isn't one.
// Every platform should have at least one device with priority >= 0.
+ static constexpr int DEFAULT_DEVICE_SORT_PRIORITY = std::numeric_limits<int>::max();
virtual int GetSortPriority() const { return 0; }
const std::vector<Input*>& Inputs() const { return m_inputs; }