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.
|
/* Make sure we have macros for printing 64 bit values.
|
||||||
* <stdint.h> should define these but this is not true all platforms.
|
* <stdint.h> should define these but this is not true all platforms.
|
||||||
* (for example win32) */
|
* (for example win32) */
|
||||||
#ifndef PRIs64
|
#ifndef SDL_PRIs64
|
||||||
#ifdef __WIN32__
|
#ifdef PRIs64
|
||||||
#define PRIs64 "I64"
|
#define SDL_PRIs64 PRIs64
|
||||||
|
#elif defined(__WIN32__)
|
||||||
|
#define SDL_PRIs64 "I64"
|
||||||
#else
|
#else
|
||||||
#define PRIs64 "lld"
|
#define SDL_PRIs64 "lld"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef PRIu64
|
#ifndef SDL_PRIu64
|
||||||
#ifdef __WIN32__
|
#ifdef PRIu64
|
||||||
#define PRIu64 "I64u"
|
#define SDL_PRIu64 PRIu64
|
||||||
|
#elif defined(__WIN32__)
|
||||||
|
#define SDL_PRIu64 "I64u"
|
||||||
#else
|
#else
|
||||||
#define PRIu64 "llu"
|
#define SDL_PRIu64 "llu"
|
||||||
#endif
|
#endif
|
||||||
#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);
|
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);
|
testResult = SDLTest_RunTest(testSuite, testCase, execKey);
|
||||||
|
|
||||||
if (testResult == TEST_RESULT_PASSED) {
|
if (testResult == TEST_RESULT_PASSED) {
|
||||||
|
|
|
@ -244,19 +244,19 @@ int main(int argc, char* argv[])
|
||||||
break;
|
break;
|
||||||
case SDL_FINGERMOTION:
|
case SDL_FINGERMOTION:
|
||||||
#if VERBOSE
|
#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);
|
event.tfinger.x,event.tfinger.y);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case SDL_FINGERDOWN:
|
case SDL_FINGERDOWN:
|
||||||
#if VERBOSE
|
#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);
|
event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case SDL_FINGERUP:
|
case SDL_FINGERUP:
|
||||||
#if VERBOSE
|
#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);
|
event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -275,12 +275,12 @@ int main(int argc, char* argv[])
|
||||||
knob.r += event.mgesture.dDist;
|
knob.r += event.mgesture.dDist;
|
||||||
break;
|
break;
|
||||||
case SDL_DOLLARGESTURE:
|
case SDL_DOLLARGESTURE:
|
||||||
SDL_Log("Gesture %"PRIs64" performed, error: %f",
|
SDL_Log("Gesture %"SDL_PRIs64" performed, error: %f",
|
||||||
event.dgesture.gestureId,
|
event.dgesture.gestureId,
|
||||||
event.dgesture.error);
|
event.dgesture.error);
|
||||||
break;
|
break;
|
||||||
case SDL_DOLLARRECORD:
|
case SDL_DOLLARRECORD:
|
||||||
SDL_Log("Recorded gesture: %"PRIs64"",event.dgesture.gestureId);
|
SDL_Log("Recorded gesture: %"SDL_PRIs64"",event.dgesture.gestureId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue