فهرست منبع

Added random seed init.

Camilla Berglund 12 سال پیش
والد
کامیت
f5dc6e4007
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  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())