Fix for when joystick not connected (fixes #778)

This commit is contained in:
tomcw 2020-04-26 16:19:50 +01:00
parent f201294451
commit 358573a9db
1 changed files with 4 additions and 0 deletions

View File

@ -650,6 +650,10 @@ BYTE __stdcall JoyReadPosition(WORD programcounter, WORD address, BYTE, BYTE, UL
BOOL nPdlCntrActive = g_nCumulativeCycles <= (g_nJoyCntrResetCycle + (unsigned __int64) ((double)nPdlPos * PDL_CNTR_INTERVAL));
// If no joystick connected, then this is always active (GH#778)
if (joyinfo[joytype[nJoyNum]] == DEVICE_NONE)
nPdlCntrActive = TRUE;
return MemReadFloatingBus(nPdlCntrActive, nExecutedCycles);
}