diff --git a/gfx/video_filters/snes_ntsc/snes_ntsc_impl.h b/gfx/video_filters/snes_ntsc/snes_ntsc_impl.h index fc9be63739..36d767d697 100644 --- a/gfx/video_filters/snes_ntsc/snes_ntsc_impl.h +++ b/gfx/video_filters/snes_ntsc/snes_ntsc_impl.h @@ -4,7 +4,7 @@ /* Common implementation of NTSC filters */ -#include +#include #include /* Copyright (C) 2006 Shay Green. This module is free software; you @@ -121,7 +121,7 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup ) { int x = kernel_size * 3 / 2 - kernel_half + i; kernels [x] *= sum; - assert( kernels [x] == kernels [x] ); /* catch numerical instability */ + retro_assert( kernels [x] == kernels [x] ); /* catch numerical instability */ } } @@ -156,7 +156,7 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup ) for ( x = i; x < kernel_size; x += 2 ) { kernels [x] *= sum; - assert( kernels [x] == kernels [x] ); /* catch numerical instability */ + retro_assert( kernels [x] == kernels [x] ); /* catch numerical instability */ } } } diff --git a/libretro-common/audio/audio_mixer.c b/libretro-common/audio/audio_mixer.c index a44ba38d6a..3b66d0b1f2 100644 --- a/libretro-common/audio/audio_mixer.c +++ b/libretro-common/audio/audio_mixer.c @@ -55,6 +55,8 @@ #ifdef HAVE_DR_MP3 #define DR_MP3_IMPLEMENTATION +#include +#define DRMP3_ASSERT(expression) retro_assert(expression) #include #endif diff --git a/libretro-common/formats/jpeg/rjpeg.c b/libretro-common/formats/jpeg/rjpeg.c index 65cb6c3966..e321b69b33 100644 --- a/libretro-common/formats/jpeg/rjpeg.c +++ b/libretro-common/formats/jpeg/rjpeg.c @@ -419,7 +419,7 @@ static INLINE int rjpeg__jpeg_huff_decode(rjpeg__jpeg *j, rjpeg__huffman *h) /* convert the huffman code to the symbol id */ c = ((j->code_buffer >> (32 - k)) & rjpeg__bmask[k]) + h->delta[k]; - assert((((j->code_buffer) >> (32 - h->size[c])) & rjpeg__bmask[h->size[c]]) == h->code[c]); + retro_assert((((j->code_buffer) >> (32 - h->size[c])) & rjpeg__bmask[h->size[c]]) == h->code[c]); /* convert the id to a symbol */ j->code_bits -= k; @@ -441,7 +441,7 @@ static INLINE int rjpeg__extend_receive(rjpeg__jpeg *j, int n) sgn = (int32_t)j->code_buffer >> 31; /* sign bit is always in MSB */ k = rjpeg_lrot(j->code_buffer, n); - assert(n >= 0 && n < (int) (sizeof(rjpeg__bmask)/sizeof(*rjpeg__bmask))); + retro_assert(n >= 0 && n < (int) (sizeof(rjpeg__bmask)/sizeof(*rjpeg__bmask))); j->code_buffer = k & ~rjpeg__bmask[n]; k &= rjpeg__bmask[n]; j->code_bits -= n; diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 4912a86bcc..d55bad6166 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -24,6 +24,9 @@ #include #define DG_DYNARR_IMPLEMENTATION +#include +#include +#define DG_DYNARR_ASSERT(cond, msg) (void)0 #include #undef DG_DYNARR_IMPLEMENTATION