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:
parent
907ac2687c
commit
33660e58c1
4 changed files with 20 additions and 6 deletions
|
@ -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 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue