mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 12:34:37 +00:00
fix rough mouse movement due to incorrect check
This commit is contained in:
parent
c0562a6b1b
commit
5567ed6623
@ -60,7 +60,7 @@ Uint32 MousePolling(void* param, Uint32 id, Uint32 interval) {
|
|||||||
float angle = atan2(d_y, d_x);
|
float angle = atan2(d_y, d_x);
|
||||||
float a_x = cos(angle) * output_speed, a_y = sin(angle) * output_speed;
|
float a_x = cos(angle) * output_speed, a_y = sin(angle) * output_speed;
|
||||||
|
|
||||||
if (d_x != 0 && d_y != 0) {
|
if (d_x != 0 || d_y != 0) {
|
||||||
controller->Axis(0, axis_x, GetAxis(-0x80, 0x7f, a_x));
|
controller->Axis(0, axis_x, GetAxis(-0x80, 0x7f, a_x));
|
||||||
controller->Axis(0, axis_y, GetAxis(-0x80, 0x7f, a_y));
|
controller->Axis(0, axis_y, GetAxis(-0x80, 0x7f, a_y));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user