Minor SDL2 fix. stable-1.0
authorRyan C. Gordon <icculus@icculus.org>
Wed, 15 Aug 2012 21:35:08 -0400
branchstable-1.0
changeset 597 b46d67284ff3
parent 594 b7b77ce74ac9
child 598 0c4026dd3274
Minor SDL2 fix.
playsound/playsound.c
--- a/playsound/playsound.c	Wed Jun 15 16:02:44 2011 -0400
+++ b/playsound/playsound.c	Wed Aug 15 21:35:08 2012 -0400
@@ -84,12 +84,18 @@
     Sound_Version compiled;
     Sound_Version linked;
     SDL_version sdl_compiled;
-    const SDL_version *sdl_linked;
+    SDL_version sdl_linked_ver;
+    const SDL_version *sdl_linked = &sdl_linked_ver;
 
     SOUND_VERSION(&compiled);
     Sound_GetLinkedVersion(&linked);
     SDL_VERSION(&sdl_compiled);
+
+    #if SDL_MAJOR_VERSION >= 2
+    SDL_GetVersion(&sdl_linked_ver);
+    #else
     sdl_linked = SDL_Linked_Version();
+    #endif
 
     fprintf(stdout,
            "%s version %d.%d.%d\n"