fix rough mouse movement due to incorrect check (#2911)

Co-authored-by: rnglol <kek@example.com>
This commit is contained in:
ringolol 2025-05-12 22:39:50 +03:00 committed by GitHub
parent f94c7e52b7
commit b3abb83fc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,7 +60,7 @@ Uint32 MousePolling(void* param, Uint32 id, Uint32 interval) {
float angle = atan2(d_y, d_x);
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_y, GetAxis(-0x80, 0x7f, a_y));
} else {