Virtual Boy controller support (#766)
This commit is contained in:
parent
76a03b05ff
commit
fe6900b8f9
29 changed files with 1349 additions and 5 deletions
|
@ -33,6 +33,7 @@
|
|||
#include "VsZapper.h"
|
||||
#include "AsciiTurboFile.h"
|
||||
#include "BattleBox.h"
|
||||
#include "VbController.h"
|
||||
|
||||
ControlManager::ControlManager(shared_ptr<Console> console, shared_ptr<BaseControlDevice> systemActionManager, shared_ptr<BaseControlDevice> mapperControlDevice)
|
||||
{
|
||||
|
@ -128,6 +129,7 @@ shared_ptr<BaseControlDevice> ControlManager::CreateControllerDevice(ControllerT
|
|||
case ControllerType::SnesMouse: device.reset(new SnesMouse(console, port)); break;
|
||||
case ControllerType::SuborMouse: device.reset(new SuborMouse(console, port)); break;
|
||||
case ControllerType::VsZapper: device.reset(new VsZapper(console, port)); break;
|
||||
case ControllerType::VbController: device.reset(new VbController(console, port, console->GetSettings()->GetControllerKeys(port))); break;
|
||||
}
|
||||
|
||||
return device;
|
||||
|
|
|
@ -949,6 +949,7 @@
|
|||
<ClInclude Include="UnlDripGameAudio.h" />
|
||||
<ClInclude Include="UnlPuzzle.h" />
|
||||
<ClInclude Include="UnRom512.h" />
|
||||
<ClInclude Include="VbController.h" />
|
||||
<ClInclude Include="VideoHud.h" />
|
||||
<ClInclude Include="VideoRenderer.h" />
|
||||
<ClInclude Include="UnlPci556.h" />
|
||||
|
|
|
@ -1499,6 +1499,9 @@
|
|||
<ClInclude Include="FlashSST39SF040.h">
|
||||
<Filter>Nes\Mappers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="VbController.h">
|
||||
<Filter>Nes\Input\Controllers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
|
@ -193,7 +193,8 @@ const vector<string> ControllerTypeNames = {
|
|||
"PowerPad",
|
||||
"SnesMouse",
|
||||
"SuborMouse",
|
||||
"VsZapper"
|
||||
"VsZapper",
|
||||
"VbController",
|
||||
};
|
||||
|
||||
const vector<string> ExpansionPortDeviceNames = {
|
||||
|
|
|
@ -267,7 +267,8 @@ enum class ControllerType
|
|||
PowerPad = 5,
|
||||
SnesMouse = 6,
|
||||
SuborMouse = 7,
|
||||
VsZapper = 8
|
||||
VsZapper = 8,
|
||||
VbController = 9,
|
||||
};
|
||||
|
||||
extern const vector<string> ExpansionPortDeviceNames;
|
||||
|
@ -326,6 +327,7 @@ struct KeyMapping
|
|||
uint32_t JissenMahjongButtons[21] = {};
|
||||
uint32_t SuborKeyboardButtons[99] = {};
|
||||
uint32_t BandaiMicrophoneButtons[3] = {};
|
||||
uint32_t VirtualBoyButtons[14] = {};
|
||||
|
||||
bool HasKeySet()
|
||||
{
|
||||
|
@ -342,6 +344,7 @@ struct KeyMapping
|
|||
hasKeyBinding |= HasKeyBinding(JissenMahjongButtons, sizeof(JissenMahjongButtons) / sizeof(JissenMahjongButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(SuborKeyboardButtons, sizeof(SuborKeyboardButtons) / sizeof(SuborKeyboardButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(BandaiMicrophoneButtons, sizeof(BandaiMicrophoneButtons) / sizeof(BandaiMicrophoneButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(VirtualBoyButtons, sizeof(VirtualBoyButtons) / sizeof(VirtualBoyButtons[0]));
|
||||
return hasKeyBinding;
|
||||
}
|
||||
|
||||
|
|
107
Core/VbController.h
Normal file
107
Core/VbController.h
Normal file
|
@ -0,0 +1,107 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseControlDevice.h"
|
||||
|
||||
class VbController : public BaseControlDevice
|
||||
{
|
||||
private:
|
||||
uint32_t _stateBuffer = 0;
|
||||
|
||||
protected:
|
||||
enum Buttons { Down1 = 0, Left1, Select, Start, Up0, Down0, Left0, Right0, Right1, Up1, L, R, B, A };
|
||||
|
||||
string GetKeyNames() override
|
||||
{
|
||||
return "dlSTUDLRruLRBA";
|
||||
}
|
||||
|
||||
void InternalSetStateFromInput() override
|
||||
{
|
||||
for(KeyMapping keyMapping : _keyMappings) {
|
||||
for(int i=0; i<14; i++)
|
||||
{
|
||||
SetPressedState(i, keyMapping.VirtualBoyButtons[i]);
|
||||
}
|
||||
|
||||
if(!_console->GetSettings()->CheckFlag(EmulationFlags::AllowInvalidInput)) {
|
||||
//If both U+D or L+R are pressed at the same time, act as if neither is pressed
|
||||
if(IsPressed(Buttons::Up0) && IsPressed(Buttons::Down0)) {
|
||||
ClearBit(Buttons::Down0);
|
||||
ClearBit(Buttons::Up0);
|
||||
}
|
||||
if(IsPressed(Buttons::Left0) && IsPressed(Buttons::Right0)) {
|
||||
ClearBit(Buttons::Left0);
|
||||
ClearBit(Buttons::Right0);
|
||||
}
|
||||
if (IsPressed(Buttons::Up1) && IsPressed(Buttons::Down1)) {
|
||||
ClearBit(Buttons::Down1);
|
||||
ClearBit(Buttons::Up1);
|
||||
}
|
||||
if (IsPressed(Buttons::Left1) && IsPressed(Buttons::Right1)) {
|
||||
ClearBit(Buttons::Left1);
|
||||
ClearBit(Buttons::Right1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t ToByte()
|
||||
{
|
||||
//"A Virtual Boy controller returns a 16-bit report in a similar order as SNES, with two additional buttons."
|
||||
|
||||
return
|
||||
(uint8_t)IsPressed(Buttons::Down1) |
|
||||
((uint8_t)IsPressed(Buttons::Left1) << 1) |
|
||||
((uint8_t)IsPressed(Buttons::Select) << 2) |
|
||||
((uint8_t)IsPressed(Buttons::Start) << 3) |
|
||||
((uint8_t)IsPressed(Buttons::Up0) << 4) |
|
||||
((uint8_t)IsPressed(Buttons::Down0) << 5) |
|
||||
((uint8_t)IsPressed(Buttons::Left0) << 6) |
|
||||
((uint8_t)IsPressed(Buttons::Right0) << 7) |
|
||||
((uint8_t)IsPressed(Buttons::Right1) << 8) |
|
||||
((uint8_t)IsPressed(Buttons::Up1) << 9) |
|
||||
((uint8_t)IsPressed(Buttons::L) << 10) |
|
||||
((uint8_t)IsPressed(Buttons::R) << 11) |
|
||||
((uint8_t)IsPressed(Buttons::B) << 12) |
|
||||
((uint8_t)IsPressed(Buttons::A) << 13) |
|
||||
(1 << 14);
|
||||
}
|
||||
|
||||
void StreamState(bool saving) override
|
||||
{
|
||||
BaseControlDevice::StreamState(saving);
|
||||
Stream(_stateBuffer);
|
||||
}
|
||||
|
||||
void RefreshStateBuffer() override
|
||||
{
|
||||
_stateBuffer = (uint32_t)ToByte();
|
||||
}
|
||||
|
||||
public:
|
||||
VbController(shared_ptr<Console> console, uint8_t port, KeyMappingSet keyMappings) : BaseControlDevice(console, port, keyMappings)
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t ReadRAM(uint16_t addr) override
|
||||
{
|
||||
uint8_t output = 0;
|
||||
|
||||
if(IsCurrentPort(addr)) {
|
||||
StrobeProcessRead();
|
||||
|
||||
output = _stateBuffer & 0x01;
|
||||
_stateBuffer >>= 1;
|
||||
|
||||
//"All subsequent reads will return D=1 on an authentic controller but may return D=0 on third party controllers."
|
||||
_stateBuffer |= 0x8000;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
void WriteRAM(uint16_t addr, uint8_t value) override
|
||||
{
|
||||
StrobeProcessWrite(value);
|
||||
}
|
||||
};
|
|
@ -36,6 +36,7 @@ namespace Mesen.GUI.Config
|
|||
[XmlElement("JissenMahjong")] public XmlIntArray JissenMahjongButtons = new UInt32[21];
|
||||
[XmlElement("SuborKeyboard")] public XmlIntArray SuborKeyboardButtons = new UInt32[99];
|
||||
[XmlElement("BandaiMicrophone")] public XmlIntArray BandaiMicrophoneButtons = new UInt32[3];
|
||||
[XmlElement("VirtualBoy")] public XmlIntArray VirtualBoyButtons = new UInt32[14];
|
||||
|
||||
public KeyMappings()
|
||||
{
|
||||
|
@ -52,6 +53,7 @@ namespace Mesen.GUI.Config
|
|||
clone.JissenMahjongButtons = this.JissenMahjongButtons.Clone();
|
||||
clone.SuborKeyboardButtons = this.SuborKeyboardButtons.Clone();
|
||||
clone.BandaiMicrophoneButtons = this.BandaiMicrophoneButtons.Clone();
|
||||
clone.VirtualBoyButtons = this.VirtualBoyButtons.Clone();
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
@ -82,6 +84,7 @@ namespace Mesen.GUI.Config
|
|||
mapping.JissenMahjongButtons = JissenMahjongButtons;
|
||||
mapping.SuborKeyboardButtons = SuborKeyboardButtons;
|
||||
mapping.BandaiMicrophoneButtons = BandaiMicrophoneButtons;
|
||||
mapping.VirtualBoyButtons = VirtualBoyButtons;
|
||||
|
||||
return mapping;
|
||||
}
|
||||
|
@ -180,6 +183,7 @@ namespace Mesen.GUI.Config
|
|||
controllerInfo.Keys[0].PowerPadButtons = presets.PowerPad.PowerPadButtons;
|
||||
controllerInfo.Keys[0].SuborKeyboardButtons = presets.SuborKeyboard.SuborKeyboardButtons;
|
||||
controllerInfo.Keys[0].BandaiMicrophoneButtons = presets.BandaiMicrophone.BandaiMicrophoneButtons;
|
||||
controllerInfo.Keys[0].VirtualBoyButtons = presets.VirtualBoy.VirtualBoyButtons;
|
||||
} else if(Controllers.Count == 1) {
|
||||
if(controllerInfo.Keys.Count == 0) {
|
||||
controllerInfo.Keys.Add(new KeyMappings());
|
||||
|
|
|
@ -37,6 +37,9 @@ namespace Mesen.GUI.Config
|
|||
KeyMappings _bandaiMicrophone;
|
||||
public KeyMappings BandaiMicrophone { get { return _bandaiMicrophone.Clone(); } }
|
||||
|
||||
KeyMappings _virtualBoy;
|
||||
public KeyMappings VirtualBoy { get { return _virtualBoy.Clone(); } }
|
||||
|
||||
public KeyMappings WasdLayout { get { return _wasdLayout.Clone(); } }
|
||||
public KeyMappings ArrowLayout { get { return _arrowLayout.Clone(); } }
|
||||
public KeyMappings NestopiaLayout { get { return _nestopiaLayout.Clone(); } }
|
||||
|
@ -301,6 +304,26 @@ namespace Mesen.GUI.Config
|
|||
0,0,0
|
||||
}
|
||||
};
|
||||
|
||||
_virtualBoy = new KeyMappings()
|
||||
{
|
||||
VirtualBoyButtons = new UInt32[14] {
|
||||
InteropEmu.GetKeyCode("K"),
|
||||
InteropEmu.GetKeyCode("J"),
|
||||
InteropEmu.GetKeyCode("E"),
|
||||
InteropEmu.GetKeyCode("R"),
|
||||
InteropEmu.GetKeyCode("W"),
|
||||
InteropEmu.GetKeyCode("S"),
|
||||
InteropEmu.GetKeyCode("A"),
|
||||
InteropEmu.GetKeyCode("D"),
|
||||
InteropEmu.GetKeyCode("L"),
|
||||
InteropEmu.GetKeyCode("I"),
|
||||
InteropEmu.GetKeyCode("Q"),
|
||||
InteropEmu.GetKeyCode("O"),
|
||||
InteropEmu.GetKeyCode("Y"),
|
||||
InteropEmu.GetKeyCode("U"),
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -975,6 +975,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SNES Mouse</Value>
|
||||
<Value ID="SuborMouse">Subor Mouse</Value>
|
||||
<Value ID="VbController">Virtual Boy Controller</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Cap</Value>
|
||||
|
|
|
@ -1009,6 +1009,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SNES Mouse</Value>
|
||||
<Value ID="SuborMouse">Subor Mouse</Value>
|
||||
<Value ID="VbController">Virtual Boy Controller</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">None</Value>
|
||||
|
|
|
@ -992,6 +992,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">Ratón SNES</Value>
|
||||
<Value ID="SuborMouse">Ratón Subor</Value>
|
||||
<Value ID="VbController">Control Virtual Boy</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Ninguno</Value>
|
||||
|
|
|
@ -1006,6 +1006,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">Souris SNES</Value>
|
||||
<Value ID="SuborMouse">Souris Subor</Value>
|
||||
<Value ID="VbController">Manette Virtual Boy</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Aucun</Value>
|
||||
|
|
|
@ -1008,6 +1008,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SNES Mouse</Value>
|
||||
<Value ID="SuborMouse">Subor Mouse</Value>
|
||||
<Value ID="VbController">Virtual Boy Controller</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Nessuno</Value>
|
||||
|
|
|
@ -994,6 +994,7 @@
|
|||
<Value ID="PowerPad">パワーパッド</Value>
|
||||
<Value ID="SnesMouse">スーパーファミコマウス</Value>
|
||||
<Value ID="SuborMouse">Suborマウス</Value>
|
||||
<Value ID="VbController">バーチャルボーイコントローラ</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">なし</Value>
|
||||
|
|
|
@ -1008,6 +1008,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">Mouse SNES</Value>
|
||||
<Value ID="SuborMouse">Mouse Subor</Value>
|
||||
<Value ID="VbController">Controle Virtual Boy</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Nenhum</Value>
|
||||
|
|
|
@ -994,6 +994,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SNES Mouse</Value>
|
||||
<Value ID="SuborMouse">Subor Mouse</Value>
|
||||
<Value ID="VbController">Virtual Boy Controller</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Пусто</Value>
|
||||
|
|
|
@ -994,6 +994,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SNES Mouse</Value>
|
||||
<Value ID="SuborMouse">Subor Mouse</Value>
|
||||
<Value ID="VbController">Virtual Boy Controller</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">Пусто</Value>
|
||||
|
|
|
@ -1021,6 +1021,7 @@
|
|||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SFC 鼠标</Value>
|
||||
<Value ID="SuborMouse">小霸王鼠标</Value>
|
||||
<Value ID="VbController">Virtual Boy 控制器</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">无</Value>
|
||||
|
|
344
GUI.NET/Forms/Config/Controllers/ctrlVirtualBoyConfig.Designer.cs
generated
Normal file
344
GUI.NET/Forms/Config/Controllers/ctrlVirtualBoyConfig.Designer.cs
generated
Normal file
|
@ -0,0 +1,344 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class ctrlVirtualBoyConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btn1 = new System.Windows.Forms.Button();
|
||||
this.btn2 = new System.Windows.Forms.Button();
|
||||
this.btn3 = new System.Windows.Forms.Button();
|
||||
this.btn4 = new System.Windows.Forms.Button();
|
||||
this.btn5 = new System.Windows.Forms.Button();
|
||||
this.btn6 = new System.Windows.Forms.Button();
|
||||
this.btn7 = new System.Windows.Forms.Button();
|
||||
this.btn8 = new System.Windows.Forms.Button();
|
||||
this.btn10 = new System.Windows.Forms.Button();
|
||||
this.btn11 = new System.Windows.Forms.Button();
|
||||
this.btn12 = new System.Windows.Forms.Button();
|
||||
this.lbl2 = new System.Windows.Forms.Label();
|
||||
this.lbl3 = new System.Windows.Forms.Label();
|
||||
this.lbl12 = new System.Windows.Forms.Label();
|
||||
this.lbl11 = new System.Windows.Forms.Label();
|
||||
this.lbl10 = new System.Windows.Forms.Label();
|
||||
this.btn9 = new System.Windows.Forms.Button();
|
||||
this.btnClearKeys = new System.Windows.Forms.Button();
|
||||
this.btn13 = new System.Windows.Forms.Button();
|
||||
this.lbl13 = new System.Windows.Forms.Label();
|
||||
this.btn0 = new System.Windows.Forms.Button();
|
||||
this.tlpMain.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tlpMain
|
||||
//
|
||||
this.tlpMain.AutoSize = true;
|
||||
this.tlpMain.ColumnCount = 9;
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tlpMain.Controls.Add(this.btn2, 2, 1);
|
||||
this.tlpMain.Controls.Add(this.btn3, 3, 1);
|
||||
this.tlpMain.Controls.Add(this.lbl2, 2, 2);
|
||||
this.tlpMain.Controls.Add(this.lbl3, 3, 2);
|
||||
this.tlpMain.Controls.Add(this.btn9, 6, 3);
|
||||
this.tlpMain.Controls.Add(this.btn11, 7, 1);
|
||||
this.tlpMain.Controls.Add(this.lbl11, 7, 2);
|
||||
this.tlpMain.Controls.Add(this.btn4, 2, 3);
|
||||
this.tlpMain.Controls.Add(this.btn10, 1, 1);
|
||||
this.tlpMain.Controls.Add(this.lbl10, 1, 2);
|
||||
this.tlpMain.Controls.Add(this.btn12, 4, 1);
|
||||
this.tlpMain.Controls.Add(this.lbl12, 4, 2);
|
||||
this.tlpMain.Controls.Add(this.btn13, 6, 1);
|
||||
this.tlpMain.Controls.Add(this.lbl13, 6, 2);
|
||||
this.tlpMain.Controls.Add(this.btn6, 1, 4);
|
||||
this.tlpMain.Controls.Add(this.btn7, 3, 4);
|
||||
this.tlpMain.Controls.Add(this.btn1, 4, 4);
|
||||
this.tlpMain.Controls.Add(this.btn8, 7, 4);
|
||||
this.tlpMain.Controls.Add(this.btn0, 6, 6);
|
||||
this.tlpMain.Controls.Add(this.btn5, 2, 6);
|
||||
this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.tlpMain.Name = "tlpMain";
|
||||
this.tlpMain.RowCount = 8;
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tlpMain.Size = new System.Drawing.Size(415, 175);
|
||||
this.tlpMain.TabIndex = 2;
|
||||
//
|
||||
// btn1
|
||||
//
|
||||
this.btn1.Location = new System.Drawing.Point(212, 99);
|
||||
this.btn1.Name = "btn1";
|
||||
this.btn1.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn1.TabIndex = 30;
|
||||
this.btn1.Text = "Left 2";
|
||||
this.btn1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn2
|
||||
//
|
||||
this.btn2.Location = new System.Drawing.Point(78, 11);
|
||||
this.btn2.Name = "btn2";
|
||||
this.btn2.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn2.TabIndex = 34;
|
||||
this.btn2.Text = "Select";
|
||||
this.btn2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn3
|
||||
//
|
||||
this.btn3.Location = new System.Drawing.Point(145, 11);
|
||||
this.btn3.Name = "btn3";
|
||||
this.btn3.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn3.TabIndex = 32;
|
||||
this.btn3.Text = "Start";
|
||||
this.btn3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn4
|
||||
//
|
||||
this.btn4.Location = new System.Drawing.Point(78, 64);
|
||||
this.btn4.Name = "btn4";
|
||||
this.btn4.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn4.TabIndex = 33;
|
||||
this.btn4.Text = "Up 1";
|
||||
this.btn4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn5
|
||||
//
|
||||
this.btn5.Location = new System.Drawing.Point(78, 134);
|
||||
this.btn5.Name = "btn5";
|
||||
this.btn5.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn5.TabIndex = 37;
|
||||
this.btn5.Text = "Down 1";
|
||||
this.btn5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn6
|
||||
//
|
||||
this.btn6.Location = new System.Drawing.Point(11, 99);
|
||||
this.btn6.Name = "btn6";
|
||||
this.btn6.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn6.TabIndex = 35;
|
||||
this.btn6.Text = "Left 1";
|
||||
this.btn6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn7
|
||||
//
|
||||
this.btn7.Location = new System.Drawing.Point(145, 99);
|
||||
this.btn7.Name = "btn7";
|
||||
this.btn7.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn7.TabIndex = 38;
|
||||
this.btn7.Text = "Right 1";
|
||||
this.btn7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn8
|
||||
//
|
||||
this.btn8.Location = new System.Drawing.Point(345, 99);
|
||||
this.btn8.Name = "btn8";
|
||||
this.btn8.Size = new System.Drawing.Size(58, 29);
|
||||
this.btn8.TabIndex = 36;
|
||||
this.btn8.Text = "Right 2";
|
||||
this.btn8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn10
|
||||
//
|
||||
this.btn10.Location = new System.Drawing.Point(11, 11);
|
||||
this.btn10.Name = "btn10";
|
||||
this.btn10.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn10.TabIndex = 40;
|
||||
this.btn10.Text = "L";
|
||||
this.btn10.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn11
|
||||
//
|
||||
this.btn11.Location = new System.Drawing.Point(345, 11);
|
||||
this.btn11.Name = "btn11";
|
||||
this.btn11.Size = new System.Drawing.Size(58, 29);
|
||||
this.btn11.TabIndex = 42;
|
||||
this.btn11.Text = "R";
|
||||
this.btn11.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn12
|
||||
//
|
||||
this.btn12.Location = new System.Drawing.Point(212, 11);
|
||||
this.btn12.Name = "btn12";
|
||||
this.btn12.Size = new System.Drawing.Size(61, 29);
|
||||
this.btn12.TabIndex = 39;
|
||||
this.btn12.Text = "B";
|
||||
this.btn12.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lbl2
|
||||
//
|
||||
this.lbl2.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbl2.AutoSize = true;
|
||||
this.lbl2.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbl2.Location = new System.Drawing.Point(82, 43);
|
||||
this.lbl2.Name = "lbl2";
|
||||
this.lbl2.Size = new System.Drawing.Size(53, 18);
|
||||
this.lbl2.TabIndex = 45;
|
||||
this.lbl2.Text = "Select";
|
||||
//
|
||||
// lbl3
|
||||
//
|
||||
this.lbl3.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbl3.AutoSize = true;
|
||||
this.lbl3.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbl3.Location = new System.Drawing.Point(154, 43);
|
||||
this.lbl3.Name = "lbl3";
|
||||
this.lbl3.Size = new System.Drawing.Size(42, 18);
|
||||
this.lbl3.TabIndex = 44;
|
||||
this.lbl3.Text = "Start";
|
||||
//
|
||||
// lbl12
|
||||
//
|
||||
this.lbl12.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbl12.AutoSize = true;
|
||||
this.lbl12.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbl12.Location = new System.Drawing.Point(233, 43);
|
||||
this.lbl12.Name = "lbl12";
|
||||
this.lbl12.Size = new System.Drawing.Size(19, 18);
|
||||
this.lbl12.TabIndex = 50;
|
||||
this.lbl12.Text = "B";
|
||||
//
|
||||
// lbl11
|
||||
//
|
||||
this.lbl11.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbl11.AutoSize = true;
|
||||
this.lbl11.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbl11.Location = new System.Drawing.Point(364, 43);
|
||||
this.lbl11.Name = "lbl11";
|
||||
this.lbl11.Size = new System.Drawing.Size(19, 18);
|
||||
this.lbl11.TabIndex = 51;
|
||||
this.lbl11.Text = "R";
|
||||
//
|
||||
// lbl10
|
||||
//
|
||||
this.lbl10.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbl10.AutoSize = true;
|
||||
this.lbl10.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbl10.Location = new System.Drawing.Point(33, 43);
|
||||
this.lbl10.Name = "lbl10";
|
||||
this.lbl10.Size = new System.Drawing.Size(17, 18);
|
||||
this.lbl10.TabIndex = 52;
|
||||
this.lbl10.Text = "L";
|
||||
//
|
||||
// btn9
|
||||
//
|
||||
this.btn9.Location = new System.Drawing.Point(279, 64);
|
||||
this.btn9.Name = "btn9";
|
||||
this.btn9.Size = new System.Drawing.Size(60, 29);
|
||||
this.btn9.TabIndex = 41;
|
||||
this.btn9.Text = "Up 2";
|
||||
this.btn9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnClearKeys
|
||||
//
|
||||
this.btnClearKeys.AutoSize = true;
|
||||
this.btnClearKeys.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnClearKeys.Name = "btnClearKeys";
|
||||
this.btnClearKeys.Size = new System.Drawing.Size(105, 23);
|
||||
this.btnClearKeys.TabIndex = 3;
|
||||
this.btnClearKeys.Text = "Clear Key Bindings";
|
||||
this.btnClearKeys.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn13
|
||||
//
|
||||
this.btn13.Location = new System.Drawing.Point(279, 11);
|
||||
this.btn13.Name = "btn13";
|
||||
this.btn13.Size = new System.Drawing.Size(60, 29);
|
||||
this.btn13.TabIndex = 54;
|
||||
this.btn13.Text = "A";
|
||||
this.btn13.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lbl13
|
||||
//
|
||||
this.lbl13.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbl13.AutoSize = true;
|
||||
this.lbl13.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbl13.Location = new System.Drawing.Point(300, 43);
|
||||
this.lbl13.Name = "lbl13";
|
||||
this.lbl13.Size = new System.Drawing.Size(17, 18);
|
||||
this.lbl13.TabIndex = 55;
|
||||
this.lbl13.Text = "A";
|
||||
//
|
||||
// btn0
|
||||
//
|
||||
this.btn0.Location = new System.Drawing.Point(279, 134);
|
||||
this.btn0.Name = "btn0";
|
||||
this.btn0.Size = new System.Drawing.Size(60, 29);
|
||||
this.btn0.TabIndex = 56;
|
||||
this.btn0.Text = "Down 2";
|
||||
this.btn0.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlVirtualBoyConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tlpMain);
|
||||
this.Name = "ctrlVirtualBoyConfig";
|
||||
this.Size = new System.Drawing.Size(415, 175);
|
||||
this.tlpMain.ResumeLayout(false);
|
||||
this.tlpMain.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tlpMain;
|
||||
private System.Windows.Forms.Button btn0;
|
||||
private System.Windows.Forms.Button btn1;
|
||||
private System.Windows.Forms.Button btn2;
|
||||
private System.Windows.Forms.Button btn3;
|
||||
private System.Windows.Forms.Button btn4;
|
||||
private System.Windows.Forms.Button btn5;
|
||||
private System.Windows.Forms.Button btn6;
|
||||
private System.Windows.Forms.Button btn7;
|
||||
private System.Windows.Forms.Button btn8;
|
||||
private System.Windows.Forms.Button btn9;
|
||||
private System.Windows.Forms.Button btn10;
|
||||
private System.Windows.Forms.Button btn11;
|
||||
private System.Windows.Forms.Button btn12;
|
||||
private System.Windows.Forms.Button btn13;
|
||||
private System.Windows.Forms.Label lbl2;
|
||||
private System.Windows.Forms.Label lbl3;
|
||||
private System.Windows.Forms.Label lbl10;
|
||||
private System.Windows.Forms.Label lbl11;
|
||||
private System.Windows.Forms.Label lbl12;
|
||||
private System.Windows.Forms.Label lbl13;
|
||||
private System.Windows.Forms.Button btnClearKeys;
|
||||
}
|
||||
}
|
42
GUI.NET/Forms/Config/Controllers/ctrlVirtualBoyConfig.cs
Normal file
42
GUI.NET/Forms/Config/Controllers/ctrlVirtualBoyConfig.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Mesen.GUI.Config;
|
||||
using Mesen.GUI.Controls;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public partial class ctrlVirtualBoyConfig : BaseInputConfigControl
|
||||
{
|
||||
private List<Button> _keyIndexes;
|
||||
|
||||
public ctrlVirtualBoyConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_keyIndexes = new List<Button>() {
|
||||
btn0, btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn9, btn10, btn11, btn12, btn13
|
||||
};
|
||||
}
|
||||
|
||||
public override void Initialize(KeyMappings mappings)
|
||||
{
|
||||
for(int i = 0; i < _keyIndexes.Count; i++) {
|
||||
InitButton(_keyIndexes[i], mappings.VirtualBoyButtons[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateKeyMappings(KeyMappings mappings)
|
||||
{
|
||||
for(int i = 0; i < _keyIndexes.Count; i++) {
|
||||
mappings.VirtualBoyButtons[i] = (UInt32)_keyIndexes[i].Tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
GUI.NET/Forms/Config/Controllers/ctrlVirtualBoyConfig.resx
Normal file
120
GUI.NET/Forms/Config/Controllers/ctrlVirtualBoyConfig.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
408
GUI.NET/Forms/Config/Controllers/frmVirtualBoyConfig.Designer.cs
generated
Normal file
408
GUI.NET/Forms/Config/Controllers/frmVirtualBoyConfig.Designer.cs
generated
Normal file
|
@ -0,0 +1,408 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class frmVirtualBoyConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmVirtualBoyConfig));
|
||||
this.imageList = new System.Windows.Forms.ImageList(this.components);
|
||||
this.btnClear = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnSetDefault = new System.Windows.Forms.Button();
|
||||
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tabMain = new System.Windows.Forms.TabControl();
|
||||
this.tpgSet1 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlVirtualBoyConfig0 = new Mesen.GUI.Forms.Config.ctrlVirtualBoyConfig();
|
||||
this.tpgSet2 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlVirtualBoyConfig1 = new Mesen.GUI.Forms.Config.ctrlVirtualBoyConfig();
|
||||
this.tpgSet3 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlVirtualBoyConfig2 = new Mesen.GUI.Forms.Config.ctrlVirtualBoyConfig();
|
||||
this.tpgSet4 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlVirtualBoyConfig3 = new Mesen.GUI.Forms.Config.ctrlVirtualBoyConfig();
|
||||
this.mnuStripPreset = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuKeyboard = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuWasdLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuArrowLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuFceuxLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuNestopiaLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuXboxController = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuXboxLayout1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuXboxLayout2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPs4Controller = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPs4Layout1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPs4Layout2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSnes30Controller = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSnes30Layout1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSnes30Layout2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ctrlKeyBindingHint1 = new Mesen.GUI.Forms.Config.ctrlKeyBindingHint();
|
||||
this.baseConfigPanel.SuspendLayout();
|
||||
this.flowLayoutPanel2.SuspendLayout();
|
||||
this.tlpMain.SuspendLayout();
|
||||
this.tabMain.SuspendLayout();
|
||||
this.tpgSet1.SuspendLayout();
|
||||
this.tpgSet2.SuspendLayout();
|
||||
this.tpgSet3.SuspendLayout();
|
||||
this.tpgSet4.SuspendLayout();
|
||||
this.mnuStripPreset.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Controls.Add(this.flowLayoutPanel2);
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 405);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(496, 29);
|
||||
this.baseConfigPanel.Controls.SetChildIndex(this.flowLayoutPanel2, 0);
|
||||
//
|
||||
// imageList
|
||||
//
|
||||
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
|
||||
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList.Images.SetKeyName(0, "Keyboard");
|
||||
this.imageList.Images.SetKeyName(1, "Controller");
|
||||
//
|
||||
// btnClear
|
||||
//
|
||||
this.btnClear.AutoSize = true;
|
||||
this.btnClear.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnClear.Name = "btnClear";
|
||||
this.btnClear.Size = new System.Drawing.Size(105, 23);
|
||||
this.btnClear.TabIndex = 3;
|
||||
this.btnClear.Text = "Clear Key Bindings";
|
||||
this.btnClear.UseVisualStyleBackColor = true;
|
||||
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
|
||||
//
|
||||
// flowLayoutPanel2
|
||||
//
|
||||
this.flowLayoutPanel2.Controls.Add(this.btnClear);
|
||||
this.flowLayoutPanel2.Controls.Add(this.btnSetDefault);
|
||||
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(264, 29);
|
||||
this.flowLayoutPanel2.TabIndex = 5;
|
||||
//
|
||||
// btnSetDefault
|
||||
//
|
||||
this.btnSetDefault.AutoSize = true;
|
||||
this.btnSetDefault.Location = new System.Drawing.Point(114, 3);
|
||||
this.btnSetDefault.Name = "btnSetDefault";
|
||||
this.btnSetDefault.Size = new System.Drawing.Size(113, 23);
|
||||
this.btnSetDefault.TabIndex = 4;
|
||||
this.btnSetDefault.Text = "Set Default Bindings";
|
||||
this.btnSetDefault.UseVisualStyleBackColor = true;
|
||||
this.btnSetDefault.Click += new System.EventHandler(this.btnSetDefault_Click);
|
||||
//
|
||||
// tlpMain
|
||||
//
|
||||
this.tlpMain.ColumnCount = 1;
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpMain.Controls.Add(this.tabMain, 0, 1);
|
||||
this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpMain.Location = new System.Drawing.Point(0, 31);
|
||||
this.tlpMain.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tlpMain.Name = "tlpMain";
|
||||
this.tlpMain.RowCount = 4;
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.Size = new System.Drawing.Size(496, 374);
|
||||
this.tlpMain.TabIndex = 23;
|
||||
//
|
||||
// tabMain
|
||||
//
|
||||
this.tabMain.Controls.Add(this.tpgSet1);
|
||||
this.tabMain.Controls.Add(this.tpgSet2);
|
||||
this.tabMain.Controls.Add(this.tpgSet3);
|
||||
this.tabMain.Controls.Add(this.tpgSet4);
|
||||
this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabMain.ImageList = this.imageList;
|
||||
this.tabMain.Location = new System.Drawing.Point(3, 3);
|
||||
this.tabMain.Name = "tabMain";
|
||||
this.tabMain.SelectedIndex = 0;
|
||||
this.tabMain.Size = new System.Drawing.Size(490, 368);
|
||||
this.tabMain.TabIndex = 3;
|
||||
//
|
||||
// tpgSet1
|
||||
//
|
||||
this.tpgSet1.Controls.Add(this.ctrlVirtualBoyConfig0);
|
||||
this.tpgSet1.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet1.Name = "tpgSet1";
|
||||
this.tpgSet1.Size = new System.Drawing.Size(482, 341);
|
||||
this.tpgSet1.TabIndex = 0;
|
||||
this.tpgSet1.Text = "Key Set #1";
|
||||
this.tpgSet1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlVirtualBoyConfig0
|
||||
//
|
||||
this.ctrlVirtualBoyConfig0.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlVirtualBoyConfig0.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlVirtualBoyConfig0.Name = "ctrlVirtualBoyConfig0";
|
||||
this.ctrlVirtualBoyConfig0.Size = new System.Drawing.Size(482, 341);
|
||||
this.ctrlVirtualBoyConfig0.TabIndex = 0;
|
||||
//
|
||||
// tpgSet2
|
||||
//
|
||||
this.tpgSet2.Controls.Add(this.ctrlVirtualBoyConfig1);
|
||||
this.tpgSet2.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet2.Name = "tpgSet2";
|
||||
this.tpgSet2.Size = new System.Drawing.Size(482, 341);
|
||||
this.tpgSet2.TabIndex = 1;
|
||||
this.tpgSet2.Text = "Key Set #2";
|
||||
this.tpgSet2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlVirtualBoyConfig1
|
||||
//
|
||||
this.ctrlVirtualBoyConfig1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlVirtualBoyConfig1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlVirtualBoyConfig1.Name = "ctrlVirtualBoyConfig1";
|
||||
this.ctrlVirtualBoyConfig1.Size = new System.Drawing.Size(482, 341);
|
||||
this.ctrlVirtualBoyConfig1.TabIndex = 1;
|
||||
//
|
||||
// tpgSet3
|
||||
//
|
||||
this.tpgSet3.Controls.Add(this.ctrlVirtualBoyConfig2);
|
||||
this.tpgSet3.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet3.Name = "tpgSet3";
|
||||
this.tpgSet3.Size = new System.Drawing.Size(482, 341);
|
||||
this.tpgSet3.TabIndex = 2;
|
||||
this.tpgSet3.Text = "Key Set #3";
|
||||
this.tpgSet3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlVirtualBoyConfig2
|
||||
//
|
||||
this.ctrlVirtualBoyConfig2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlVirtualBoyConfig2.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlVirtualBoyConfig2.Name = "ctrlVirtualBoyConfig2";
|
||||
this.ctrlVirtualBoyConfig2.Size = new System.Drawing.Size(482, 341);
|
||||
this.ctrlVirtualBoyConfig2.TabIndex = 1;
|
||||
//
|
||||
// tpgSet4
|
||||
//
|
||||
this.tpgSet4.Controls.Add(this.ctrlVirtualBoyConfig3);
|
||||
this.tpgSet4.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet4.Name = "tpgSet4";
|
||||
this.tpgSet4.Size = new System.Drawing.Size(482, 341);
|
||||
this.tpgSet4.TabIndex = 3;
|
||||
this.tpgSet4.Text = "Key Set #4";
|
||||
this.tpgSet4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlVirtualBoyConfig3
|
||||
//
|
||||
this.ctrlVirtualBoyConfig3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlVirtualBoyConfig3.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlVirtualBoyConfig3.Name = "ctrlVirtualBoyConfig3";
|
||||
this.ctrlVirtualBoyConfig3.Size = new System.Drawing.Size(482, 341);
|
||||
this.ctrlVirtualBoyConfig3.TabIndex = 1;
|
||||
//
|
||||
// mnuStripPreset
|
||||
//
|
||||
this.mnuStripPreset.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuKeyboard,
|
||||
this.toolStripMenuItem1,
|
||||
this.mnuXboxController,
|
||||
this.mnuPs4Controller,
|
||||
this.mnuSnes30Controller});
|
||||
this.mnuStripPreset.Name = "mnuStripPreset";
|
||||
this.mnuStripPreset.Size = new System.Drawing.Size(170, 98);
|
||||
//
|
||||
// mnuKeyboard
|
||||
//
|
||||
this.mnuKeyboard.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuWasdLayout,
|
||||
this.mnuArrowLayout,
|
||||
this.mnuFceuxLayout,
|
||||
this.mnuNestopiaLayout});
|
||||
this.mnuKeyboard.Name = "mnuKeyboard";
|
||||
this.mnuKeyboard.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuKeyboard.Text = "Keyboard";
|
||||
//
|
||||
// mnuWasdLayout
|
||||
//
|
||||
this.mnuWasdLayout.Name = "mnuWasdLayout";
|
||||
this.mnuWasdLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuWasdLayout.Text = "WASD Layout";
|
||||
//
|
||||
// mnuArrowLayout
|
||||
//
|
||||
this.mnuArrowLayout.Name = "mnuArrowLayout";
|
||||
this.mnuArrowLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuArrowLayout.Text = "Arrow Keys Layout";
|
||||
//
|
||||
// mnuFceuxLayout
|
||||
//
|
||||
this.mnuFceuxLayout.Name = "mnuFceuxLayout";
|
||||
this.mnuFceuxLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuFceuxLayout.Text = "FCEUX Default";
|
||||
//
|
||||
// mnuNestopiaLayout
|
||||
//
|
||||
this.mnuNestopiaLayout.Name = "mnuNestopiaLayout";
|
||||
this.mnuNestopiaLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuNestopiaLayout.Text = "Nestopia Default";
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(166, 6);
|
||||
//
|
||||
// mnuXboxController
|
||||
//
|
||||
this.mnuXboxController.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuXboxLayout1,
|
||||
this.mnuXboxLayout2});
|
||||
this.mnuXboxController.Name = "mnuXboxController";
|
||||
this.mnuXboxController.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuXboxController.Text = "Xbox Controller";
|
||||
//
|
||||
// mnuXboxLayout1
|
||||
//
|
||||
this.mnuXboxLayout1.Name = "mnuXboxLayout1";
|
||||
this.mnuXboxLayout1.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuXboxLayout1.Text = "Controller #1";
|
||||
//
|
||||
// mnuXboxLayout2
|
||||
//
|
||||
this.mnuXboxLayout2.Name = "mnuXboxLayout2";
|
||||
this.mnuXboxLayout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuXboxLayout2.Text = "Controller #2";
|
||||
//
|
||||
// mnuPs4Controller
|
||||
//
|
||||
this.mnuPs4Controller.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuPs4Layout1,
|
||||
this.mnuPs4Layout2});
|
||||
this.mnuPs4Controller.Name = "mnuPs4Controller";
|
||||
this.mnuPs4Controller.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuPs4Controller.Text = "PS4 Controller";
|
||||
//
|
||||
// mnuPs4Layout1
|
||||
//
|
||||
this.mnuPs4Layout1.Name = "mnuPs4Layout1";
|
||||
this.mnuPs4Layout1.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuPs4Layout1.Text = "Controller #1";
|
||||
//
|
||||
// mnuPs4Layout2
|
||||
//
|
||||
this.mnuPs4Layout2.Name = "mnuPs4Layout2";
|
||||
this.mnuPs4Layout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuPs4Layout2.Text = "Controller #2";
|
||||
//
|
||||
// mnuSnes30Controller
|
||||
//
|
||||
this.mnuSnes30Controller.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuSnes30Layout1,
|
||||
this.mnuSnes30Layout2});
|
||||
this.mnuSnes30Controller.Name = "mnuSnes30Controller";
|
||||
this.mnuSnes30Controller.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuSnes30Controller.Text = "SNES30 Controller";
|
||||
//
|
||||
// mnuSnes30Layout1
|
||||
//
|
||||
this.mnuSnes30Layout1.Name = "mnuSnes30Layout1";
|
||||
this.mnuSnes30Layout1.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuSnes30Layout1.Text = "Controller #1";
|
||||
//
|
||||
// mnuSnes30Layout2
|
||||
//
|
||||
this.mnuSnes30Layout2.Name = "mnuSnes30Layout2";
|
||||
this.mnuSnes30Layout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuSnes30Layout2.Text = "Controller #2";
|
||||
//
|
||||
// ctrlKeyBindingHint1
|
||||
//
|
||||
this.ctrlKeyBindingHint1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.ctrlKeyBindingHint1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlKeyBindingHint1.Name = "ctrlKeyBindingHint1";
|
||||
this.ctrlKeyBindingHint1.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||
this.ctrlKeyBindingHint1.Size = new System.Drawing.Size(496, 31);
|
||||
this.ctrlKeyBindingHint1.TabIndex = 24;
|
||||
//
|
||||
// frmVirtualBoyConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(496, 434);
|
||||
this.Controls.Add(this.tlpMain);
|
||||
this.Controls.Add(this.ctrlKeyBindingHint1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "frmVirtualBoyConfig";
|
||||
this.Text = "Power Pad / Family Mat Trainer";
|
||||
this.Controls.SetChildIndex(this.ctrlKeyBindingHint1, 0);
|
||||
this.Controls.SetChildIndex(this.baseConfigPanel, 0);
|
||||
this.Controls.SetChildIndex(this.tlpMain, 0);
|
||||
this.baseConfigPanel.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.PerformLayout();
|
||||
this.tlpMain.ResumeLayout(false);
|
||||
this.tabMain.ResumeLayout(false);
|
||||
this.tpgSet1.ResumeLayout(false);
|
||||
this.tpgSet2.ResumeLayout(false);
|
||||
this.tpgSet3.ResumeLayout(false);
|
||||
this.tpgSet4.ResumeLayout(false);
|
||||
this.mnuStripPreset.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||
private System.Windows.Forms.Button btnClear;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpMain;
|
||||
private System.Windows.Forms.ContextMenuStrip mnuStripPreset;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuKeyboard;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuWasdLayout;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuArrowLayout;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuFceuxLayout;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuNestopiaLayout;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuXboxController;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuXboxLayout1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuXboxLayout2;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSnes30Controller;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuPs4Controller;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuPs4Layout1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuPs4Layout2;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSnes30Layout1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSnes30Layout2;
|
||||
private System.Windows.Forms.ImageList imageList;
|
||||
private System.Windows.Forms.TabControl tabMain;
|
||||
private System.Windows.Forms.TabPage tpgSet1;
|
||||
private ctrlVirtualBoyConfig ctrlVirtualBoyConfig0;
|
||||
private System.Windows.Forms.TabPage tpgSet2;
|
||||
private ctrlVirtualBoyConfig ctrlVirtualBoyConfig1;
|
||||
private System.Windows.Forms.TabPage tpgSet3;
|
||||
private ctrlVirtualBoyConfig ctrlVirtualBoyConfig2;
|
||||
private System.Windows.Forms.TabPage tpgSet4;
|
||||
private ctrlVirtualBoyConfig ctrlVirtualBoyConfig3;
|
||||
private ctrlKeyBindingHint ctrlKeyBindingHint1;
|
||||
private System.Windows.Forms.Button btnSetDefault;
|
||||
}
|
||||
}
|
45
GUI.NET/Forms/Config/Controllers/frmVirtualBoyConfig.cs
Normal file
45
GUI.NET/Forms/Config/Controllers/frmVirtualBoyConfig.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Mesen.GUI.Config;
|
||||
using Mesen.GUI.Controls;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public partial class frmVirtualBoyConfig : BaseInputConfigForm
|
||||
{
|
||||
public frmVirtualBoyConfig(ControllerInfo controllerInfo, int portNumber)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if(!this.DesignMode) {
|
||||
SetMainTab(this.tabMain);
|
||||
|
||||
Entity = controllerInfo;
|
||||
|
||||
ctrlVirtualBoyConfig0.Initialize(controllerInfo.Keys[0]);
|
||||
ctrlVirtualBoyConfig1.Initialize(controllerInfo.Keys[1]);
|
||||
ctrlVirtualBoyConfig2.Initialize(controllerInfo.Keys[2]);
|
||||
ctrlVirtualBoyConfig3.Initialize(controllerInfo.Keys[3]);
|
||||
|
||||
this.Text += ": " + ResourceHelper.GetMessage("PlayerNumber", (portNumber + 1).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearCurrentTab();
|
||||
}
|
||||
|
||||
private void btnSetDefault_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.VirtualBoy);
|
||||
}
|
||||
}
|
||||
}
|
175
GUI.NET/Forms/Config/Controllers/frmVirtualBoyConfig.resx
Normal file
175
GUI.NET/Forms/Config/Controllers/frmVirtualBoyConfig.resx
Normal file
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>243, 17</value>
|
||||
</metadata>
|
||||
<data name="imageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAbABAAGwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAAQcO6wEHAbwO6wG8
|
||||
IAAB6wHvAe0BkgbtAZIB7QGSAe0B7wLrBPEC8Ai8AesgAAHsAfcB9AGSAfME8gHzAZIB8wGSAfMB9wHs
|
||||
AesOvAHrIAAB7AEHCPcB7wP3AQcB7AHrCP8C9ALzAfIB9AHrIAAB7AHxAe8B9AHvAfQB7wH0Ae8B9AHv
|
||||
A/MB7wHsAesB9AF0ASsBdAnyAfQB6yAAAe0BvAzvAbwB7QHrAf8DKwLyAQcC7AEHA/IB9AHrIAABkgEH
|
||||
Af8BBwH/AQcB/wEHAf8BBwH/AQcC/wEHAZIB6wH/AXQBKwF0AvMB7AHzAbwB7APzAfQB6yAAAZIB8QG8
|
||||
AfEBvAHxAbwB8QG8AfEBvAHxArwB8QGSAesB/wXzAewB8wG8AewD8wH0AesgAAHwDvcB8AHrAf8F8wHs
|
||||
AisBbgPzAfQB6yIAAf8B7AH/CwAB6wH/BPMBTAFSAlMBUgFMAvMB9AHrIwABBwG8Af8KAAHrBP8BmQFM
|
||||
BCsBUgGTAf8B9AHrIwAB/wG8COwBBwH/AQABvATrAysBUgIrAVMBKwLrAbwsAAH/AQcB8AYAAUwDUgFM
|
||||
ASsBUwFMMAAB9AGSBgABGgErAlIBTAErAVIBmTAAAf8B7AYAAf8CTAJSASsBTAH/OQAB/wGZAkwBmQH/
|
||||
JAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/0kAAccB/wYAAeMB/wYAAeABAQYA
|
||||
Af8B8QH4AQcEAAH/AfkB+AEHBAAB/wH5AfgBBwQAAv8B/AEPBAAL
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="mnuStripPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>106, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -149,6 +149,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
controllerTypes.Add(InteropEmu.ControllerType.PowerPad);
|
||||
controllerTypes.Add(InteropEmu.ControllerType.Zapper);
|
||||
controllerTypes.Add(InteropEmu.ControllerType.SnesController);
|
||||
controllerTypes.Add(InteropEmu.ControllerType.VbController);
|
||||
}
|
||||
|
||||
SetAvailableControllerTypes(cboPlayer1, controllerTypes.ToArray());
|
||||
|
@ -277,7 +278,8 @@ namespace Mesen.GUI.Forms.Config
|
|||
selectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.SnesMouse)) ||
|
||||
selectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.SuborMouse)) ||
|
||||
selectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.ArkanoidController)) ||
|
||||
selectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.PowerPad));
|
||||
selectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.PowerPad)) ||
|
||||
selectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.VbController));
|
||||
|
||||
buttons[i].Enabled = enableButton;
|
||||
}
|
||||
|
@ -356,6 +358,10 @@ namespace Mesen.GUI.Forms.Config
|
|||
case InteropEmu.ControllerType.ArkanoidController:
|
||||
frm = new frmMouseConfig(inputInfo.ArkanoidController);
|
||||
break;
|
||||
|
||||
case InteropEmu.ControllerType.VbController:
|
||||
frm = new frmVirtualBoyConfig(inputInfo.Controllers[index], index);
|
||||
break;
|
||||
}
|
||||
} else if(selectedItem is InteropEmu.ExpansionPortDevice) {
|
||||
InteropEmu.ExpansionPortDevice device = (InteropEmu.ExpansionPortDevice)selectedItem;
|
||||
|
@ -505,6 +511,12 @@ namespace Mesen.GUI.Forms.Config
|
|||
countMapping(i, button);
|
||||
}
|
||||
break;
|
||||
case InteropEmu.ControllerType.VbController:
|
||||
foreach(UInt32 button in mappings.VirtualBoyButtons.Values)
|
||||
{
|
||||
countMapping(i, button);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ namespace Mesen.GUI.Forms
|
|||
}
|
||||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].SuborKeyboardButtons = presets.SuborKeyboard.SuborKeyboardButtons;
|
||||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].BandaiMicrophoneButtons = presets.BandaiMicrophone.BandaiMicrophoneButtons;
|
||||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].VirtualBoyButtons = presets.VirtualBoy.VirtualBoyButtons;
|
||||
}
|
||||
|
||||
//Set the audio latency setting back to a sane default (since the way the code uses the value has changed)
|
||||
|
|
|
@ -961,6 +961,12 @@
|
|||
<Compile Include="Forms\Config\Controllers\ctrlBandaiMicrophone.Designer.cs">
|
||||
<DependentUpon>ctrlBandaiMicrophone.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlVirtualBoyConfig.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlVirtualBoyConfig.designer.cs">
|
||||
<DependentUpon>ctrlVirtualBoyConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmPachinkoConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -979,6 +985,12 @@
|
|||
<Compile Include="Forms\Config\Controllers\frmBandaiMicrophone.Designer.cs">
|
||||
<DependentUpon>frmBandaiMicrophone.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmVirtualBoyConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmVirtualBoyConfig.designer.cs">
|
||||
<DependentUpon>frmVirtualBoyConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\ctrlDipSwitch.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -1664,6 +1676,9 @@
|
|||
<EmbeddedResource Include="Forms\Config\Controllers\ctrlBandaiMicrophone.resx">
|
||||
<DependentUpon>ctrlBandaiMicrophone.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\ctrlVirtualBoyConfig.resx">
|
||||
<DependentUpon>ctrlVirtualBoyConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\frmPachinkoConfig.resx">
|
||||
<DependentUpon>frmPachinkoConfig.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -1675,6 +1690,9 @@
|
|||
<DependentUpon>frmBandaiMicrophone.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\frmVirtualBoyConfig.resx">
|
||||
<DependentUpon>frmVirtualBoyConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\ctrlDipSwitch.resx">
|
||||
<DependentUpon>ctrlDipSwitch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -1010,6 +1010,8 @@ namespace Mesen.GUI
|
|||
PowerPad = 5,
|
||||
SnesMouse = 6,
|
||||
SuborMouse = 7,
|
||||
VsZapper = 8,
|
||||
VbController = 9,
|
||||
}
|
||||
|
||||
public enum ExpansionPortDevice
|
||||
|
@ -1118,6 +1120,9 @@ namespace Mesen.GUI
|
|||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
public UInt32[] BandaiMicrophoneButtons;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 14)]
|
||||
public UInt32[] VirtualBoyButtons;
|
||||
}
|
||||
|
||||
public enum StereoFilter
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#define DEVICE_EXCITINGBOXING RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 5)
|
||||
#define DEVICE_KONAMIHYPERSHOT RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 6)
|
||||
#define DEVICE_SNESGAMEPAD RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 7)
|
||||
#define DEVICE_VBGAMEPAD RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 8)
|
||||
#define DEVICE_ZAPPER RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_POINTER, 0)
|
||||
#define DEVICE_OEKAKIDS RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_POINTER, 1)
|
||||
#define DEVICE_BANDAIHYPERSHOT RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_POINTER, 2)
|
||||
|
@ -183,6 +184,7 @@ extern "C" {
|
|||
{ "Arkanoid", DEVICE_ARKANOID },
|
||||
{ "SNES Controller", DEVICE_SNESGAMEPAD },
|
||||
{ "SNES Mouse", DEVICE_SNESMOUSE },
|
||||
{ "Virtual Boy Controller" ,DEVICE_VBGAMEPAD },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
|
@ -194,6 +196,7 @@ extern "C" {
|
|||
{ "Arkanoid", DEVICE_ARKANOID },
|
||||
{ "SNES Controller", DEVICE_SNESGAMEPAD },
|
||||
{ "SNES Mouse", DEVICE_SNESMOUSE },
|
||||
{ "Virtual Boy Controller", DEVICE_VBGAMEPAD },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
|
@ -773,6 +776,7 @@ extern "C" {
|
|||
case ControllerType::SnesMouse: device = DEVICE_SNESMOUSE; break;
|
||||
case ControllerType::Zapper: device = DEVICE_ZAPPER; break;
|
||||
case ControllerType::ArkanoidController: device = DEVICE_ARKANOID; break;
|
||||
case ControllerType::VbController: device = DEVICE_VBGAMEPAD; break;
|
||||
default: return;
|
||||
}
|
||||
} else if(port == 4) {
|
||||
|
@ -862,6 +866,21 @@ extern "C" {
|
|||
} else if(device == DEVICE_PACHINKO) {
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_L, "Release Trigger");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_R, "Press Trigger");
|
||||
} else if(device == DEVICE_VBGAMEPAD) {
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_B, "Virtual Boy D-Pad 2 Down");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_Y, "Virtual Boy D-Pad 2 Left");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_SELECT, "Virtual Boy Select");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_START, "Virtual Boy Start");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_UP, "Virtual Boy D-Pad 1 Up");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_DOWN, "Virtual Boy D-Pad 1 Down");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_LEFT, "Virtual Boy D-Pad 1 Left");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_RIGHT, "Virtual Boy D-Pad 1 Right");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_A, "Virtual Boy D-Pad 2 Right");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_X, "Virtual Boy D-Pad 2 Up");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_L, "Virtual Boy L");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_R, "Virtual Boy R");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_L2, "Virtual Boy B");
|
||||
addDesc(port, RETRO_DEVICE_ID_JOYPAD_R2, "Virtual Boy A");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -899,6 +918,7 @@ extern "C" {
|
|||
case DEVICE_ARKANOID: type = ControllerType::ArkanoidController; break;
|
||||
case DEVICE_SNESGAMEPAD: type = ControllerType::SnesController; break;
|
||||
case DEVICE_SNESMOUSE: type = ControllerType::SnesMouse; break;
|
||||
case DEVICE_VBGAMEPAD: type = ControllerType::VbController; break;
|
||||
}
|
||||
_console->GetSettings()->SetControllerType(port, type);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue