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.

This commit is contained in:
goyuken 2012-12-29 02:43:00 +00:00
parent c01919a376
commit 2a7ea6bfb0
1 changed files with 10 additions and 0 deletions

View File

@ -228,8 +228,18 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES
}
}
/// <summary>
///
/// </summary>
/// <param name="port">0 or 1, corresponding to L and R physical ports on the snes</param>
/// <param name="device">LibsnesApi.SNES_DEVICE enum index specifying type of device</param>
/// <param name="index">meaningless for most controllers. for multitap, 0-3 for which multitap controller</param>
/// <param name="id">button ID enum; in the case of a regular controller, this corresponds to shift register position</param>
/// <returns>for regular controllers, one bit D0 of button status. for other controls, varying ranges depending on id</returns>
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);