1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 10:53:51 +00:00

Fix gamepad zoom value calculation

This commit is contained in:
Alexei Dobrohotov 2019-11-02 19:47:05 +03:00 committed by GitHub
parent b700c98e8f
commit 5ae91465ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1097,13 +1097,13 @@ namespace MWInput
{
if(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT)
{
mGamepadZoom = static_cast<float>(arg.value / 10000 * 8.5f);
return; // Do not propogate event.
mGamepadZoom = arg.value * 0.85f / 1000.f;
return; // Do not propagate event.
}
else if(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT)
{
mGamepadZoom = static_cast<float>(-(arg.value / 10000 * 8.5f));
return; // Do not propogate event.
mGamepadZoom = -arg.value * 0.85f / 1000.f;
return; // Do not propagate event.
}
}
}