Apple II - hackery to make prev/next disk buttons stay held, as opposed to swaping rapidly ever frame

This commit is contained in:
adelikat 2015-06-08 20:56:29 +00:00
parent 274c29ff37
commit fe776eab2b
1 changed files with 17 additions and 2 deletions

View File

@ -124,17 +124,32 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
public bool DriveLightEnabled { get { return true; } }
public bool DriveLightOn { get { return _machine.DriveLight; } }
private bool _nextPressed = false;
private bool _prevPressed = false;
private void FrameAdv(bool render, bool rendersound)
{
if (Controller["Next Disk"])
if (Controller["Next Disk"] && !_nextPressed)
{
_nextPressed = true;
IncrementDisk();
}
else if (Controller["Previous Disk"])
else if (Controller["Previous Disk"] && !_prevPressed)
{
_prevPressed = true;
DecrementDisk();
}
if (!Controller["Next Disk"])
{
_nextPressed = false;
}
if (!Controller["Previous Disk"])
{
_prevPressed = false;
}
_machine.BizFrameAdvance(RealButtons.Where(b => Controller[b]));
if (IsLagFrame)
{