PSX - change controller definition name dynamically, use it in Controller Config to set a gamepad or dualshock image. The logic here is dubious when you consider multiple players and mixed controllers but that doesn't sound like a real situation anyway.

This commit is contained in:
adelikat 2015-02-05 22:08:23 +00:00
parent 95cdaac0b0
commit 0eec6530f6
5 changed files with 17 additions and 1 deletions

View File

@ -1840,6 +1840,7 @@
<None Include="config\ControllerImages\Lynx.png" />
<Content Include="config\ControllerImages\N64.png" />
<None Include="config\ControllerImages\psx_dualshock.png" />
<None Include="config\ControllerImages\PSX-Original-Controller.png" />
<Content Include="config\ControllerImages\SaturnController.jpg" />
<None Include="images\addWatch.ico" />
<None Include="images\gba-icon.png" />

View File

@ -1029,6 +1029,16 @@ namespace BizHawk.Client.EmuHawk.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PSX_Original_Controller {
get {
object obj = ResourceManager.GetObject("PSX_Original_Controller", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -1485,4 +1485,7 @@
<data name="Triangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Triangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PSX_Original_Controller" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\config\ControllerImages\PSX-Original-Controller.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -42,7 +42,9 @@ namespace BizHawk.Client.EmuHawk
ControllerImages.Add("WonderSwan Controller", Properties.Resources.WonderSwanColor);
ControllerImages.Add("Lynx Controller", Properties.Resources.Lynx);
ControllerImages.Add("DualShock Controller", Properties.Resources.psx_dualshock);
ControllerImages.Add("PSX Gamepad Controller", Properties.Resources.PSX_Original_Controller);
ControllerImages.Add("PSX DualShock Controller", Properties.Resources.psx_dualshock);
}
protected override void OnActivated(EventArgs e)

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB