From e501d108041f528d06b3bf77912848bc3190e995 Mon Sep 17 00:00:00 2001 From: feos Date: Fri, 8 Nov 2024 19:45:33 +0300 Subject: [PATCH] puae: controller config somewhat works --- src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs index b5f7da9ea5..640be19070 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs @@ -162,7 +162,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga for (int port = 1; port <= 2; port++) { - var currentPort = (port == 1) ? fi.Port1 : fi.Port2; + ref var currentPort = ref (port is 1 ? ref fi.Port1 : ref fi.Port2); switch (_ports[port - 1]) { @@ -170,7 +170,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga { foreach (var (name, button) in _joystickMap) { - if (controller.IsPressed($"P{port} {name}")) + if (controller.IsPressed($"P{port} {Inputs.Joystick} {name}")) { currentPort.Buttons |= button; } @@ -181,7 +181,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga { foreach (var (name, button) in _cd32padMap) { - if (controller.IsPressed($"P{port} {name}")) + if (controller.IsPressed($"P{port} {Inputs.Cd32Pad} {name}")) { currentPort.Buttons |= button; }