SDL_AddTimer

Jack Andrews <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <CAJvHTNzWfCSMMyHuWMC8XLzFVot2B_SVrp2eVjJ2CVXSB8NEMw@mail.gmail.com>
Hi Guys,

I'm using the SDL_PushEvent() technique at
https://wiki.libsdl.org/SDL_AddTimer so that my timer is processed on the
main thread.

The only problem is that it seems I lose the convenience of changing (or
deleting) the timer using the return value of the callback.

How could I write a callback to use SDL_PushEvent() and then get the result
of my event loop function to reset the timer interval?

Of course, I could RemoveTimer and AddTimer, but it would be nice to have a
more compact solution.

cheers,
jack

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.