Support analog range up to 9999, this is bad code but I hope to not have to do anything more clever anytime soon
This commit is contained in:
parent
49955a3447
commit
686610b047
|
@ -134,11 +134,11 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
else if (def.FloatControls.Contains(key))
|
else if (def.FloatControls.Contains(key))
|
||||||
{
|
{
|
||||||
var temp = trimmed.Substring(iterator, 4);
|
var temp = trimmed.Substring(iterator, 5);
|
||||||
var val = int.Parse(temp.Trim());
|
var val = int.Parse(temp.Trim());
|
||||||
this.MyFloatControls[key] = val;
|
this.MyFloatControls[key] = val;
|
||||||
|
|
||||||
iterator += 5;
|
iterator += 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace BizHawk.Client.Common
|
||||||
return GenerateLogEntry()
|
return GenerateLogEntry()
|
||||||
.Replace(".", " ")
|
.Replace(".", " ")
|
||||||
.Replace("|", "")
|
.Replace("|", "")
|
||||||
.Replace(" 0, 0,", " ");
|
.Replace(" 0, 0,", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEmpty
|
public bool IsEmpty
|
||||||
|
@ -102,12 +102,12 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
if (createEmpty)
|
if (createEmpty)
|
||||||
{
|
{
|
||||||
sb.Append(" 0,");
|
sb.Append(" 0,");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var val = (int)_source.GetFloat(button);
|
var val = (int)_source.GetFloat(button);
|
||||||
sb.Append(val.ToString().PadLeft(4, ' ')).Append(',');
|
sb.Append(val.ToString().PadLeft(5, ' ')).Append(',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_source.Type.BoolButtons.Contains(button))
|
else if (_source.Type.BoolButtons.Contains(button))
|
||||||
|
|
Loading…
Reference in New Issue