aboutsummaryrefslogtreecommitdiffstats
path: root/c_src/sdl_stdinc.c
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-05-24 16:30:33 +0200
committerLoïc Hoguin <[email protected]>2018-05-24 16:30:33 +0200
commit253ad8371ad8ebf88ca3acf9cda7b9a3c58347ad (patch)
tree13e9cfadcfc84b62505344d719268094a5d6c55b /c_src/sdl_stdinc.c
parent6cf57d1d9ed61221f266ededc2f38be8b7cab757 (diff)
downloadesdl2-253ad8371ad8ebf88ca3acf9cda7b9a3c58347ad.tar.gz
esdl2-253ad8371ad8ebf88ca3acf9cda7b9a3c58347ad.tar.bz2
esdl2-253ad8371ad8ebf88ca3acf9cda7b9a3c58347ad.zip
Fix compilation with SDL2 2.0.6
Diffstat (limited to 'c_src/sdl_stdinc.c')
-rw-r--r--c_src/sdl_stdinc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/c_src/sdl_stdinc.c b/c_src/sdl_stdinc.c
index 9aef17e..216d6ad 100644
--- a/c_src/sdl_stdinc.c
+++ b/c_src/sdl_stdinc.c
@@ -24,5 +24,9 @@ NIF_ATOM_TO_ENUM_FUNCTION(atom_to_bool, SDL_bool, BOOL_ENUM)
NIF_FUNCTION(get_num_allocations)
{
+#if SDL_VERSION_ATLEAST(2, 0, 7)
return enif_make_int(env, SDL_GetNumAllocations());
+#else
+ return atom_undefined;
+#endif
}