mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 11:05:42 -04:00
AnalogController: Use proper upper bound when validating axis_code
This commit is contained in:
parent
2e64f77d2b
commit
1f74d46d39
@ -67,7 +67,7 @@ std::optional<s32> AnalogController::GetButtonCodeByName(std::string_view button
|
|||||||
|
|
||||||
void AnalogController::SetAxisState(s32 axis_code, float value)
|
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;
|
return;
|
||||||
|
|
||||||
// -1..1 -> 0..255
|
// -1..1 -> 0..255
|
||||||
|
Loading…
x
Reference in New Issue
Block a user