mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 02:04:20 +00: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:
@@ -19,9 +19,6 @@
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
static SDLTest_CommonState *state;
|
||||
static int i, done;
|
||||
static float mouseX, mouseY;
|
||||
@@ -115,7 +112,6 @@ int main(int argc, char *argv[])
|
||||
SDL_RenderClear(renderer);
|
||||
}
|
||||
|
||||
srand((unsigned int)time(NULL));
|
||||
if (SDL_SetRelativeMouseMode(SDL_TRUE) < 0) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user