mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Added SDL_srand(), SDL_rand(), and SDL_rand_r() (thanks @JKaniarz!)
These are simple random functions that should not be used for serious random number generation. Fixes https://github.com/libsdl-org/SDL/issues/4968
This commit is contained in:
@@ -21,9 +21,6 @@
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
static SDL_Renderer *renderer = NULL;
|
||||
static SDL_Window *window = NULL;
|
||||
static int done = SDL_FALSE;
|
||||
@@ -137,8 +134,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
srand((unsigned int)time(NULL));
|
||||
|
||||
#ifndef SDL_PLATFORM_EMSCRIPTEN
|
||||
/* Main render loop */
|
||||
frames = 0;
|
||||
|
||||
Reference in New Issue
Block a user