Saturn - virtualpad support for Mission and Dual Mission
This commit is contained in:
parent
0c078a189e
commit
162e851468
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Consoles.Sega.Saturn;
|
||||
|
@ -55,9 +56,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
case SaturnusControllerDeck.Device.Wheel:
|
||||
return Wheel(controllerNum);
|
||||
case SaturnusControllerDeck.Device.Mission:
|
||||
return MissionControl(controllerNum);
|
||||
case SaturnusControllerDeck.Device.DualMission:
|
||||
return DualMissionControl(controllerNum);
|
||||
case SaturnusControllerDeck.Device.Keyboard:
|
||||
System.Windows.Forms.MessageBox.Show("This peripheral is not supported yet");
|
||||
MessageBox.Show("This peripheral is not supported yet");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +352,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
return new PadSchema
|
||||
{
|
||||
DisplayName = "Mouse",
|
||||
DisplayName = "Wheel",
|
||||
IsConsole = false,
|
||||
DefaultSize = new Size(325, 100),
|
||||
Buttons = new[]
|
||||
|
@ -434,6 +437,170 @@ namespace BizHawk.Client.EmuHawk
|
|||
};
|
||||
}
|
||||
|
||||
private static PadSchema MissionControl(int controller)
|
||||
{
|
||||
return new PadSchema
|
||||
{
|
||||
DisplayName = "Mission",
|
||||
IsConsole = false,
|
||||
DefaultSize = new Size(445, 230),
|
||||
Buttons = new[]
|
||||
{
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Start",
|
||||
DisplayName = "Start",
|
||||
Location = new Point(45, 15),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " L",
|
||||
DisplayName = "L",
|
||||
Location = new Point(5, 58),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " R",
|
||||
DisplayName = "R",
|
||||
Location = new Point(105, 58),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " X",
|
||||
DisplayName = "X",
|
||||
Location = new Point(30, 43),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Y",
|
||||
DisplayName = "Y",
|
||||
Location = new Point(55, 43),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Z",
|
||||
DisplayName = "Z",
|
||||
Location = new Point(80, 43),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " A",
|
||||
DisplayName = "A",
|
||||
Location = new Point(30, 70),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " B",
|
||||
DisplayName = "B",
|
||||
Location = new Point(55, 70),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " C",
|
||||
DisplayName = "C",
|
||||
Location = new Point(80, 70),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = $"P{controller} Stick Horizontal",
|
||||
SecondaryNames = new[] { $"P{controller} Stick Vertical" },
|
||||
MinValue = 0,
|
||||
MidValue = 127,
|
||||
MaxValue = 255,
|
||||
MinValueSec = 0,
|
||||
MidValueSec = 127,
|
||||
MaxValueSec = 255,
|
||||
DisplayName = "",
|
||||
Location = new Point(185, 13),
|
||||
Type = PadSchema.PadInputType.AnalogStick
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Throttle",
|
||||
DisplayName = "Throttle",
|
||||
Location = new Point(135, 13),
|
||||
Type = PadSchema.PadInputType.FloatSingle,
|
||||
TargetSize = new Size(64, 178),
|
||||
MinValue = 0,
|
||||
MaxValue = 255,
|
||||
Orientation = Orientation.Vertical
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static PadSchema DualMissionControl(int controller)
|
||||
{
|
||||
return new PadSchema
|
||||
{
|
||||
DisplayName = "Dual Mission",
|
||||
IsConsole = false,
|
||||
DefaultSize = new Size(680, 230),
|
||||
Buttons = new[]
|
||||
{
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = $"P{controller} Left Stick Horizontal",
|
||||
SecondaryNames = new[] { $"P{controller} Left Stick Vertical" },
|
||||
MinValue = 0,
|
||||
MidValue = 127,
|
||||
MaxValue = 255,
|
||||
MinValueSec = 0,
|
||||
MidValueSec = 127,
|
||||
MaxValueSec = 255,
|
||||
DisplayName = "",
|
||||
Location = new Point(58, 13),
|
||||
Type = PadSchema.PadInputType.AnalogStick
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Left Throttle",
|
||||
DisplayName = "Throttle",
|
||||
Location = new Point(8, 13),
|
||||
Type = PadSchema.PadInputType.FloatSingle,
|
||||
TargetSize = new Size(64, 178),
|
||||
MinValue = 0,
|
||||
MaxValue = 255,
|
||||
Orientation = Orientation.Vertical
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = $"P{controller} Right Stick Horizontal",
|
||||
SecondaryNames = new[] { $"P{controller} Right StickVertical" },
|
||||
MinValue = 0,
|
||||
MidValue = 127,
|
||||
MaxValue = 255,
|
||||
MinValueSec = 0,
|
||||
MidValueSec = 127,
|
||||
MaxValueSec = 255,
|
||||
DisplayName = "",
|
||||
Location = new Point(400, 13),
|
||||
Type = PadSchema.PadInputType.AnalogStick
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Right Throttle",
|
||||
DisplayName = "Throttle",
|
||||
Location = new Point(350, 13),
|
||||
Type = PadSchema.PadInputType.FloatSingle,
|
||||
TargetSize = new Size(64, 178),
|
||||
MinValue = 0,
|
||||
MaxValue = 255,
|
||||
Orientation = Orientation.Vertical
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static PadSchema ConsoleButtons()
|
||||
{
|
||||
return new PadSchema
|
||||
|
|
Loading…
Reference in New Issue