From 2a7ea6bfb057e2677d71e57517f4e9cc8d33a87a Mon Sep 17 00:00:00 2001 From: goyuken Date: Sat, 29 Dec 2012 02:43:00 +0000 Subject: [PATCH] libsnes: add comments to snes_input_state() explaining the parameters as i understand them. note that we only actually have 2 controllers at the moment, not 4. --- .../Consoles/Nintendo/SNES/LibsnesCore.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs index 90d701b339..4d9f7ea6c8 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -228,8 +228,18 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES } } + /// + /// + /// + /// 0 or 1, corresponding to L and R physical ports on the snes + /// LibsnesApi.SNES_DEVICE enum index specifying type of device + /// meaningless for most controllers. for multitap, 0-3 for which multitap controller + /// button ID enum; in the case of a regular controller, this corresponds to shift register position + /// for regular controllers, one bit D0 of button status. for other controls, varying ranges depending on id ushort snes_input_state(int port, int device, int index, int id) { + // as this is implemented right now, only P1 and P2 normal controllers work + if (!nocallbacks && CoreComm.InputCallback != null) CoreComm.InputCallback(); //Console.WriteLine("{0} {1} {2} {3}", port, device, index, id);