mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 10:55:45 +00:00
configuration: Migrate controller settings to emulated controller
This commit is contained in:
parent
6c7814bc9c
commit
6774c7988b
12 changed files with 140 additions and 126 deletions
|
@ -111,6 +111,27 @@ NpadStyleTag HIDCore::GetSupportedStyleTag() const {
|
|||
return supported_style_tag;
|
||||
}
|
||||
|
||||
s8 HIDCore::GetPlayerCount() const {
|
||||
s8 active_players = 0;
|
||||
for (std::size_t player_index = 0; player_index < 8; player_index++) {
|
||||
const auto* controller = GetEmulatedControllerByIndex(player_index);
|
||||
if (controller->IsConnected()) {
|
||||
active_players++;
|
||||
}
|
||||
}
|
||||
return active_players;
|
||||
}
|
||||
|
||||
NpadIdType HIDCore::GetFirstNpadId() const {
|
||||
for (std::size_t player_index = 0; player_index < 10; player_index++) {
|
||||
const auto* controller = GetEmulatedControllerByIndex(player_index);
|
||||
if (controller->IsConnected()) {
|
||||
return controller->GetNpadIdType();
|
||||
}
|
||||
}
|
||||
return NpadIdType::Player1;
|
||||
}
|
||||
|
||||
void HIDCore::ReloadInputDevices() {
|
||||
player_1->ReloadFromSettings();
|
||||
player_2->ReloadFromSettings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue