Skip to content

Commit

Permalink
Added SDL_Linked_Version().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 14, 2013
1 parent 516a532 commit 1d23c44
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/SDL12_compat.c
Expand Up @@ -27,6 +27,13 @@
#error You need to compile against SDL 2.0 headers.
#endif

/*
* We report the library version as 1.2.$(SDL12_COMPAT_VERSION). This number
* should be way ahead of what SDL-1.2 Classic would report, so apps can
* decide if they're running under the compat layer, if they really care.
*/
#define SDL12_COMPAT_VERSION 50

#include <stdarg.h>

//#include "video/SDL_sysvideo.h"
Expand Down Expand Up @@ -375,6 +382,13 @@ static EventQueueType *EventQueueHead = NULL;
static EventQueueType *EventQueueTail = NULL;
static EventQueueType *EventQueueAvailable = NULL;

const SDL_version *
SDL_Linked_Version(void)
{
static const SDL_version version = { 1, 2, SDL12_COMPAT_VERSION };
return &version;
}

/* Obviously we can't use SDL_LoadObject() to load SDL2. :) */
#if defined(_WINDOWS)
#define WIN32_LEAN_AND_MEAN 1
Expand Down

0 comments on commit 1d23c44

Please sign in to comment.