From dcc345400e38e54ac84819e5cbcdf65c9cd95f96 Mon Sep 17 00:00:00 2001 From: Filoppi Date: Sat, 15 May 2021 12:14:11 +0300 Subject: ControllerInterface: devices population is now async so implement devices sorting priority This helps us keeping the most important devices (e.g. Mouse and Keyboard) on the top of the list of devices (they still are on all OSes supported by dolphin and to make hotplug devices like DSU appear at the bottom. --- .../InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp b/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp index dfd329f5e0..d68b0441a6 100644 --- a/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp @@ -321,6 +321,12 @@ std::string Device::GetSource() const return SOURCE_NAME; } +// Always add these at the end, given their hotplug nature +int Device::GetSortPriority() const +{ + return -1; +} + void Device::RunTasks() { if (IsPerformingTask()) -- cgit v1.2.3