From 62389ada6fe943276079eee82858d94a6ee874ee Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 24 Sep 2024 13:54:53 -0400
Subject: [PATCH] examples/renderer/02-primitives: seed the RNG.
---
examples/renderer/02-primitives/primitives.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/renderer/02-primitives/primitives.c b/examples/renderer/02-primitives/primitives.c
index cb5f57c148247..1222b86f14e7c 100644
--- a/examples/renderer/02-primitives/primitives.c
+++ b/examples/renderer/02-primitives/primitives.c
@@ -29,6 +29,8 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
return SDL_APP_FAILURE;
}
+ SDL_srand(0); /* seed the random number generator */
+
/* set up some random points */
for (i = 0; i < SDL_arraysize(points); i++) {
points[i].x = (SDL_randf() * 440.0f) + 100.0f;