[hid_core] fix LM2 crash due to callbacks not being removed properly (#4178)

the function returned the key AFTER this one, which points to an invalid object
basically its like "oh im returning the index AFTER Myself"
off-by-1 error basically; now it returns OUR own key.

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4178
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
lizzie
2026-07-07 19:52:22 +02:00
committed by crueter
parent bfc0e60333
commit 6119e8fad2
7 changed files with 51 additions and 53 deletions
+2 -1
View File
@@ -24,7 +24,8 @@ HIDCore::HIDCore(Kernel::KernelCore& kernel_)
, player_8{std::make_unique<EmulatedController>(NpadIdType::Player8)}
, other{std::make_unique<EmulatedController>(NpadIdType::Other)}
, handheld{std::make_unique<EmulatedController>(NpadIdType::Handheld)}
, console{std::make_unique<EmulatedConsole>()}, devices{std::make_unique<EmulatedDevices>()}
, console{std::make_unique<EmulatedConsole>()}
, devices{std::make_unique<EmulatedDevices>()}
, kernel{kernel_}
{}