mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 15:40:42 +00:00
Fix gamepad zoom value calculation
This commit is contained in:
parent
b700c98e8f
commit
5ae91465ee
@ -1097,13 +1097,13 @@ namespace MWInput
|
|||||||
{
|
{
|
||||||
if(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT)
|
if(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT)
|
||||||
{
|
{
|
||||||
mGamepadZoom = static_cast<float>(arg.value / 10000 * 8.5f);
|
mGamepadZoom = arg.value * 0.85f / 1000.f;
|
||||||
return; // Do not propogate event.
|
return; // Do not propagate event.
|
||||||
}
|
}
|
||||||
else if(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT)
|
else if(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT)
|
||||||
{
|
{
|
||||||
mGamepadZoom = static_cast<float>(-(arg.value / 10000 * 8.5f));
|
mGamepadZoom = -arg.value * 0.85f / 1000.f;
|
||||||
return; // Do not propogate event.
|
return; // Do not propagate event.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user