mirror of https://github.com/encounter/SDL.git
Don't redefine standard macros, use SDL specific macros instead to avoid compiler warnings
This commit is contained in:
parent
67e55655a3
commit
3344db40ff
|
@ -168,18 +168,22 @@ typedef uint64_t Uint64;
|
|||
/* Make sure we have macros for printing 64 bit values.
|
||||
* <stdint.h> should define these but this is not true all platforms.
|
||||
* (for example win32) */
|
||||
#ifndef PRIs64
|
||||
#ifdef __WIN32__
|
||||
#define PRIs64 "I64"
|
||||
#ifndef SDL_PRIs64
|
||||
#ifdef PRIs64
|
||||
#define SDL_PRIs64 PRIs64
|
||||
#elif defined(__WIN32__)
|
||||
#define SDL_PRIs64 "I64"
|
||||
#else
|
||||
#define PRIs64 "lld"
|
||||
#define SDL_PRIs64 "lld"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef PRIu64
|
||||
#ifdef __WIN32__
|
||||
#define PRIu64 "I64u"
|
||||
#ifndef SDL_PRIu64
|
||||
#ifdef PRIu64
|
||||
#define SDL_PRIu64 PRIu64
|
||||
#elif defined(__WIN32__)
|
||||
#define SDL_PRIu64 "I64u"
|
||||
#else
|
||||
#define PRIu64 "llu"
|
||||
#define SDL_PRIu64 "llu"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -564,7 +564,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user
|
|||
execKey = SDLTest_GenerateExecKey((char *)runSeed, testSuite->name, testCase->name, iterationCounter);
|
||||
}
|
||||
|
||||
SDLTest_Log("Test Iteration %i: execKey %" PRIu64, iterationCounter, execKey);
|
||||
SDLTest_Log("Test Iteration %i: execKey %" SDL_PRIu64, iterationCounter, execKey);
|
||||
testResult = SDLTest_RunTest(testSuite, testCase, execKey);
|
||||
|
||||
if (testResult == TEST_RESULT_PASSED) {
|
||||
|
|
|
@ -244,19 +244,19 @@ int main(int argc, char* argv[])
|
|||
break;
|
||||
case SDL_FINGERMOTION:
|
||||
#if VERBOSE
|
||||
SDL_Log("Finger: %"PRIs64",x: %f, y: %f",event.tfinger.fingerId,
|
||||
SDL_Log("Finger: %"SDL_PRIs64",x: %f, y: %f",event.tfinger.fingerId,
|
||||
event.tfinger.x,event.tfinger.y);
|
||||
#endif
|
||||
break;
|
||||
case SDL_FINGERDOWN:
|
||||
#if VERBOSE
|
||||
SDL_Log("Finger: %"PRIs64" down - x: %f, y: %f",
|
||||
SDL_Log("Finger: %"SDL_PRIs64" down - x: %f, y: %f",
|
||||
event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
|
||||
#endif
|
||||
break;
|
||||
case SDL_FINGERUP:
|
||||
#if VERBOSE
|
||||
SDL_Log("Finger: %"PRIs64" up - x: %f, y: %f",
|
||||
SDL_Log("Finger: %"SDL_PRIs64" up - x: %f, y: %f",
|
||||
event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
|
||||
#endif
|
||||
break;
|
||||
|
@ -275,12 +275,12 @@ int main(int argc, char* argv[])
|
|||
knob.r += event.mgesture.dDist;
|
||||
break;
|
||||
case SDL_DOLLARGESTURE:
|
||||
SDL_Log("Gesture %"PRIs64" performed, error: %f",
|
||||
SDL_Log("Gesture %"SDL_PRIs64" performed, error: %f",
|
||||
event.dgesture.gestureId,
|
||||
event.dgesture.error);
|
||||
break;
|
||||
case SDL_DOLLARRECORD:
|
||||
SDL_Log("Recorded gesture: %"PRIs64"",event.dgesture.gestureId);
|
||||
SDL_Log("Recorded gesture: %"SDL_PRIs64"",event.dgesture.gestureId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue