Fixed bug 4672 - Warnings in SDL_LogEvent()
authorSam Lantinga <slouken@libsdl.org>
Wed, 19 Jun 2019 17:11:20 -0700
changeset 1289725998acc4810
parent 12896 b91647e1a977
child 12898 89b3e1e9839c
Fixed bug 4672 - Warnings in SDL_LogEvent()
src/events/SDL_events.c
     1.1 --- a/src/events/SDL_events.c	Wed Jun 19 15:54:21 2019 -0700
     1.2 +++ b/src/events/SDL_events.c	Wed Jun 19 17:11:20 2019 -0700
     1.3 @@ -278,9 +278,9 @@
     1.4          #undef PRINT_CONTROLLERDEV_EVENT
     1.5  
     1.6          #define PRINT_FINGER_EVENT(event) \
     1.7 -            SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%lld fingerid=%lld x=%f y=%f dx=%f dy=%f pressure=%f)", \
     1.8 -                (uint) event->tfinger.timestamp, (long long) event->tfinger.touchId, \
     1.9 -                (long long) event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
    1.10 +            SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" fingerid=%"SDL_PRIs64" x=%f y=%f dx=%f dy=%f pressure=%f)", \
    1.11 +                (uint) event->tfinger.timestamp, event->tfinger.touchId, \
    1.12 +                event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \
    1.13                  event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure)
    1.14          SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break;
    1.15          SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break;
    1.16 @@ -288,17 +288,17 @@
    1.17          #undef PRINT_FINGER_EVENT
    1.18  
    1.19          #define PRINT_DOLLAR_EVENT(event) \
    1.20 -            SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%lld gestureid=%lld numfingers=%u error=%f x=%f y=%f)", \
    1.21 -                (uint) event->dgesture.timestamp, (long long) event->dgesture.touchId, \
    1.22 -                (long long) event->dgesture.gestureId, (uint) event->dgesture.numFingers, \
    1.23 +            SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" gestureid=%"SDL_PRIs64" numfingers=%u error=%f x=%f y=%f)", \
    1.24 +                (uint) event->dgesture.timestamp, event->dgesture.touchId, \
    1.25 +                event->dgesture.gestureId, (uint) event->dgesture.numFingers, \
    1.26                  event->dgesture.error, event->dgesture.x, event->dgesture.y);
    1.27          SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break;
    1.28          SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break;
    1.29          #undef PRINT_DOLLAR_EVENT
    1.30  
    1.31          SDL_EVENT_CASE(SDL_MULTIGESTURE)
    1.32 -            SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%lld dtheta=%f ddist=%f x=%f y=%f numfingers=%u)",
    1.33 -                (uint) event->mgesture.timestamp, (long long) event->mgesture.touchId,
    1.34 +            SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" dtheta=%f ddist=%f x=%f y=%f numfingers=%u)",
    1.35 +                (uint) event->mgesture.timestamp, event->mgesture.touchId,
    1.36                  event->mgesture.dTheta, event->mgesture.dDist,
    1.37                  event->mgesture.x, event->mgesture.y, (uint) event->mgesture.numFingers);
    1.38              break;