hack to fix Nyma roman numeral buttons, virtualpads - PCE and PCFX fixes

This commit is contained in:
adelikat 2020-06-15 13:20:37 -05:00
parent 3d8920308c
commit 25dddf5160
3 changed files with 19 additions and 25 deletions

View File

@ -130,8 +130,8 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(140, 40, controller, "I"),
new ButtonSchema(166, 30, controller, "II"),
new ButtonSchema(192, 20, controller, "III"),
new ButtonSchema(77, 63, controller, "SELECT") { DisplayName = "s" },
new ButtonSchema(101, 63, controller, "RUN") { DisplayName = "R" }
new ButtonSchema(77, 63, controller, "Select") { DisplayName = "s" },
new ButtonSchema(101, 63, controller, "Run") { DisplayName = "R" }
}
};
}
@ -158,14 +158,8 @@ namespace BizHawk.Client.EmuHawk
{
DisplayName = "Right"
},
new ButtonSchema(275, 75, controller, "SELECT")
{
DisplayName = "Select"
},
new ButtonSchema(275, 105, controller, "RUN")
{
DisplayName = "Run"
}
new ButtonSchema(275, 75, controller, "Select"),
new ButtonSchema(275, 105, controller, "Run")
}
};
}

View File

@ -49,18 +49,18 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(14, 56, controller),
ButtonSchema.Left(2, 34, controller),
ButtonSchema.Right(24, 34, controller),
new ButtonSchema(72, 17, controller, "MODE 1: Set A") { DisplayName = "1A" },
new ButtonSchema(72, 40, controller, "MODE 2: Set A") { DisplayName = "2A" },
new ButtonSchema(102, 17, controller, "MODE 1: Set B") { DisplayName = "1B" },
new ButtonSchema(102, 40, controller, "MODE 2: Set B") { DisplayName = "2B" },
new ButtonSchema(72, 17, controller, "Mode 1: Set A") { DisplayName = "1A" },
new ButtonSchema(72, 40, controller, "Mode 2: Set A") { DisplayName = "2A" },
new ButtonSchema(102, 17, controller, "Mode 1: Set B") { DisplayName = "1B" },
new ButtonSchema(102, 40, controller, "Mode 2: Set B") { DisplayName = "2B" },
new ButtonSchema(140, 63, controller, "IV"),
new ButtonSchema(166, 53, controller, "V"),
new ButtonSchema(192, 43, controller, "VI"),
new ButtonSchema(140, 40, controller, "I"),
new ButtonSchema(166, 30, controller, "II"),
new ButtonSchema(192, 20, controller, "III"),
new ButtonSchema(77, 63, controller, "SELECT") { DisplayName = "s" },
new ButtonSchema(101, 63, controller, "RUN") { DisplayName = "R" }
new ButtonSchema(77, 63, controller, "Select") { DisplayName = "s" },
new ButtonSchema(101, 63, controller, "Run") { DisplayName = "R" }
}
};
}
@ -86,14 +86,6 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(275, 45, controller, "Right Button")
{
DisplayName = "Right"
},
new ButtonSchema(275, 75, controller, "SELECT")
{
DisplayName = "Select"
},
new ButtonSchema(275, 105, controller, "RUN")
{
DisplayName = "Run"
}
}
};

View File

@ -1,11 +1,15 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
namespace BizHawk.Emulation.Cores.Waterbox
{
partial class NymaCore
{
private static bool IsRomanNumeral(string str)
=> new[] {"I", "II", "III", "IV", "V", "VI"}.Contains(str);
/// <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
@ -14,7 +18,11 @@ namespace BizHawk.Emulation.Cores.Waterbox
{
original = Regex.Replace(original, @"\s*(↑|↓|←|→)\s*", "");
original = Regex.Replace(original, @"\s*\([^\)]+\)\s*", "");
original = CultureInfo.InvariantCulture.TextInfo.ToTitleCase(original.ToLowerInvariant());
if (!IsRomanNumeral(original))
{
original = CultureInfo.InvariantCulture.TextInfo.ToTitleCase(original.ToLowerInvariant());
}
// TODO: Add dictionaries or whatever here as needed
return original;
}