Made it more clear that the values being compared are floats
authorSam Lantinga <slouken@libsdl.org>
Thu, 06 Dec 2018 09:09:05 -0800
changeset 12466b442834306a8
parent 12465 1f85fce42a31
child 12467 2d7891d05d8d
Made it more clear that the values being compared are floats
src/events/SDL_mouse.c
src/events/SDL_touch.c
     1.1 --- a/src/events/SDL_mouse.c	Thu Dec 06 10:39:33 2018 -0500
     1.2 +++ b/src/events/SDL_mouse.c	Thu Dec 06 09:09:05 2018 -0800
     1.3 @@ -545,7 +545,7 @@
     1.4          SDL_SetMouseFocus(window);
     1.5      }
     1.6  
     1.7 -    if (x == 0. && y == 0.) {
     1.8 +    if (x == 0.0f && y == 0.0f) {
     1.9          return 0;
    1.10      }
    1.11  
     2.1 --- a/src/events/SDL_touch.c	Thu Dec 06 10:39:33 2018 -0500
     2.2 +++ b/src/events/SDL_touch.c	Thu Dec 06 09:09:05 2018 -0800
     2.3 @@ -315,7 +315,7 @@
     2.4      prel = pressure - finger->pressure;
     2.5  
     2.6      /* Drop events that don't change state */
     2.7 -    if (xrel == 0. && yrel == 0. && prel == 0.) {
     2.8 +    if (xrel == 0.0f && yrel == 0.0f && prel == 0.0f) {
     2.9  #if 0
    2.10          printf("Touch event didn't change state - dropped!\n");
    2.11  #endif