Hello,
We had a problem with the Battle for Wesnoth game on OS/2 platform,
that it crashed if we had no extra SDL_Init() call.
It turned out, that the crash was in SDL_GetTicks(), and the
reason was that Wesnoth uses the SDL_GetTicks() function too early,
before calling SDL_Init(), which means that SDL_StartTicks() was not
called before.
We could create a workaround, so SDL_GetTicks() on OS/2 now detects
that SDL_StartTicks() was not called before, and calls it if it’s
needed, but I’d like to know, what is the official way of using
this function?
Is it officially needed to call SDL_Init() before using SDL_GetTicks()?
I can see that the other platforms will not crash, as they don’t use
division in there, dividing by a value initialized at SDL_StartTicks()
time, but most of them will also return “invalid” values.
Thanks in advance,
Doodle