hid: service: Implement Last active Npad
This commit is contained in:
parent
c8b9467f50
commit
8950fe79ad
4 changed files with 20 additions and 1 deletions
|
@ -476,6 +476,10 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
|
|||
pad_entry.npad_buttons.l.Assign(button_state.zl);
|
||||
pad_entry.npad_buttons.r.Assign(button_state.zr);
|
||||
}
|
||||
|
||||
if (pad_entry.npad_buttons.raw != Core::HID::NpadButton::None) {
|
||||
hid_core.SetLastActiveController(npad_id);
|
||||
}
|
||||
}
|
||||
|
||||
void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
|
||||
|
|
|
@ -2768,7 +2768,7 @@ private:
|
|||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushEnum(Core::HID::NpadIdType::Handheld);
|
||||
rb.PushEnum(system.HIDCore().GetLastActiveController());
|
||||
}
|
||||
|
||||
void GetUniquePadsFromNpad(HLERequestContext& ctx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue