mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Added unchecked block around axis scaling
This commit is contained in:
parent
21350227c6
commit
a4002ade3a
@ -657,13 +657,16 @@ namespace DS4Windows
|
|||||||
|
|
||||||
private short AxisScale(Int32 Value, Boolean Flip)
|
private short AxisScale(Int32 Value, Boolean Flip)
|
||||||
{
|
{
|
||||||
Value -= 0x80;
|
unchecked
|
||||||
|
{
|
||||||
|
Value -= 0x80;
|
||||||
|
|
||||||
//float temp = (Value - (-128)) / (float)inputResolution;
|
//float temp = (Value - (-128)) / (float)inputResolution;
|
||||||
float temp = (Value - (-128)) * reciprocalInputResolution;
|
float temp = (Value - (-128)) * reciprocalInputResolution;
|
||||||
if (Flip) temp = (temp - 0.5f) * -1.0f + 0.5f;
|
if (Flip) temp = (temp - 0.5f) * -1.0f + 0.5f;
|
||||||
|
|
||||||
return (short) (temp* outputResolution + (-32768));
|
return (short)(temp * outputResolution + (-32768));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckProfileOptions(int ind, DS4Device device, bool startUp=false)
|
private void CheckProfileOptions(int ind, DS4Device device, bool startUp=false)
|
||||||
|
Loading…
Reference in New Issue
Block a user