Actually support control types

This commit is contained in:
adelikat 2013-12-12 23:01:16 +00:00
parent bb0e48e970
commit c7b582b744
1 changed files with 19 additions and 13 deletions

View File

@ -528,31 +528,37 @@ namespace BizHawk.Client.Common
sb.Append('|'); sb.Append('|');
foreach (var mc in collections) foreach (var mc in collections)
{ {
foreach (var kvp in mc) if (mc.IsControl)
{ {
if (buttons.ContainsKey(kvp.Key)) bool anyPressed = false;
foreach (var kvp in mc)
{ {
if (buttons[kvp.Key]) if (buttons.ContainsKey(kvp.Key) && buttons[kvp.Key])
{ {
sb.Append(kvp.Value); sb.Append(kvp.Value);
if (mc.IsControl) anyPressed = true;
{ break;
break;
}
}
else
{
sb.Append('.');
} }
} }
else
if (!anyPressed)
{ {
sb.Append('.'); sb.Append('.');
} }
} }
else
{
foreach (var kvp in mc)
{
if (buttons.ContainsKey(kvp.Key))
{
sb.Append(buttons[kvp.Key] ? kvp.Value : '.');
}
}
}
sb.Append('|'); sb.Append('|');
} }
return sb.ToString(); return sb.ToString();
} }