Replace mutation w/ pre-init check for N64 C button column header hack
also fixes width not being recalculated
fixes fde16fa5a
This commit is contained in:
parent
41cae2dd22
commit
01ed94d167
|
@ -340,6 +340,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
movie.GetClientSettingsOnLoad = json => TasView.LoadSettingsSerialized(json);
|
movie.GetClientSettingsOnLoad = json => TasView.LoadSettingsSerialized(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static readonly string[] N64CButtonSuffixes = { " C Up", " C Down", " C Left", " C Right" };
|
||||||
|
|
||||||
private void SetUpColumns()
|
private void SetUpColumns()
|
||||||
{
|
{
|
||||||
TasView.AllColumns.Clear();
|
TasView.AllColumns.Clear();
|
||||||
|
@ -357,8 +359,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
.LogGeneratorInstance(MovieSession.MovieController)
|
.LogGeneratorInstance(MovieSession.MovieController)
|
||||||
.Map();
|
.Map();
|
||||||
|
|
||||||
foreach (var (name, mnemonic) in columnNames)
|
foreach (var (name, mnemonic0) in columnNames)
|
||||||
{
|
{
|
||||||
|
var mnemonic = Emulator.SystemId is VSystemID.Raw.N64 && N64CButtonSuffixes.Any(name.EndsWithOrdinal)
|
||||||
|
? $"c{mnemonic0.ToUpperInvariant()}" // prepend 'c' to differentiate from L/R buttons -- this only affects the column headers
|
||||||
|
: mnemonic0;
|
||||||
ColumnType type;
|
ColumnType type;
|
||||||
int digits;
|
int digits;
|
||||||
if (ControllerType.Axes.TryGetValue(name, out var range))
|
if (ControllerType.Axes.TryGetValue(name, out var range))
|
||||||
|
@ -394,12 +399,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (Emulator.SystemId is VSystemID.Raw.N64)
|
if (Emulator.SystemId is VSystemID.Raw.N64)
|
||||||
{
|
{
|
||||||
foreach (var c in TasView.AllColumns
|
|
||||||
.Where(static c => c.Name.EndsWithOrdinal(" C Up") || c.Name.EndsWithOrdinal(" C Down")
|
|
||||||
|| c.Name.EndsWithOrdinal(" C Left") || c.Name.EndsWithOrdinal(" C Right")))
|
|
||||||
{
|
|
||||||
c.Text = $"c{c.Text.ToUpperInvariant()}"; // prepend 'c' to differentiate from L/R buttons -- only affects table header
|
|
||||||
}
|
|
||||||
var fakeAnalogControls = TasView.AllColumns
|
var fakeAnalogControls = TasView.AllColumns
|
||||||
.Where(c =>
|
.Where(c =>
|
||||||
c.Name.EndsWithOrdinal("A Up")
|
c.Name.EndsWithOrdinal("A Up")
|
||||||
|
|
Loading…
Reference in New Issue