mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
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.
This commit is contained in:
parent
0718cfd7d7
commit
dcc345400e
7 changed files with 34 additions and 0 deletions
|
@ -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())
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
|
||||
std::string GetName() const override;
|
||||
std::string GetSource() const override;
|
||||
int GetSortPriority() const override;
|
||||
|
||||
void UpdateInput() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue