ControllerConfiguration form now shows which Joystick type is assigned to each input

This commit is contained in:
Asnivor 2018-03-06 16:01:40 +00:00
parent 93ae29c3a0
commit f8e1174aad
7 changed files with 16 additions and 16 deletions

View File

@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
#region IJoystick
public JoystickType JoyType => JoystickType.SinclairPORT1;
public JoystickType JoyType => JoystickType.Cursor;
public string[] ButtonCollection { get; set; }

View File

@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
#region IJoystick
public JoystickType JoyType => JoystickType.None;
public JoystickType JoyType => JoystickType.NULL;
public string[] ButtonCollection { get; set; }

View File

@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
#region IJoystick
public JoystickType JoyType => JoystickType.SinclairPORT1;
public JoystickType JoyType => JoystickType.SinclairLEFT;
public string[] ButtonCollection { get; set; }

View File

@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
#region IJoystick
public JoystickType JoyType => JoystickType.SinclairPORT1;
public JoystickType JoyType => JoystickType.SinclairRIGHT;
public string[] ButtonCollection { get; set; }

View File

@ -186,11 +186,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
return new KempstonJoystick(this, playerNumber);
case JoystickType.Cursor:
return new CursorJoystick(this, playerNumber);
case JoystickType.SinclairPORT1:
case JoystickType.SinclairLEFT:
return new SinclairJoystick1(this, playerNumber);
case JoystickType.SinclairPORT2:
case JoystickType.SinclairRIGHT:
return new SinclairJoystick2(this, playerNumber);
case JoystickType.None:
case JoystickType.NULL:
return new NullJoystick(this, playerNumber);
}

View File

@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// The one ZX Hawk ControllerDefinition
/// </summary>
public static ControllerDefinition ZXSpectrumControllerDefinition
public ControllerDefinition ZXSpectrumControllerDefinition
{
get
{
@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
foreach (var s in joys1)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Joystick 1";
definition.CategoryLabels[s] = "J1 (" + ((ZXSpectrumSyncSettings)SyncSettings as ZXSpectrumSyncSettings).JoystickType1.ToString() + ")";
}
List<string> joys2 = new List<string>
@ -42,7 +42,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
foreach (var s in joys2)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Joystick 2";
definition.CategoryLabels[s] = "J2 (" + ((ZXSpectrumSyncSettings)SyncSettings as ZXSpectrumSyncSettings).JoystickType2.ToString() + ")";
}
List<string> joys3 = new List<string>
@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
foreach (var s in joys3)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Joystick 3";
definition.CategoryLabels[s] = "J3 (" + ((ZXSpectrumSyncSettings)SyncSettings as ZXSpectrumSyncSettings).JoystickType3.ToString() + ")";
}
// keyboard
@ -137,10 +137,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// </summary>
public enum JoystickType
{
None,
NULL,
Kempston,
SinclairPORT1,
SinclairPORT2,
SinclairLEFT,
SinclairRIGHT,
Cursor
}
}

View File

@ -94,12 +94,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
[DisplayName("Joystick 2")]
[Description("The emulated joystick assigned to P2 (SHOULD BE UNIQUE TYPE!)")]
[DefaultValue(JoystickType.SinclairPORT1)]
[DefaultValue(JoystickType.SinclairLEFT)]
public JoystickType JoystickType2 { get; set; }
[DisplayName("Joystick 3")]
[Description("The emulated joystick assigned to P3 (SHOULD BE UNIQUE TYPE!)")]
[DefaultValue(JoystickType.SinclairPORT2)]
[DefaultValue(JoystickType.SinclairRIGHT)]
public JoystickType JoystickType3 { get; set; }