Bk2 - tweaks to input log and input diplay logic

This commit is contained in:
adelikat 2014-06-21 18:25:16 +00:00
parent 5e14df9f30
commit 8001a49afd
2 changed files with 15 additions and 7 deletions

View File

@ -141,11 +141,19 @@ namespace BizHawk.Client.Common
} }
else if (def.FloatControls.Contains(buttons[i])) else if (def.FloatControls.Contains(buttons[i]))
{ {
var temp = trimmed.Substring(iterator, 3); string temp;
var val = int.Parse(temp); try
{
temp = trimmed.Substring(iterator, 4);
var val = int.Parse(temp.Trim());
MyFloatControls[buttons[i]] = val;
}
catch (Exception ex)
{
int zzz = 0;
}
MyFloatControls[buttons[i]] = val; iterator += 5;
iterator += 4;
floatIt++; floatIt++;
} }
} }

View File

@ -44,7 +44,7 @@ namespace BizHawk.Client.Common
return GenerateLogEntry() return GenerateLogEntry()
.Replace(".", " ") .Replace(".", " ")
.Replace("|", "") .Replace("|", "")
.Replace("000,000", " "); .Replace(" 0, 0,", " ");
} }
public bool IsEmpty public bool IsEmpty
@ -104,12 +104,12 @@ namespace BizHawk.Client.Common
{ {
if (createEmpty) if (createEmpty)
{ {
sb.Append("000,"); sb.Append(" 0,");
} }
else else
{ {
var val = (int)_source.GetFloat(button); var val = (int)_source.GetFloat(button);
sb.Append(val.ToString().PadLeft(3, '0')).Append(','); sb.Append(val.ToString().PadLeft(4, ' ')).Append(',');
} }
} }
else if (_source.Type.BoolButtons.Contains(button)) else if (_source.Type.BoolButtons.Contains(button))