[SDL] Feature Query System (Was: Some multithreaded improvement to the event queue...)

Tom Wilson t.wilson at hazid.com
Thu Sep 29 10:20:52 PDT 2005

>Funny thing is that SDL_WM_ToggleFullScreen is the prime example used to
>justify the need of a query system in SDL. The thing is, it is
>documented that it only works on one kind of system, so a simple #ifdef
>(or the equivalent) is all that your code needs to determine if you have
>the feature or not. Having said that, I also want to say that
>SDL_WM_ToggleFullScreen is one of a very few features that are only
>supported on a single platform. I, personally, would have objected to
>adding a feature that can only be supported on a single platform. I,
>personally, would rather see SDL_WM_ToggleFullScreen removed from SDL
>than see a large complex query system added to SDL.

I only just noticed this thread, but it occurred to me that if you query 
a load of functions and they are not available, then the code you would 
have to write in order to dodge around the missing functions would be a 
total nightmare.  Maybe we also need a library for that, which 
auto-queries SDL and returns a struct full of function pointers....  Or 
we could just not waste our time.

Like Bob says I think you are just better off doing some macro stuff, 
rather than over complicating matters.

    //do something else.

For people using a python or some other scripting language this not an 
option, but i'm sure there is a function in Python that gets the OS

Infact I just looked it up you can use platform.system();

/import platform//

- Tom

More information about the SDL mailing list