cleanup SystemInfo
This commit is contained in:
parent
8ac53f51c0
commit
5002968bd7
|
@ -154,15 +154,15 @@ namespace BizHawk.Client.Common
|
||||||
case "NGP":
|
case "NGP":
|
||||||
return SystemInfo.NeoGeoPocket;
|
return SystemInfo.NeoGeoPocket;
|
||||||
case "ZXSpectrum":
|
case "ZXSpectrum":
|
||||||
return SystemInfo.ZXSpectrum;
|
return SystemInfo.ZxSpectrum;
|
||||||
case "AmstradCPC":
|
case "AmstradCPC":
|
||||||
return SystemInfo.AmstradCPC;
|
return SystemInfo.AmstradCpc;
|
||||||
case "ChannelF":
|
case "ChannelF":
|
||||||
return SystemInfo.ChannelF;
|
return SystemInfo.ChannelF;
|
||||||
case "O2":
|
case "O2":
|
||||||
return SystemInfo.O2;
|
return SystemInfo.O2;
|
||||||
case "MAME":
|
case "MAME":
|
||||||
return SystemInfo.MAME;
|
return SystemInfo.Mame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace BizHawk.Client.Common
|
||||||
private const JoypadButton UpDownLeftRight = JoypadButton.Up | JoypadButton.Down | JoypadButton.Left | JoypadButton.Right;
|
private const JoypadButton UpDownLeftRight = JoypadButton.Up | JoypadButton.Down | JoypadButton.Left | JoypadButton.Right;
|
||||||
private const JoypadButton StandardButtons = JoypadButton.A | JoypadButton.B | JoypadButton.Start | JoypadButton.Select | UpDownLeftRight;
|
private const JoypadButton StandardButtons = JoypadButton.A | JoypadButton.B | JoypadButton.Start | JoypadButton.Select | UpDownLeftRight;
|
||||||
|
|
||||||
private static readonly List<SystemInfo> _allSystemInfos = new List<SystemInfo>();
|
private static readonly List<SystemInfo> AllSystemInfos = new List<SystemInfo>();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace BizHawk.Client.Common
|
||||||
MaxControllers = maxControllers;
|
MaxControllers = maxControllers;
|
||||||
AvailableButtons = availableButtons;
|
AvailableButtons = availableButtons;
|
||||||
|
|
||||||
_allSystemInfos.Add(this);
|
AllSystemInfos.Add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -184,7 +184,7 @@ namespace BizHawk.Client.Common
|
||||||
public static SystemInfo TI83 { get; } = new SystemInfo("TI - 83", CoreSystem.TI83, 1);
|
public static SystemInfo TI83 { get; } = new SystemInfo("TI - 83", CoreSystem.TI83, 1);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for Wonderswan
|
/// Gets the <see cref="SystemInfo"/> instance for WonderSwan
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static SystemInfo WonderSwan { get; } = new SystemInfo("WonderSwan", CoreSystem.WonderSwan, 1);
|
public static SystemInfo WonderSwan { get; } = new SystemInfo("WonderSwan", CoreSystem.WonderSwan, 1);
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ namespace BizHawk.Client.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for Vectrex
|
/// Gets the <see cref="SystemInfo"/> instance for Vectrex
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static SystemInfo Vectrex { get; } = new SystemInfo("Vextrex", CoreSystem.Vectrex, 2);
|
public static SystemInfo Vectrex { get; } = new SystemInfo("Vectrex", CoreSystem.Vectrex, 2);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for TI-83
|
/// Gets the <see cref="SystemInfo"/> instance for TI-83
|
||||||
|
@ -206,12 +206,12 @@ namespace BizHawk.Client.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for ZXSpectrum
|
/// Gets the <see cref="SystemInfo"/> instance for ZXSpectrum
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static SystemInfo ZXSpectrum { get; } = new SystemInfo("ZX Spectrum", CoreSystem.ZXSpectrum, 2);
|
public static SystemInfo ZxSpectrum { get; } = new SystemInfo("ZX Spectrum", CoreSystem.ZXSpectrum, 2);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for AmstradCPC
|
/// Gets the <see cref="SystemInfo"/> instance for AmstradCPC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static SystemInfo AmstradCPC { get; } = new SystemInfo("Amstrad CPC", CoreSystem.AmstradCPC, 2);
|
public static SystemInfo AmstradCpc { get; } = new SystemInfo("Amstrad CPC", CoreSystem.AmstradCPC, 2);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for GGL
|
/// Gets the <see cref="SystemInfo"/> instance for GGL
|
||||||
|
@ -231,7 +231,7 @@ namespace BizHawk.Client.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="SystemInfo"/> instance for MAME
|
/// Gets the <see cref="SystemInfo"/> instance for MAME
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static SystemInfo MAME { get; } = new SystemInfo("MAME", CoreSystem.MAME, 4);
|
public static SystemInfo Mame { get; } = new SystemInfo("MAME", CoreSystem.MAME, 4);
|
||||||
|
|
||||||
#endregion Get SystemInfo
|
#endregion Get SystemInfo
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ namespace BizHawk.Client.Common
|
||||||
/// <returns><see cref="SystemInfo"/></returns>
|
/// <returns><see cref="SystemInfo"/></returns>
|
||||||
public static SystemInfo FindByCoreSystem(CoreSystem system)
|
public static SystemInfo FindByCoreSystem(CoreSystem system)
|
||||||
{
|
{
|
||||||
return _allSystemInfos.Find(s => s.System == system);
|
return AllSystemInfos.Find(s => s.System == system);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -252,16 +252,16 @@ namespace BizHawk.Client.Common
|
||||||
/// <returns>True if object is equal to this instance; otherwise, false</returns>
|
/// <returns>True if object is equal to this instance; otherwise, false</returns>
|
||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
if (obj is SystemInfo)
|
if (obj is SystemInfo info)
|
||||||
{
|
{
|
||||||
return this == (SystemInfo)obj;
|
return this == info;
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.Equals(obj);
|
return base.Equals(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the haschode for current instance
|
/// Gets the hashcode for current instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>This instance hashcode</returns>
|
/// <returns>This instance hashcode</returns>
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
|
|
Loading…
Reference in New Issue