(This could be well documented, but being a real man, I don’t read the
docs…so I hope, when this post shows up in Google’s libsdl archive, that
it saves someone the several hours I just wasted being a dumbass.
BE SURE to use the SDL_main object when you link, and redefine your main()
to be SDL_main! If you don’t, SDL throws up (and takes the system with it)
when you try to handle events.
This is made less obvious by the fact that using SIOUX before you handle
an event will make everything work fine. As soon as I built my program
with the printf() calls commented out, the whole system blew up, and I
spent forever looking at the pieces.
Once I did this, everything worked like a champ (god, I’m always impressed
at how quickly SDL-based games can hop platforms!) …
Now, I’m not a Mac expert by any stretch of the imagination, so I have to
ask earnestly: how much of this code in the SDL_main object could safely
make it into SDL_Init()'s platform-specific sections? Is it even worth
doing that (after all, it was my dumb mistake to not use the object in
the first place)?