Fix input display that I broke yesterday. Hook up SNES input display and movie recording (but not playback)
This commit is contained in:
parent
fd5494a316
commit
f1de424aa3
|
@ -423,7 +423,7 @@ namespace BizHawk.MultiClient
|
||||||
public string MakeInputDisplay()
|
public string MakeInputDisplay()
|
||||||
{
|
{
|
||||||
StringBuilder s;
|
StringBuilder s;
|
||||||
if (Global.MovieSession.Movie.IsPlaying)
|
if (!Global.MovieSession.Movie.IsActive || Global.MovieSession.Movie.IsFinished)
|
||||||
{
|
{
|
||||||
s = new StringBuilder(Global.GetOutputControllersAsMnemonic());
|
s = new StringBuilder(Global.GetOutputControllersAsMnemonic());
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,10 +168,6 @@ namespace BizHawk.MultiClient
|
||||||
bool IsBasePressed(string name)
|
bool IsBasePressed(string name)
|
||||||
{
|
{
|
||||||
bool ret = Source.IsPressed(name);
|
bool ret = Source.IsPressed(name);
|
||||||
if (ret)
|
|
||||||
{
|
|
||||||
//int zzz=9;
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +184,8 @@ namespace BizHawk.MultiClient
|
||||||
return "|..................................................|.|";
|
return "|..................................................|.|";
|
||||||
case "NES":
|
case "NES":
|
||||||
return "|.|........|........|........|........|";
|
return "|.|........|........|........|........|";
|
||||||
|
case "SNES":
|
||||||
|
return "|.|............|............|............|............|";
|
||||||
case "SMS":
|
case "SMS":
|
||||||
case "GG":
|
case "GG":
|
||||||
case "SG":
|
case "SG":
|
||||||
|
@ -203,10 +201,35 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//adelikat: I"m going to do all controllers like this, so what if it is redundant! It is better than reducing lines of code with convoluted logic that is difficult to expand to support new platforms
|
||||||
|
private string GetSNESControllersAsMnemonic()
|
||||||
|
{
|
||||||
|
StringBuilder input = new StringBuilder("|");
|
||||||
|
input.Append(IsBasePressed("Reset") ? Global.COMMANDS[ControlType]["Reset"] : ".");
|
||||||
|
input.Append("|");
|
||||||
|
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
||||||
|
{
|
||||||
|
foreach (string button in Global.BUTTONS[ControlType].Keys)
|
||||||
|
{
|
||||||
|
input.Append(IsBasePressed("P" + button) ? Global.BUTTONS[ControlType][button] : ".");
|
||||||
|
}
|
||||||
|
input.Append("|");
|
||||||
|
}
|
||||||
|
|
||||||
|
return input.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public string GetControllersAsMnemonic()
|
public string GetControllersAsMnemonic()
|
||||||
{
|
{
|
||||||
if (Global.Emulator.SystemId == "NULL" || ControlType == "Null Controller")
|
if (Global.Emulator.SystemId == "NULL" || ControlType == "Null Controller")
|
||||||
|
{
|
||||||
return "|.|";
|
return "|.|";
|
||||||
|
}
|
||||||
|
else if (Global.Emulator.SystemId == "SNES")
|
||||||
|
{
|
||||||
|
GetSNESControllersAsMnemonic();
|
||||||
|
}
|
||||||
|
|
||||||
StringBuilder input = new StringBuilder("|");
|
StringBuilder input = new StringBuilder("|");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue