mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Still more compiler warning fixes for various platforms.
This commit is contained in:
parent
40c2a6fb55
commit
232ae68864
@ -177,9 +177,11 @@ main(int argc, char *argv[])
|
|||||||
/* keep this at the end of the file so it works with GCC builds that don't
|
/* keep this at the end of the file so it works with GCC builds that don't
|
||||||
support "#pragma GCC diagnostic push" ... we'll just leave the warning
|
support "#pragma GCC diagnostic push" ... we'll just leave the warning
|
||||||
disabled after this. */
|
disabled after this. */
|
||||||
#ifdef __GNUC__
|
/* this pragma arrived in GCC 4.2 and causes a warning on older GCCs! Sigh. */
|
||||||
|
#if defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 2))))
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This function has a bit more overhead than most error functions
|
/* This function has a bit more overhead than most error functions
|
||||||
so that it supports internationalization and thread-safe errors.
|
so that it supports internationalization and thread-safe errors.
|
||||||
*/
|
*/
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
If we get this wrong, it's just a warning, so no big deal.
|
If we get this wrong, it's just a warning, so no big deal.
|
||||||
*/
|
*/
|
||||||
#if defined(_XGP6) || defined(__APPLE__) || \
|
#if defined(_XGP6) || defined(__APPLE__) || \
|
||||||
|
defined(__EMSCRIPTEN__) || \
|
||||||
(defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) || \
|
(defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) || \
|
||||||
(defined(_NEWLIB_VERSION)))
|
(defined(_NEWLIB_VERSION)))
|
||||||
#define ICONV_INBUF_NONCONST
|
#define ICONV_INBUF_NONCONST
|
||||||
|
@ -1210,10 +1210,10 @@ SDLTest_PrintEvent(SDL_Event * event)
|
|||||||
event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
|
event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
|
||||||
break;
|
break;
|
||||||
case SDL_DOLLARGESTURE:
|
case SDL_DOLLARGESTURE:
|
||||||
SDL_Log("SDL_EVENT: Dollar gesture detect: %lld", (long long) event->dgesture.gestureId);
|
SDL_Log("SDL_EVENT: Dollar gesture detect: %ld", (long) event->dgesture.gestureId);
|
||||||
break;
|
break;
|
||||||
case SDL_DOLLARRECORD:
|
case SDL_DOLLARRECORD:
|
||||||
SDL_Log("SDL_EVENT: Dollar gesture record: %lld", (long long) event->dgesture.gestureId);
|
SDL_Log("SDL_EVENT: Dollar gesture record: %ld", (long) event->dgesture.gestureId);
|
||||||
break;
|
break;
|
||||||
case SDL_MULTIGESTURE:
|
case SDL_MULTIGESTURE:
|
||||||
SDL_Log("SDL_EVENT: Multi gesture fingers: %d", event->mgesture.numFingers);
|
SDL_Log("SDL_EVENT: Multi gesture fingers: %d", event->mgesture.numFingers);
|
||||||
|
@ -40,10 +40,14 @@ Emscripten_GLES_LoadLibrary(_THIS, const char *path) {
|
|||||||
return SDL_OutOfMemory();
|
return SDL_OutOfMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Emscripten forces you to manually cast eglGetProcAddress to the real
|
||||||
|
function type; grep for "__eglMustCastToProperFunctionPointerType" in
|
||||||
|
Emscripten's egl.h for details. */
|
||||||
|
_this->egl_data->eglGetProcAddress = (void *(EGLAPIENTRY *)(const char *)) eglGetProcAddress;
|
||||||
|
|
||||||
LOAD_FUNC(eglGetDisplay);
|
LOAD_FUNC(eglGetDisplay);
|
||||||
LOAD_FUNC(eglInitialize);
|
LOAD_FUNC(eglInitialize);
|
||||||
LOAD_FUNC(eglTerminate);
|
LOAD_FUNC(eglTerminate);
|
||||||
LOAD_FUNC(eglGetProcAddress);
|
|
||||||
LOAD_FUNC(eglChooseConfig);
|
LOAD_FUNC(eglChooseConfig);
|
||||||
LOAD_FUNC(eglGetConfigAttrib);
|
LOAD_FUNC(eglGetConfigAttrib);
|
||||||
LOAD_FUNC(eglCreateContext);
|
LOAD_FUNC(eglCreateContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user