SNES - hook up movie playback, probably, needs a frame counter to use it
This commit is contained in:
parent
f1de424aa3
commit
ead2d186cf
|
@ -121,7 +121,7 @@ namespace BizHawk.MultiClient
|
|||
{"Gameboy Controller", new Dictionary<string, string>() {}},
|
||||
{"Genesis 3-Button Controller", new Dictionary<string, string>() {}},
|
||||
{"NES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
||||
{"SNES Controller", new Dictionary<string, string>() {{"Lag", "l"}, {"Reset", "r"}}},
|
||||
{"SNES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
||||
{"PC Engine Controller", new Dictionary<string, string>() {}},
|
||||
{"SMS Controller", new Dictionary<string, string>() {{"Pause", "p"}, {"Reset", "r"}}},
|
||||
{"TI83 Controller", new Dictionary<string, string>() {}}
|
||||
|
|
|
@ -431,13 +431,49 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
//Redundancy beats crazy if logic that makes new consoles annoying to add
|
||||
private void SetSNESControllersAsMnemonic(string mnemonic)
|
||||
{
|
||||
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
||||
MyBoolButtons.Clear();
|
||||
|
||||
if (mnemonic.Length < 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Force("Reset", mnemonic[1] != '.' && mnemonic[1] != '0' && mnemonic[1] != 'l');
|
||||
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
||||
{
|
||||
int srcindex = (player - 1) * (Global.BUTTONS[ControlType].Count + 1);
|
||||
|
||||
if (mnemonic.Length < srcindex + 3 + Global.BUTTONS[ControlType].Count - 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int start = 3;
|
||||
foreach (string button in Global.BUTTONS[ControlType].Keys)
|
||||
{
|
||||
Force("P" + player + " " + button, c[srcindex + start++]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// latches all buttons from the supplied mnemonic string
|
||||
/// </summary>
|
||||
public void SetControllersAsMnemonic(string mnemonic)
|
||||
{
|
||||
if (Global.Emulator.SystemId == "NULL" || ControlType == "Null Controller")
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (Global.Emulator.SystemId == "SNES")
|
||||
{
|
||||
SetSNESControllersAsMnemonic(mnemonic);
|
||||
}
|
||||
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
||||
|
||||
MyBoolButtons.Clear();
|
||||
|
|
Loading…
Reference in New Issue