From a00ab53ef6cb55188b3cbb86512bb52bc15fc7f1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 17 Jun 2020 11:22:13 +0200 Subject: [PATCH] Put fprintfs and printfs behind ifndef NDEBUG --- cores/dynamic_dummy.c | 2 +- libretro-common/features/features_cpu.c | 4 ++++ libretro-common/gfx/scaler/scaler_filter.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cores/dynamic_dummy.c b/cores/dynamic_dummy.c index 9edc06d74d..4d3d9b09e8 100644 --- a/cores/dynamic_dummy.c +++ b/cores/dynamic_dummy.c @@ -144,7 +144,7 @@ void libretro_dummy_retro_get_system_av_info( refresh_rate = 60.0; info->timing.fps = refresh_rate; - info->timing.sample_rate = 30000.0; + info->timing.sample_rate = 48000.0; info->geometry.base_width = frame_buf_width; info->geometry.base_height = frame_buf_height; diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index 09fd5462ca..a3d42cdcc9 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -285,7 +285,9 @@ void x86_cpuid(int func, int flags[4]) #elif defined(_MSC_VER) __cpuid(flags, func); #else +#ifndef NDEBUG printf("Unknown compiler. Cannot check CPUID with inline assembly.\n"); +#endif memset(flags, 0, 4 * sizeof(int)); #endif } @@ -307,7 +309,9 @@ static uint64_t xgetbv_x86(uint32_t idx) /* Intrinsic only works on 2010 SP1 and above. */ return _xgetbv(idx); #else +#ifndef NDEBUG printf("Unknown compiler. Cannot check xgetbv bits.\n"); +#endif return 0; #endif } diff --git a/libretro-common/gfx/scaler/scaler_filter.c b/libretro-common/gfx/scaler/scaler_filter.c index 35ab1ead9e..a614290d22 100644 --- a/libretro-common/gfx/scaler/scaler_filter.c +++ b/libretro-common/gfx/scaler/scaler_filter.c @@ -85,7 +85,9 @@ static bool validate_filter(struct scaler_ctx *ctx) { if (ctx->horiz.filter_pos[i] > max_w_pos || ctx->horiz.filter_pos[i] < 0) { +#ifndef NDEBUG fprintf(stderr, "Out X = %d => In X = %d\n", i, ctx->horiz.filter_pos[i]); +#endif return false; } } @@ -96,7 +98,9 @@ static bool validate_filter(struct scaler_ctx *ctx) { if (ctx->vert.filter_pos[i] > max_h_pos || ctx->vert.filter_pos[i] < 0) { +#ifndef NDEBUG fprintf(stderr, "Out Y = %d => In Y = %d\n", i, ctx->vert.filter_pos[i]); +#endif return false; } }