mingw bug
authorhgn <hgodden00@gmail.com>
Sun, 16 Apr 2023 06:50:15 +0000 (07:50 +0100)
committerhgn <hgodden00@gmail.com>
Sun, 16 Apr 2023 06:50:15 +0000 (07:50 +0100)
vg.h
vg_m.h
vg_mem.h

diff --git a/vg.h b/vg.h
index 8e5eafdc29f61964dcd9257afc2459763dd6ea94..3ac8fe809aa9c16c6995372336c1c3a8b40f2b6f 100644 (file)
--- a/vg.h
+++ b/vg.h
@@ -546,7 +546,7 @@ VG_STATIC void _vg_gameloop_render(void)
                   "samples: %d\n"
                   "iterations: %d (acc: %.3fms%%)\n"
                   "time: real(%.2f) delta(%.2f) rate(%.2f)\n"
-                  "      extrap(%.2f) frame(%.2f) spin( %lu )\n",
+                  "      extrap(%.2f) frame(%.2f) spin( %llu )\n",
                   vg.window_x, vg.window_y, 
                   frame_target, (1.0f/(float)frame_target)*1000.0f,
                   vg.samples, 
diff --git a/vg_m.h b/vg_m.h
index e75e8dc38ce7cb49d25e025ec4fa27b6d147d605..8e6e56c0c425d00f3b07c789c4d3bbcc6dd601fa 100644 (file)
--- a/vg_m.h
+++ b/vg_m.h
@@ -1363,7 +1363,10 @@ static void m4x3_mul( m4x3f a, m4x3f b, m4x3f d )
    d[3][2] = a02*b30 + a12*b31 + a22*b32 + a32;
 }
 
-static inline void m4x3_mulv( m4x3f m, v3f v, v3f d ) 
+#if 0 /* shat appf mingw wstringop-overflow */
+inline
+#endif
+static void m4x3_mulv( m4x3f m, v3f v, v3f d ) 
 {
    v3f res;
   
index 820fa6d19aa0d701349de4a4bd7df5c02f9e4352..49d9e37e86b8af8d515a64a164d64873e6d6f59f 100644 (file)
--- a/vg_mem.h
+++ b/vg_mem.h
@@ -122,7 +122,11 @@ VG_STATIC void *vg_linear_alloc( void *buffer, u32 size )
       vg_print_backtrace();
       size = vg_align8( size );
    }
+#ifdef _WIN32
+   if( ((u32)buffer) % 8 ){
+#else
    if( ((u64)buffer) % 8 ){
+#endif
       vg_error( "buffer: %p\n", buffer );
       vg_fatal_exit_loop( "unaligned buffer" );
    }
@@ -161,7 +165,11 @@ VG_STATIC void *vg_linear_alloc( void *buffer, u32 size )
    alloc->last_alloc_size = size;
    alloc->cur += size;
 
+#ifdef _WIN32
+   if( ((u32)data) % 8 ){
+#else
    if( ((u64)data) % 8 ){
+#endif
       vg_fatal_exit_loop( "unaligned" );
    }