Fix input display to work with N64 analog boolean buttons

This commit is contained in:
adelikat 2013-07-25 01:09:27 +00:00
parent 8a9373126f
commit 921c34dd17
1 changed files with 30 additions and 1 deletions

View File

@ -406,7 +406,36 @@ namespace BizHawk.MultiClient
{
foreach (string name in MnemonicConstants.ANALOGS[ControlType].Keys)
{
int val = (int)GetBaseFloat("P" + player + " " + name);
int val = 0;
//Nasty hackery
if (name == "X Axis")
{
if (IsBasePressed("P" + player + " A Up"))
{
val = 127;
}
else if (IsBasePressed("P" + player + " A Down"))
{
val = -127;
}
}
else if (name == "Y Axis")
{
if (IsBasePressed("P" + player + " A Left"))
{
val = -127;
}
else if (IsBasePressed("P" + player + " A Right"))
{
val = 127;
}
}
else
{
val = (int)GetBaseFloat("P" + player + " " + name);
}
if (val != 0)
{
input.Append(String.Format("{0:000}", val)).Append(',');