From 147edb894b62e8c448bf14fe97dae7c1cc57b18e Mon Sep 17 00:00:00 2001 From: nukeykt Date: Sun, 24 Sep 2017 23:34:58 +0900 Subject: [PATCH] Reset YM core only when value is changed --- libretro/libretro.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index e203b9e..de1dd55 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -1096,13 +1096,17 @@ static void check_variables(void) var.key = "genesis_plus_gx_ym3438"; environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var); { + orig_value = config.ym3438; if (!strcmp(var.value, "nuked opn2")) config.ym3438 = 1; else config.ym3438 = 0; - sound_init(); - sound_reset(); + if (orig_value != config.ym3438) + { + sound_init(); + sound_reset(); + } } #endif