mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 10:55:45 +00:00
service/hid: Implement SetNpadJoyAssignmentMode
This commit is contained in:
parent
eab641228e
commit
2352826bf7
5 changed files with 174 additions and 38 deletions
|
@ -145,6 +145,16 @@ NpadIdType HIDCore::GetFirstNpadId() const {
|
|||
return NpadIdType::Player1;
|
||||
}
|
||||
|
||||
NpadIdType HIDCore::GetFirstDisconnectedNpadId() const {
|
||||
for (std::size_t player_index = 0; player_index < available_controllers; ++player_index) {
|
||||
const auto* const controller = GetEmulatedControllerByIndex(player_index);
|
||||
if (!controller->IsConnected()) {
|
||||
return controller->GetNpadIdType();
|
||||
}
|
||||
}
|
||||
return NpadIdType::Player1;
|
||||
}
|
||||
|
||||
void HIDCore::EnableAllControllerConfiguration() {
|
||||
player_1->EnableConfiguration();
|
||||
player_2->EnableConfiguration();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue