diff options
| author | 2024-01-19 00:09:49 -0600 | |
|---|---|---|
| committer | 2024-01-19 00:09:49 -0600 | |
| commit | 9f376cd901447ad371f23ef14ce195ecc8d435f4 (patch) | |
| tree | 552c4e24511e1b9053804f6fb425c1616ea0af23 | |
| parent | Merge pull request #12689 from liamwhite/remove-format (diff) | |
| download | yuzu-9f376cd901447ad371f23ef14ce195ecc8d435f4.tar.gz yuzu-9f376cd901447ad371f23ef14ce195ecc8d435f4.tar.xz yuzu-9f376cd901447ad371f23ef14ce195ecc8d435f4.zip | |
service: hid: Clear controller status when aruid is no longer used
| -rw-r--r-- | src/hid_core/resources/npad/npad.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp index 97537a2e2..de0f9cbb9 100644 --- a/src/hid_core/resources/npad/npad.cpp +++ b/src/hid_core/resources/npad/npad.cpp | |||
| @@ -1232,6 +1232,13 @@ Result NPad::RegisterAppletResourceUserId(u64 aruid) { | |||
| 1232 | } | 1232 | } |
| 1233 | 1233 | ||
| 1234 | void NPad::UnregisterAppletResourceUserId(u64 aruid) { | 1234 | void NPad::UnregisterAppletResourceUserId(u64 aruid) { |
| 1235 | // TODO: Remove this once abstract pad is emulated properly | ||
| 1236 | const auto aruid_index = npad_resource.GetIndexFromAruid(aruid); | ||
| 1237 | for (auto& controller : controller_data[aruid_index]) { | ||
| 1238 | controller.is_connected = false; | ||
| 1239 | controller.shared_memory = nullptr; | ||
| 1240 | } | ||
| 1241 | |||
| 1235 | npad_resource.UnregisterAppletResourceUserId(aruid); | 1242 | npad_resource.UnregisterAppletResourceUserId(aruid); |
| 1236 | } | 1243 | } |
| 1237 | 1244 | ||