New RightStick querying code

This commit is contained in:
Soniccd123
2024-12-18 19:09:24 -03:00
committed by Stefanos Kornilios Mitsis Poiitidis
parent 970ac8c691
commit 8e6a952da3

View File

@@ -1435,7 +1435,7 @@ void CPad::Update(int16 pad)
#ifdef RW_DC #ifdef RW_DC
//CPad::IsDualAnalog = cont_has_capabilities(contMaple, CONT_CAPABILITIES_DUAL_ANALOG); //Query controller about Dual analog capabilities CPad::IsDualAnalog = cont_has_capabilities(contMaple, CONT_CAPABILITIES_DUAL_ANALOG); //Query controller about Dual analog capabilities
if (pad == 0) if (pad == 0)
{ {
NewState.DPadUp = state->dpad_up; //This part could be inside a compiler directive to preserve the old code and just use this block if compil NewState.DPadUp = state->dpad_up; //This part could be inside a compiler directive to preserve the old code and just use this block if compil
@@ -1477,6 +1477,8 @@ void CPad::Update(int16 pad)
NewState.LeftTrigger = 0; NewState.LeftTrigger = 0;
NewState.LeftStickX = 0; NewState.LeftStickX = 0;
NewState.LeftStickY = 0; NewState.LeftStickY = 0;
NewState.RightStickX = 0;
NewState.RightStickY = 0;
NewState.RightShock = 0; NewState.RightShock = 0;
} }
@@ -1498,7 +1500,7 @@ void CPad::Update(int16 pad)
bHornHistory[iCurrHornHistory] = GetHorn(); bHornHistory[iCurrHornHistory] = GetHorn();
#ifdef RW_DC #ifdef RW_DC
if (((NewState.RightStickX > 64) || (NewState.RightStickX < -64)) || ((NewState.RightStickY > 64) || (NewState.RightStickY < -64))) if (((NewState.RightStickY > 64 && OldState.RightStickY)) || ((NewState.RightStickY) < -64 && (OldState.RightStickY < -64)))
{ {
CPad::GetPad(0)->IsDualAnalog = true; CPad::GetPad(0)->IsDualAnalog = true;
} }