Idea for changes to SDL_Compat


I was looking at the way how the compatibility layer of SDL1.3 works.
The current implementation only handles compiling SDL1.2 sources and it
still lacks some common used functions. Namely SDL_GetKeyState which
can’t (at least not easily) be implemented, because the SDLKey values
don’t match.

My idea is to not focus on being able to easily compile SDL1.2 code with
SDL1.3 but to be able to actually replace or preload SDL1.2 with SDL1.3.
In my opinion this is a more important feature since this makes it
possible to benefit from some of the features of SDL1.3 when using
closed software which uses SDL1.2 and if you have the source code of a
program you could change it to use “native” SDL1.3 anyway.

Of course the option to easily compile SDL1.2 code with SDL1.3 should be
kept. My approach for this is to add a flag which has to be set when
compiling a SDL1.2 program. When the flag is set the SDL1.2 values for
global variables like the SDLKeys will be used instead of the SDL1.3
values. This will probably even make it possible to still run the
compiled program with SDL1.2 by preloading (although it will be linked
against SDL1.3) :).

I hope i expressed my Idea comprehensible