Nevertheless, I will give it a shot again.
Good work Sam!
Nevertheless, I will give it a shot again.
Good work Sam!
SDL has never hijacked the main loop, unlike e.g. GLUT. SDL has SDL_WaitEvent and SDL_PollEvent and leaves the main loop to you.
It's amazing because I did it for fun and I used some data structures I would have never expect to be so portable (ie. using a double linked list of objects in static memory instead of alloc/free). I wonder if that's why it works even in very limited hardware.
My favourite, the game running on a TI-Nspire calculator: http://www.youtube.com/watch?&v=acdAqxiwG7I&t=15
Edit: Ah, if the main loop you refer is SDL_Event loop, as exDM69 said, SDL always supported passive event functions that can be called at your original idle function. SDL 2.0 adds an active event watcher (SDL_AddEventWatch etc.) as an alternative though.
Evil or not, it solves a practical problem that you would have to work around if SDL did not. And AFAIK, you have always had the option of not using SDL_main if you wish to solve the problem on your own.
On desktop platforms the program entry point is pretty easy to solve (main vs. WinMain) with an SDL_main-style macro or command line args on win32 compilers. But when you start working with iOS and Android, it gets more hairy.
It was annoying to me because I worked on a application that did the same thing internally and where SDL was not a hard dependency. But well, it's not that bad as I make it sound.