nyma cores - fixes to mnemonic lookups and add a few overrides

This commit is contained in:
adelikat 2020-06-15 13:43:23 -05:00
parent c8a0b6c323
commit cf3e1d51e0
2 changed files with 15 additions and 4 deletions

View File

@ -450,10 +450,10 @@ namespace BizHawk.Client.Common
["IV"] = '4',
["V"] = '5',
["VI"] = '6',
["MODE 1: Set A"] = 'a',
["MODE 1: Set B"] = 'b',
["MODE 2: Set A"] = 'A',
["MODE 2: Set B"] = 'B'
["Mode 1: Set A"] = 'a',
["Mode 1: Set B"] = 'b',
["Mode 2: Set A"] = 'A',
["Mode 2: Set B"] = 'B'
},
["PCE"] = new Dictionary<string, char>
{

View File

@ -10,6 +10,12 @@ namespace BizHawk.Emulation.Cores.Waterbox
private static bool IsRomanNumeral(string str)
=> new[] {"I", "II", "III", "IV", "V", "VI"}.Contains(str);
private static readonly Dictionary<string, string> ButtonNameOverrides = new Dictionary<string, string>
{
["Left Shoulder"] = "L",
["Right Shoulder"] = "R"
};
/// <summary>
/// Override button names. Technically this should be per core, but a lot of the names and overrides are the same,
/// and an override that doesn't apply to a particular core will just be ignored
@ -23,6 +29,11 @@ namespace BizHawk.Emulation.Cores.Waterbox
original = CultureInfo.InvariantCulture.TextInfo.ToTitleCase(original.ToLowerInvariant());
}
if (ButtonNameOverrides.ContainsKey(original))
{
original = ButtonNameOverrides[original];
}
// TODO: Add dictionaries or whatever here as needed
return original;
}