Joystick events only generated when SDL_INIT_VIDEO

Because on all mayor systems (Windows/MaxOSX/*nix with X11) your
application need an active window to get this information from the
OS in
the first place.

This is not true.

SDL_Init( SDL_INIT_VIDEO | SDL_INIT_JOYSTICK ) wont create a window,
on those platforms. Also, SDL’s joystick subsystem can be accessed
from the console on those platforms, without creating a window (but
you have to specify SDL_INIT_VIDEO, and subvert SDL’s private main()
function, which actually creates the window).

Great! Subverting (oftimes accidentally) SDL’s main used to get
me crashes on the mac if one had the temerity to call graphics ops,
but this gets around an old pet peeve of mine, which is when I use
SDL to to write cli sound-only apps I would always get a dock
icon (immensely annoying). Of course tossing SDLmain will fix this!

I know I’ve shown myself to be biased in this regard, but I think
this is another argument for the expurgation of SDLmain. Why not
just make it another flag passed to SDL_Init?
SDL_Init( SDL_PLATFORM_SUBSYSTEMS ).

Thank you!> From: Spencer Salazar

On Apr 5, 2006, at 3:57 AM, Mattias Karlsson wrote: