Commit 444728ac845831805e603ae406729ceeeb420cad

Thomas de Grivel 2023-12-12T13:53:55

wip win32

diff --git a/libc3/window/cairo/demo/flies.c b/libc3/window/cairo/demo/flies.c
index 1fddd63..7271e8b 100644
--- a/libc3/window/cairo/demo/flies.c
+++ b/libc3/window/cairo/demo/flies.c
@@ -247,8 +247,8 @@ bool flies_render (s_sequence *seq, s_window_cairo *window,
                      directions[3] | directions[4] | directions[5] |
                      directions[6] | directions[7] | directions[8]) {
                 if (random_bits < 4) {
-                  r = random();
-                  random_bits = 31;
+                  r = arc4random();
+                  random_bits = 32;
                 }
                 direction = r % 16;
                 r >>= 4;
diff --git a/libc3/window/cairo/win32/window_cairo_win32.c b/libc3/window/cairo/win32/window_cairo_win32.c
index ca84461..93eadd5 100644
--- a/libc3/window/cairo/win32/window_cairo_win32.c
+++ b/libc3/window/cairo/win32/window_cairo_win32.c
@@ -10,7 +10,6 @@
  * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
  * THIS SOFTWARE.
  */
-#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <xkbcommon/xkbcommon.h>
diff --git a/libc3/window/sdl2/demo/configure b/libc3/window/sdl2/demo/configure
index cd0330c..132de97 100755
--- a/libc3/window/sdl2/demo/configure
+++ b/libc3/window/sdl2/demo/configure
@@ -57,6 +57,7 @@ pkg_config glu
 pkg_config glut
 pkg_config libpng
 config_lib OPENGL -framework OpenGL
+config_lib OPENGL -lopengl32 -lglu32
 pkg_config sdl2
 
 # Asan config
diff --git a/libc3/window/sdl2/demo/flies.c b/libc3/window/sdl2/demo/flies.c
index 65c2d47..758871e 100644
--- a/libc3/window/sdl2/demo/flies.c
+++ b/libc3/window/sdl2/demo/flies.c
@@ -255,8 +255,8 @@ bool flies_render (s_sequence *seq, s_window_sdl2 *window,
                      directions[3] | directions[4] | directions[5] |
                      directions[6] | directions[7] | directions[8]) {
                 if (random_bits < 4) {
-                  r = random();
-                  random_bits = 31;
+                  r = arc4random();
+                  random_bits = 32;
                 }
                 direction = r % 16;
                 r >>= 4;