mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
Fix gamepad zoom value calculation
This commit is contained in:
parent
b700c98e8f
commit
5ae91465ee
1 changed files with 4 additions and 4 deletions
|
@ -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…
Reference in a new issue