Merge pull request #174 from nukeykt/ym3438

Reset YM core only when value is changed
This commit is contained in:
ekeeke 2017-09-24 19:59:21 +02:00 committed by GitHub
commit e52926248a

View File

@ -1096,14 +1096,18 @@ static void check_variables(void)
var.key = "genesis_plus_gx_ym3438"; var.key = "genesis_plus_gx_ym3438";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var); environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{ {
orig_value = config.ym3438;
if (!strcmp(var.value, "nuked opn2")) if (!strcmp(var.value, "nuked opn2"))
config.ym3438 = 1; config.ym3438 = 1;
else else
config.ym3438 = 0; config.ym3438 = 0;
if (orig_value != config.ym3438)
{
sound_init(); sound_init();
sound_reset(); sound_reset();
} }
}
#endif #endif
var.key = "genesis_plus_gx_blargg_ntsc_filter"; var.key = "genesis_plus_gx_blargg_ntsc_filter";