From: hgn Date: Sun, 16 Apr 2023 06:50:15 +0000 (+0100) Subject: mingw bug X-Git-Url: https://skaterift.com/git/?a=commitdiff_plain;h=a6551358fdce559d62406cfd0c14ac49dd095104;p=vg.git mingw bug --- diff --git a/vg.h b/vg.h index 8e5eafd..3ac8fe8 100644 --- 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 e75e8dc..8e6e56c 100644 --- 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; diff --git a/vg_mem.h b/vg_mem.h index 820fa6d..49d9e37 100644 --- 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" ); }