diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-25 19:11:32 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-25 19:11:32 (EDT) |
commit | 78aff7ae4b05b5a77931ac4e68c814f48ce22460 (patch) | |
tree | 1ba0d2b6fbc0bfaa493b76af84c4480e0d9e404b /src | |
parent | 13499eb84d624b2c94e415bab4b1304408cf0f92 (diff) | |
download | dodge-balls-78aff7ae4b05b5a77931ac4e68c814f48ce22460.zip dodge-balls-78aff7ae4b05b5a77931ac4e68c814f48ce22460.tar.gz dodge-balls-78aff7ae4b05b5a77931ac4e68c814f48ce22460.tar.bz2 |
main: Seed RNG
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -20,6 +20,7 @@ #include <SDL.h> #include <SDL_ttf.h> #include <stdlib.h> +#include <time.h> #include "defs.h" #include "dirs.h" #include "main-menu.h" @@ -31,6 +32,8 @@ static SDL_Renderer *_db_renderer; static int _db_init(void) { + srand(time(NULL)); + if (SDL_Init(SDL_INIT_VIDEO) < 0) { db_err("Failed to initialize SDL (%s)", SDL_GetError()); return -1; |