Fix GamepadAxis

really not sure how could this have gone unnoticed XD
This commit is contained in:
Nejcraft
2021-11-05 00:45:28 +01:00
committed by GitHub
parent e90f06748c
commit e3505a40db

View File

@@ -508,11 +508,14 @@ float Input::GetGamepadAxis(InputGamepadIndex gamepad, GamepadAxis axis)
{
if (gamepad == InputGamepadIndex::All)
{
float val = 0;
for (auto g : Gamepads)
{
if (g->GetAxis(axis))
return true;
val += g->GetAxis(axis);
if(val >= 1)
return 1;
}
return val;
}
else
{