ZXHawk: fix lag detection on kemston joystick. Fixes #1993

This commit is contained in:
alyosha-tas 2020-05-27 12:26:08 -04:00
parent 7b340f8766
commit 59baedbc64
4 changed files with 21 additions and 9 deletions

View File

@ -47,10 +47,13 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (lowByte == 0x1f)
{
if (LocateUniqueJoystick(JoystickType.Kempston) != null)
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
{
InputRead = true;
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
}
InputRead = true;
}
InputRead = true;
}
else
{
if (KeyboardDevice.ReadPort(port, ref result))

View File

@ -28,10 +28,13 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (lowByte == 0x1f)
{
if (LocateUniqueJoystick(JoystickType.Kempston) != null)
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
{
InputRead = true;
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
}
InputRead = true;
}
InputRead = true;
}
else
{
if (KeyboardDevice.ReadPort(port, ref result))

View File

@ -28,9 +28,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (lowByte == 0x1f)
{
if (LocateUniqueJoystick(JoystickType.Kempston) != null)
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
{
InputRead = true;
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
}
InputRead = true;
InputRead = true;
}
else if (UPDDiskDevice.ReadPort(port, ref result))
{

View File

@ -23,7 +23,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (lowByte == 0x1f)
{
if (LocateUniqueJoystick(JoystickType.Kempston) != null)
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
{
InputRead = true;
return (byte)((KempstonJoystick)LocateUniqueJoystick(JoystickType.Kempston) as KempstonJoystick).JoyLine;
}
// not a lag frame
InputRead = true;