mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-01 14:59:13 +00:00
[hid] shared memory crashes (#3784)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3784 Reviewed-by: MaranBr <[email protected]> Reviewed-by: Lizzie <[email protected]> Co-authored-by: maufeat <[email protected]> Co-committed-by: maufeat <[email protected]>
This commit is contained in:
1 parent
5856beac54
commit
c984c387d7
1 file changed
+4
@@ -800,6 +800,10 @@ Result NPad::DisconnectNpad(u64 aruid, Core::HID::NpadIdType npad_id) {
|
|||||||
auto& controller = GetControllerFromNpadIdType(aruid, npad_id);
|
auto& controller = GetControllerFromNpadIdType(aruid, npad_id);
|
||||||
|
|
||||||
auto* shared_memory = controller.shared_memory;
|
auto* shared_memory = controller.shared_memory;
|
||||||
|
if (!shared_memory) {
|
||||||
|
LOG_WARNING(Service_HID, "DisconnectNpad: shared_memory is null for npad_id={}", npad_id);
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
// Don't reset shared_memory->assignment_mode this value is persistent
|
// Don't reset shared_memory->assignment_mode this value is persistent
|
||||||
shared_memory->style_tag.raw = Core::HID::NpadStyleSet::None; // Zero out
|
shared_memory->style_tag.raw = Core::HID::NpadStyleSet::None; // Zero out
|
||||||
shared_memory->device_type.raw = 0;
|
shared_memory->device_type.raw = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user