Rename IsAnyButtonPressed to CheckForInput

This commit is contained in:
Sergeanur 2020-06-30 07:43:55 +03:00
parent 6d396ba73b
commit c80bdf3a2a
2 changed files with 5 additions and 6 deletions

View File

@ -344,15 +344,14 @@ void AltDodoCheat(void)
#endif #endif
bool bool
CControllerState::IsAnyButtonPressed(void) CControllerState::CheckForInput(void)
{ {
return !!RightStickX || !!RightStickY || !!LeftStickX || !!LeftStickY return !!RightStickX || !!RightStickY || !!LeftStickX || !!LeftStickY
|| !!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight || !!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight
|| !!Triangle || !!Cross || !!Circle || !!Square || !!Triangle || !!Cross || !!Circle || !!Square
|| !!Start || !!Select || !!Start || !!Select
|| !!LeftShoulder1 || !!LeftShoulder2 || !!RightShoulder1 || !!RightShoulder2 || !!LeftShoulder1 || !!LeftShoulder2 || !!RightShoulder1 || !!RightShoulder2
|| !!LeftShock || !!RightShock || !!LeftShock || !!RightShock;
|| !!NetworkTalk;
} }
void void
@ -1074,7 +1073,7 @@ void CPad::UpdatePads(void)
CapturePad(0); CapturePad(0);
#endif #endif
#ifdef DETECT_PAD_INPUT_SWITCH #ifdef DETECT_PAD_INPUT_SWITCH
if (GetPad(0)->PCTempJoyState.IsAnyButtonPressed()) if (GetPad(0)->PCTempJoyState.CheckForInput())
IsAffectedByController = true; IsAffectedByController = true;
else { else {
#endif #endif
@ -1084,7 +1083,7 @@ void CPad::UpdatePads(void)
#ifdef DETECT_PAD_INPUT_SWITCH #ifdef DETECT_PAD_INPUT_SWITCH
} }
if (IsAffectedByController && (GetPad(0)->PCTempKeyState.IsAnyButtonPressed() || GetPad(0)->PCTempMouseState.IsAnyButtonPressed())) if (IsAffectedByController && (GetPad(0)->PCTempKeyState.CheckForInput() || GetPad(0)->PCTempMouseState.CheckForInput()))
IsAffectedByController = false; IsAffectedByController = false;
#endif #endif

View File

@ -29,7 +29,7 @@ public:
float GetRightStickX(void) { return RightStickX/32767.0f; }; float GetRightStickX(void) { return RightStickX/32767.0f; };
float GetRightStickY(void) { return RightStickY/32767.0f; }; float GetRightStickY(void) { return RightStickY/32767.0f; };
bool IsAnyButtonPressed(); bool CheckForInput();
void Clear(void); void Clear(void);
}; };
VALIDATE_SIZE(CControllerState, 0x2A); VALIDATE_SIZE(CControllerState, 0x2A);