3
0
Fork 0
forked from suyu/suyu

Merge pull request #12709 from german77/npad-disc

service: hid: Clear controller status when aruid is no longer used
This commit is contained in:
liamwhite 2024-01-19 09:33:16 -05:00 committed by GitHub
commit 932bd98824
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1232,6 +1232,13 @@ Result NPad::RegisterAppletResourceUserId(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);
}