Bug #2443 ยป 0069-sdl3-Use-fabsf-instead-of-abs-where-needed.patch
| client/gui-sdl3/gui_main.c | ||
|---|---|---|
|
if (event->type == SDL_EVENT_MOUSE_MOTION) {
|
||
|
static int x = 0, y = 0;
|
||
|
if (((MOVE_STEP_X > 0) && (abs(event->motion.x - x) >= MOVE_STEP_X))
|
||
|
|| ((MOVE_STEP_Y > 0) && (abs(event->motion.y - y) >= MOVE_STEP_Y)) ) {
|
||
|
if (((MOVE_STEP_X > 0)
|
||
|
&& (fabsf(event->motion.x - x) >= MOVE_STEP_X))
|
||
|
|| ((MOVE_STEP_Y > 0)
|
||
|
&& (fabsf(event->motion.y - y) >= MOVE_STEP_Y)) ) {
|
||
|
x = event->motion.x;
|
||
|
y = event->motion.y;
|
||
|
return TRUE; /* Catch it */
|
||
| client/gui-sdl3/repodlgs.c | ||
|---|---|---|
|
motion_event->x -= motion->horiz_src->dst->dest_rect.x;
|
||
|
if ((abs(motion_event->x - motion->x) > 7)
|
||
|
if ((fabsf(motion_event->x - motion->x) > 7)
|
||
|
&& (motion_event->x >= motion->min)
|
||
|
&& (motion_event->x <= motion->max)) {
|
||