From 91e2e19a943f594e1fddc252251862a76b41238c Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 3 Oct 2023 13:35:50 -0400 Subject: [PATCH] Fixes --- LEGO1/legoinputmanager.cpp | 8 ++++---- LEGO1/legoinputmanager.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LEGO1/legoinputmanager.cpp b/LEGO1/legoinputmanager.cpp index 1f2677d7..149af67b 100644 --- a/LEGO1/legoinputmanager.cpp +++ b/LEGO1/legoinputmanager.cpp @@ -26,8 +26,8 @@ LegoInputManager::LegoInputManager() m_unk0x195 = 0; m_joyid = (UINT) -1; m_joystickIndex = -1; - m_joystickIndex2 = 0; m_useJoystick = FALSE; + m_unk0x335 = 0; m_unk0x336 = 0; m_unk0x74 = 0x19; m_timeout = 1000; @@ -99,7 +99,7 @@ MxResult LegoInputManager::GetJoystickId() { JOYINFOEX joyinfoex; - if (m_joystickIndex2 != JOYSTICKID1) { + if (m_useJoystick != FALSE) { MxS32 joyid = m_joystickIndex; if (joyid >= 0) { joyinfoex.dwSize = 0x34; @@ -127,9 +127,9 @@ MxResult LegoInputManager::GetJoystickId() // OFFSET: LEGO1 0x1005c320 MxResult LegoInputManager::GetJoystickState(MxU32 *joystick_x, MxU32 *joystick_y, DWORD *buttons_state, MxU32 *pov_position) { - if (m_joystickIndex2 != JOYSTICKID1) { + if (m_useJoystick != FALSE) { if (m_joyid < 0 && GetJoystickId() == -1) { - m_joystickIndex2 = 0; + m_useJoystick = FALSE; return FAILURE; } diff --git a/LEGO1/legoinputmanager.h b/LEGO1/legoinputmanager.h index 79376314..a44aef32 100644 --- a/LEGO1/legoinputmanager.h +++ b/LEGO1/legoinputmanager.h @@ -66,8 +66,8 @@ class LegoInputManager : public MxPresenter MxS32 m_joyid; MxS32 m_joystickIndex; JOYCAPS m_joyCaps; - MxU8 m_joystickIndex2; MxBool m_useJoystick; + MxBool m_unk0x335; MxBool m_unk0x336; };