src/SDL12_compat.c
changeset 33 4e9cde983cdc
parent 32 0e6f8855a779
child 34 946cbc18ba19
     1.1 --- a/src/SDL12_compat.c	Sat Apr 13 21:29:36 2013 -0400
     1.2 +++ b/src/SDL12_compat.c	Sat Apr 13 21:57:24 2013 -0400
     1.3 @@ -27,6 +27,13 @@
     1.4  #error You need to compile against SDL 2.0 headers.
     1.5  #endif
     1.6  
     1.7 +/*
     1.8 + * We report the library version as 1.2.$(SDL12_COMPAT_VERSION). This number
     1.9 + *  should be way ahead of what SDL-1.2 Classic would report, so apps can
    1.10 + *  decide if they're running under the compat layer, if they really care.
    1.11 + */
    1.12 +#define SDL12_COMPAT_VERSION 50
    1.13 +
    1.14  #include <stdarg.h>
    1.15  
    1.16  //#include "video/SDL_sysvideo.h"
    1.17 @@ -375,6 +382,13 @@
    1.18  static EventQueueType *EventQueueTail = NULL;
    1.19  static EventQueueType *EventQueueAvailable = NULL;
    1.20  
    1.21 +const SDL_version *
    1.22 +SDL_Linked_Version(void)
    1.23 +{
    1.24 +    static const SDL_version version = { 1, 2, SDL12_COMPAT_VERSION };
    1.25 +    return &version;
    1.26 +}
    1.27 +
    1.28  /* Obviously we can't use SDL_LoadObject() to load SDL2.  :)  */
    1.29  #if defined(_WINDOWS)
    1.30      #define WIN32_LEAN_AND_MEAN 1