src/SDL12_compat.c
changeset 33 4e9cde983cdc
parent 32 0e6f8855a779
child 34 946cbc18ba19
equal deleted inserted replaced
32:0e6f8855a779 33:4e9cde983cdc
    24 #include "SDL20_include_wrapper.h"
    24 #include "SDL20_include_wrapper.h"
    25 
    25 
    26 #if !SDL_VERSION_ATLEAST(2,0,0)
    26 #if !SDL_VERSION_ATLEAST(2,0,0)
    27 #error You need to compile against SDL 2.0 headers.
    27 #error You need to compile against SDL 2.0 headers.
    28 #endif
    28 #endif
       
    29 
       
    30 /*
       
    31  * We report the library version as 1.2.$(SDL12_COMPAT_VERSION). This number
       
    32  *  should be way ahead of what SDL-1.2 Classic would report, so apps can
       
    33  *  decide if they're running under the compat layer, if they really care.
       
    34  */
       
    35 #define SDL12_COMPAT_VERSION 50
    29 
    36 
    30 #include <stdarg.h>
    37 #include <stdarg.h>
    31 
    38 
    32 //#include "video/SDL_sysvideo.h"
    39 //#include "video/SDL_sysvideo.h"
    33 //#include "video/SDL_pixels_c.h"
    40 //#include "video/SDL_pixels_c.h"
   372 
   379 
   373 static EventQueueType EventQueuePool[SDL12_MAXEVENTS];
   380 static EventQueueType EventQueuePool[SDL12_MAXEVENTS];
   374 static EventQueueType *EventQueueHead = NULL;
   381 static EventQueueType *EventQueueHead = NULL;
   375 static EventQueueType *EventQueueTail = NULL;
   382 static EventQueueType *EventQueueTail = NULL;
   376 static EventQueueType *EventQueueAvailable = NULL;
   383 static EventQueueType *EventQueueAvailable = NULL;
       
   384 
       
   385 const SDL_version *
       
   386 SDL_Linked_Version(void)
       
   387 {
       
   388     static const SDL_version version = { 1, 2, SDL12_COMPAT_VERSION };
       
   389     return &version;
       
   390 }
   377 
   391 
   378 /* Obviously we can't use SDL_LoadObject() to load SDL2.  :)  */
   392 /* Obviously we can't use SDL_LoadObject() to load SDL2.  :)  */
   379 #if defined(_WINDOWS)
   393 #if defined(_WINDOWS)
   380     #define WIN32_LEAN_AND_MEAN 1
   394     #define WIN32_LEAN_AND_MEAN 1
   381     #include <windows.h>
   395     #include <windows.h>