GBHawk: make controller setting only effect MBC7 games
This commit is contained in:
parent
7d2e18004f
commit
6501c48b13
|
@ -72,23 +72,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
|
||||
public enum ControllerType
|
||||
{
|
||||
Default,
|
||||
Tilt
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
private ControllerType _GBController;
|
||||
|
||||
[DisplayName("Controller")]
|
||||
[Description("Select Controller Type")]
|
||||
[DefaultValue(ControllerType.Default)]
|
||||
[DisplayName("Tilt Controls")]
|
||||
[Description("Choose Tilt Control mode, when Applicable (MBC7 games)")]
|
||||
[DefaultValue(ControllerType.Tilt)]
|
||||
public ControllerType GBController
|
||||
{
|
||||
get => _GBController;
|
||||
set
|
||||
{
|
||||
if (value == ControllerType.Default) { Port1 = GBHawkControllerDeck.DefaultControllerName; }
|
||||
else { Port1 = "Gameboy Controller + Tilt"; }
|
||||
if (value == ControllerType.Tilt) { Port1 = "Gameboy Controller + Tilt"; }
|
||||
|
||||
_GBController = value;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
|
||||
_settings = (GBSettings)settings ?? new GBSettings();
|
||||
_syncSettings = (GBSyncSettings)syncSettings ?? new GBSyncSettings();
|
||||
_controllerDeck = new GBHawkControllerDeck(_syncSettings.Port1);
|
||||
|
||||
byte[] Bios = null;
|
||||
|
||||
|
@ -182,9 +181,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
Console.WriteLine("MD5: " + rom.HashMD5(0, rom.Length));
|
||||
Console.WriteLine("SHA1: " + rom.HashSHA1(0, rom.Length));
|
||||
_rom = rom;
|
||||
Setup_Mapper();
|
||||
string mppr = Setup_Mapper();
|
||||
if (cart_RAM != null) { cart_RAM_vbls = new byte[cart_RAM.Length]; }
|
||||
|
||||
if (mppr == "MBC7")
|
||||
{
|
||||
_controllerDeck = new GBHawkControllerDeck(_syncSettings.Port1);
|
||||
}
|
||||
else
|
||||
{
|
||||
_controllerDeck = new GBHawkControllerDeck(GBHawkControllerDeck.DefaultControllerName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
timer.Core = this;
|
||||
audio.Core = this;
|
||||
ppu.Core = this;
|
||||
|
@ -323,7 +333,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void Setup_Mapper()
|
||||
public string Setup_Mapper()
|
||||
{
|
||||
// setup up mapper based on header entry
|
||||
string mppr;
|
||||
|
@ -548,6 +558,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
// currently no date / time input for TAMA5
|
||||
|
||||
}
|
||||
|
||||
return mppr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue