mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-29 20:44:20 +01:00
Correct reverse smoothing buffer traversal
This commit is contained in:
parent
cdb17f43a7
commit
f96731ea8a
@ -139,7 +139,7 @@ namespace DS4Windows
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (int i = 0; i < SMOOTH_BUFFER_LEN; i++)
|
for (int i = 0; i < SMOOTH_BUFFER_LEN; i++)
|
||||||
{
|
{
|
||||||
idx = Math.Abs(smoothBufferTail - i - 1) % SMOOTH_BUFFER_LEN;
|
idx = (smoothBufferTail - i - 1 + SMOOTH_BUFFER_LEN) % SMOOTH_BUFFER_LEN;
|
||||||
x_out += xSmoothBuffer[idx] * currentWeight;
|
x_out += xSmoothBuffer[idx] * currentWeight;
|
||||||
y_out += ySmoothBuffer[idx] * currentWeight;
|
y_out += ySmoothBuffer[idx] * currentWeight;
|
||||||
finalWeight += currentWeight;
|
finalWeight += currentWeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user