From 78aff7ae4b05b5a77931ac4e68c814f48ce22460 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 25 Mar 2021 19:11:32 -0400 Subject: main: Seed RNG --- (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index aa05340..4924546 100644 --- a/src/main.c +++ b/src/main.c @@ -20,6 +20,7 @@ #include #include #include +#include #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; -- cgit v0.9.1