[hle/service{nvdrv,apm}] fixes for TetrisSwitch (#3983)

- testriswitch submits buffers with a fence id of -1, just skip them instead of trying to process them?
- apm:u, which is removed, but hey, backwards compat never hurted
- another instance of shared_memory crashing NPad

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3983
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
lizzie 2026-05-24 01:04:32 +02:00 committed by crueter
parent 90164197dc
commit 2aa2ac7d9a
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
5 changed files with 37 additions and 29 deletions

View file

@ -712,6 +712,11 @@ bool NPad::SetNpadMode(u64 aruid, Core::HID::NpadIdType& new_npad_id, Core::HID:
}
auto& controller = GetControllerFromNpadIdType(aruid, npad_id);
if (!controller.shared_memory) {
LOG_WARNING(Service_HID, "shared_memory is null for npad_id={}", npad_id);
return false;
}
if (controller.shared_memory->assignment_mode != assignment_mode) {
controller.shared_memory->assignment_mode = assignment_mode;
}