fix: use MAX_JOYPADS def

This commit is contained in:
Patoke committed 2026-02-27 01:48:41 -03:00
1 parent c3d8726749
commit 62dd277a3e
2 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -549,7 +549,7 @@ bool CInput::UpdateJoypads()
{ {
assert(m_bJoypadMapArrayIsSetup); assert(m_bJoypadMapArrayIsSetup);
for (int i = 0; i < 4; i++) for (int i = 0; i < MAX_JOYPADS; i++)
{ {
JOYPAD* pThisPad = &m_Joypads[i]; JOYPAD* pThisPad = &m_Joypads[i];
@@ -563,7 +563,7 @@ bool CInput::UpdateJoypads()
pThisPad->m_ucRightTriggerState = 0; pThisPad->m_ucRightTriggerState = 0;
} }
for (int i = 0; i < 4; i++) for (int i = 0; i < MAX_JOYPADS; i++)
{ {
if (!m_Joypads[i].m_bIsDisabled) if (!m_Joypads[i].m_bIsDisabled)
{ {
@@ -685,7 +685,7 @@ void CInput::InitTime(void)
QueryPerformanceFrequency(&qwTicksPerSec); QueryPerformanceFrequency(&qwTicksPerSec);
m_fTickToSeconds = 1.0 / (float)(int)qwTicksPerSec.LowPart; m_fTickToSeconds = 1.0 / (float)(int)qwTicksPerSec.LowPart;
for (int i = 0; i < 4; i++) for (int i = 0; i < MAX_JOYPADS; i++)
{ {
m_LastActivityTime[i].QuadPart = 0; m_LastActivityTime[i].QuadPart = 0;
} }
+3 -3
View File
@@ -121,7 +121,7 @@ public:
BYTE gap0[16]; BYTE gap0[16];
JOYPAD m_Joypads[4]; JOYPAD m_Joypads[MAX_JOYPADS];
int m_iDeadzone; int m_iDeadzone;
int m_iMovementRangeMax; int m_iMovementRangeMax;
@@ -150,8 +150,8 @@ public:
float m_fRepeatDelaySecs; float m_fRepeatDelaySecs;
float m_fRepeatRateSecs; float m_fRepeatRateSecs;
TimeInfo m_Timers[4][24]; TimeInfo m_Timers[MAX_JOYPADS][24];
LARGE_INTEGER m_LastActivityTime[4]; LARGE_INTEGER m_LastActivityTime[MAX_JOYPADS];
char* m_sDebugSequenceName; char* m_sDebugSequenceName;
unsigned int m_uiDebugSequenceIndex; unsigned int m_uiDebugSequenceIndex;