mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
service: hid: Clear controller status when aruid is no longer used
This commit is contained in:
parent
915efa4236
commit
9f376cd901
1 changed files with 7 additions and 0 deletions
|
@ -1232,6 +1232,13 @@ Result NPad::RegisterAppletResourceUserId(u64 aruid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NPad::UnregisterAppletResourceUserId(u64 aruid) {
|
void NPad::UnregisterAppletResourceUserId(u64 aruid) {
|
||||||
|
// TODO: Remove this once abstract pad is emulated properly
|
||||||
|
const auto aruid_index = npad_resource.GetIndexFromAruid(aruid);
|
||||||
|
for (auto& controller : controller_data[aruid_index]) {
|
||||||
|
controller.is_connected = false;
|
||||||
|
controller.shared_memory = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
npad_resource.UnregisterAppletResourceUserId(aruid);
|
npad_resource.UnregisterAppletResourceUserId(aruid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue