Fixed bug 2475 - Incorrect SDL_Log() format specifiers in test/testgesture.c
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Apr 2014 22:40:57 -0700
changeset 871767b9285b0000
parent 8715 1c4a634f364e
child 8718 61ae7b328789
Fixed bug 2475 - Incorrect SDL_Log() format specifiers in test/testgesture.c

rettichschnidi

The floats should not be interpreted as integers. Patch against the current head attached.
test/testgesture.c
     1.1 --- a/test/testgesture.c	Thu Apr 17 22:23:32 2014 -0700
     1.2 +++ b/test/testgesture.c	Thu Apr 17 22:40:57 2014 -0700
     1.3 @@ -266,19 +266,19 @@
     1.4          break;
     1.5        case SDL_FINGERMOTION:
     1.6  #if VERBOSE
     1.7 -        SDL_Log("Finger: %i,x: %i, y: %i",event.tfinger.fingerId,
     1.8 +        SDL_Log("Finger: %"PRIs64",x: %f, y: %f",event.tfinger.fingerId,
     1.9                 event.tfinger.x,event.tfinger.y);
    1.10  #endif
    1.11          break;
    1.12        case SDL_FINGERDOWN:
    1.13  #if VERBOSE
    1.14 -        SDL_Log("Finger: %"PRIs64" down - x: %i, y: %i",
    1.15 +        SDL_Log("Finger: %"PRIs64" down - x: %f, y: %f",
    1.16             event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
    1.17  #endif
    1.18          break;
    1.19        case SDL_FINGERUP:
    1.20  #if VERBOSE
    1.21 -        SDL_Log("Finger: %"PRIs64" up - x: %i, y: %i",
    1.22 +        SDL_Log("Finger: %"PRIs64" up - x: %f, y: %f",
    1.23                 event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
    1.24  #endif
    1.25          break;