move Ticks initialization tracking to separate function and ensure it's called with SDL_VideoInit is called to init SDL instead of SDL_Init

-- why do we even allow initialization w/o calling at least SDL_Init(0) ?
This commit is contained in:
Edward Rudd 2013-05-02 21:40:59 -04:00
parent 907ac2687c
commit 33660e58c1
4 changed files with 20 additions and 6 deletions

View file

@ -29,6 +29,7 @@
#include "SDL_pixels_c.h"
#include "SDL_rect_c.h"
#include "../events/SDL_events_c.h"
#include "../timer/SDL_timer_c.h"
#if SDL_VIDEO_OPENGL
#include "SDL_opengl.h"
@ -415,6 +416,10 @@ SDL_VideoInit(const char *driver_name)
if (_this != NULL) {
SDL_VideoQuit();
}
#if !SDL_TIMERS_DISABLED
SDL_InitTicks();
#endif
/* Start the event loop */
if (SDL_StartEventLoop() < 0 ||