[x11] Clear up some signed/unsigned ambiguity

I don't remember what gcc does with unsigned-int, but obviously clang
produces another unsigned, which is most definitely not wanted.
This commit is contained in:
Bill Currie 2022-03-31 00:34:40 +09:00
parent 68b133417b
commit b02e29ea89

View file

@ -801,8 +801,10 @@ event_motion (XEvent *event)
} else {
if (vid_fullscreen->int_val || input_grabbed) {
if (!event->xmotion.send_event) {
unsigned dist_x = abs (viddef.width / 2 - event->xmotion.x);
unsigned dist_y = abs (viddef.height / 2 - event->xmotion.y);
int center_x = viddef.width / 2;
int center_y = viddef.height / 2;
unsigned dist_x = abs (center_x / 2 - event->xmotion.x);
unsigned dist_y = abs (center_y / 2 - event->xmotion.y);
x11_mouse_axes[0].value = event->xmotion.x - x11_mouse.x;
x11_mouse_axes[1].value = event->xmotion.y - x11_mouse.y;