From 04b26fe111d991eedfd4ee879bd962472dc0d1c4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 3 Dec 2017 03:43:05 +0100 Subject: [PATCH] Put braces around macros --- configuration.c | 4 ---- configuration.h | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/configuration.c b/configuration.c index 0af3f1e94a..8edb392412 100644 --- a/configuration.c +++ b/configuration.c @@ -2718,16 +2718,12 @@ static bool config_load_file(const char *path, bool set_defaults, *settings->paths.directory_system = '\0'; if (settings->floats.slowmotion_ratio < 1.0f) - { configuration_set_float(settings, settings->floats.slowmotion_ratio, 1.0f); - } /* Sanitize fastforward_ratio value - previously range was -1 * and up (with 0 being skipped) */ if (settings->floats.fastforward_ratio < 0.0f) - { configuration_set_float(settings, settings->floats.fastforward_ratio, 0.0f); - } #ifdef HAVE_LAKKA diff --git a/configuration.h b/configuration.h index 31dbeebff3..c81a53f962 100644 --- a/configuration.h +++ b/configuration.h @@ -29,21 +29,28 @@ #include "input/input_defines.h" #define configuration_set_float(settings, var, newvar) \ +{ \ settings->modified = true; \ - var = newvar + var = newvar; \ +} #define configuration_set_bool(settings, var, newvar) \ +{ \ settings->modified = true; \ - var = newvar + var = newvar; \ +} #define configuration_set_uint(settings, var, newvar) \ +{ \ settings->modified = true; \ - var = newvar + var = newvar; \ +} #define configuration_set_int(settings, var, newvar) \ +{ \ settings->modified = true; \ - var = newvar - + var = newvar; \ +} enum override_type {