Fix for when joystick not connected (fixes #778)
This commit is contained in:
parent
f201294451
commit
358573a9db
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
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);
|
return MemReadFloatingBus(nPdlCntrActive, nExecutedCycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue