mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-12 06:35:46 -04:00
AnalogController: Use proper upper bound when validating axis_code
This commit is contained in:
@ -67,7 +67,7 @@ std::optional<s32> AnalogController::GetButtonCodeByName(std::string_view button
|
||||
|
||||
void AnalogController::SetAxisState(s32 axis_code, float value)
|
||||
{
|
||||
if (axis_code < 0 || axis_code >= static_cast<s32>(Button::Count))
|
||||
if (axis_code < 0 || axis_code >= static_cast<s32>(Axis::Count))
|
||||
return;
|
||||
|
||||
// -1..1 -> 0..255
|
||||
|
Reference in New Issue
Block a user