fix up problems caused by SVN snafu r3553
This commit is contained in:
parent
a2c0d1b57b
commit
853b36482a
|
@ -1174,6 +1174,7 @@ namespace BizHawk.MultiClient
|
||||||
break;
|
break;
|
||||||
case "NES":
|
case "NES":
|
||||||
NESToolStripMenuItem.Visible = true;
|
NESToolStripMenuItem.Visible = true;
|
||||||
|
NESFDSMenuControls();
|
||||||
break;
|
break;
|
||||||
case "PCE":
|
case "PCE":
|
||||||
case "PCECD":
|
case "PCECD":
|
||||||
|
@ -1212,6 +1213,42 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NESFDSMenuAdd(string name, string button, string msg)
|
||||||
|
{
|
||||||
|
fDSToolStripMenuItem.Visible = true;
|
||||||
|
fDSToolStripMenuItem.DropDownItems.Add(name, null, delegate(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Global.Emulator.ControllerDefinition.BoolButtons.Contains(button))
|
||||||
|
{
|
||||||
|
if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished)
|
||||||
|
{
|
||||||
|
Global.ClickyVirtualPadController.Click(button);
|
||||||
|
Global.OSD.AddMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NESFDSMenuControls()
|
||||||
|
{
|
||||||
|
|
||||||
|
// ugly and hacky
|
||||||
|
fDSToolStripMenuItem.Visible = false;
|
||||||
|
fDSToolStripMenuItem.DropDownItems.Clear();
|
||||||
|
var ss = Global.Emulator.ControllerDefinition.BoolButtons;
|
||||||
|
|
||||||
|
if (ss.Contains("FDS Eject"))
|
||||||
|
NESFDSMenuAdd("Eject Disk", "FDS Eject", "FDS Disk Ejected.");
|
||||||
|
for (int i = 0; i < 16; i++)
|
||||||
|
{
|
||||||
|
string s = "FDS Insert " + i;
|
||||||
|
if (ss.Contains(s))
|
||||||
|
NESFDSMenuAdd("Insert Disk " + i, s, "FDS Disk " + i + " inserted.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SyncControls()
|
void SyncControls()
|
||||||
{
|
{
|
||||||
if (Global.Game == null) return;
|
if (Global.Game == null) return;
|
||||||
|
@ -1267,7 +1304,9 @@ namespace BizHawk.MultiClient
|
||||||
Global.ActiveController = Global.NullControls;
|
Global.ActiveController = Global.NullControls;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// allow propogating controls that are in the current controller definition but not in the prebaked one
|
||||||
|
Global.ActiveController.ForceType(new ControllerDefinition(Global.Emulator.ControllerDefinition));
|
||||||
|
Global.ClickyVirtualPadController.Type = new ControllerDefinition(Global.Emulator.ControllerDefinition);
|
||||||
RewireInputChain();
|
RewireInputChain();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue