Sfoglia il codice sorgente

Added random seed init.

Camilla Berglund 12 anni fa
parent
commit
f5dc6e4007
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      tests/reopen.c

+ 3 - 0
tests/reopen.c

@@ -35,6 +35,7 @@
 
 #include <GLFW/glfw3.h>
 
+#include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -112,6 +113,8 @@ int main(int argc, char** argv)
     int count = 0;
     GLFWwindow* window;
 
+    srand(time(NULL));
+
     glfwSetErrorCallback(error_callback);
 
     if (!glfwInit())