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

Olof Bjarnason olof.bjarnason at gmail.com
Fri Sep 16 06:32:41 PDT 2005


I agree; I would love a robust runtime query system in SDL, maybe

char* SDL_SystemQuery(char* capability);
...
if(atoi(SDL_SystemQuery("DESKTOP_RESOLUTION_W") == 1024) {
  printf("I don't like people using 1024x768 desktop resolution, bye.\n");
  return;
}

or

if(!SDL_SystemQuery("ALPHABLEND_HW_HW_ACCEL")) {
  printf("Alpha blending is not hardware accelerated, get some new gfx h/w!\n");
  printf("I will run the program anyway, I've warned you.\n");
}

or whatever. Lots of flags, yes :)

Best of both worlds would be if SDL used the current
"fall-back-to-closest-match" system of today, but add APIs for
querying reliably also. Then an application programmer could choose to
play it the portable way and continue to run the program even if the
best match isn't available, or quit if he pleases.

/Olof

On 9/16/05, Steaphan Greene <stea at cs.binghamton.edu> wrote:
> On Thu, Sep 15, 2005 at 04:50:06PM -0400, Antonio SJ Musumeci wrote:
> > How does offering a robust query system make it not Simple? And how does
> > requesting several extensions make it less portable? It's no different
> > than requiring other external libraries. I'd imagine it would make apps
> > more portable... since the programmer can accommodate accordingly to
> > what is available. (for compile time and run time) I would rather have
> > an app be able to notify me that it's unable to run or run as well
> > because SDL doesnt support something then run at the lowest common
> > denominator without warning. As I said... the OpenGL community has been
> > doing this for years and I dont see anyone having problems with it. I
> > dont think giving the developer more information is ever a bad thing.
> > This I think also has reverence with the conversation on sdl-config and
> > cross-platform building. If sdl-config was an app wrapping up much of
> > the queriable things which this imaginary SDL query system provides...
> > it would be more useful and available on systems without unix style shells.
> 
> Sorry, I guess I wasn't clear.  I wasn't disagreeing with you.  I was
> actually agreeing, just cautioning against its overuse.  I just wouldn't
> want this philosophy to create a situation where querying is REQUIRED
> for use of certain features where a reasonable default could be
> automatically fallen back to by SDL itself (thus making its use less
> "Simple").  That's all.  I agree a robust, uniform query system would be
> a Good Thing[TM] for libsdl and friends.
> 
> --
> Steaphan Greene <sgreene at cs.binghamton.edu>
> GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> 
> iD8DBQFDKg/PTFyjetLgWh8RAt1bAKCnLLHfr8bpJwkHplQ98t3O8vwjywCfU/N9
> VglJf51/YM54aS6MI4kuwBo=
> =H0Nv
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 
> 
>




More information about the SDL mailing list