From 8287d597a2b0c9a51a49cc7c6124b4d59663deea Mon Sep 17 00:00:00 2001 From: r5 Date: Wed, 20 Sep 2017 19:24:52 +0100 Subject: [PATCH 1/3] (libretro) Expose stereo/mono core option --- libretro/libretro.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index e264117..262c5c7 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -514,7 +514,7 @@ static void config_default(void) config.hg = 100.0; config.dac_bits = 14; /* MAX DEPTH */ config.ym2413 = 2; /* AUTO */ - config.mono = 0; /* STEREO output */ + config.mono = 1; /* MONO output */ /* system options */ config.system = 0; /* AUTO */ @@ -1032,7 +1032,16 @@ static void check_variables(void) } } } - + + var.key = "genesis_plus_gx_sound_output"; + environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var); + { + if (!strcmp(var.value, "mono")) + config.mono = 1; + else if (!strcmp(var.value, "stereo")) + config.mono = 0; + } + var.key = "genesis_plus_gx_audio_filter"; environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var); { @@ -1628,6 +1637,7 @@ void retro_set_environment(retro_environment_t cb) { "genesis_plus_gx_lock_on", "Cartridge lock-on; disabled|game genie|action replay (pro)|sonic & knuckles" }, { "genesis_plus_gx_ym2413", "Master System FM; auto|disabled|enabled" }, { "genesis_plus_gx_dac_bits", "YM2612 DAC quantization; disabled|enabled" }, + { "genesis_plus_gx_sound_output", "Sound output; mono|stereo" }, { "genesis_plus_gx_audio_filter", "Audio filter; disabled|Lowpass" }, { "genesis_plus_gx_lowpass_range", "Low-pass filter %; 60|65|70|75|80|85|90|95|5|10|15|20|25|30|35|40|45|50|55"}, From f0fe9307c9ccd3b8eb6f9b25c410c477ef4141d1 Mon Sep 17 00:00:00 2001 From: r5 Date: Thu, 21 Sep 2017 14:38:22 +0100 Subject: [PATCH 2/3] (libretro) Revert default sound output to 'stereo' --- libretro/libretro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 262c5c7..4998366 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -514,7 +514,7 @@ static void config_default(void) config.hg = 100.0; config.dac_bits = 14; /* MAX DEPTH */ config.ym2413 = 2; /* AUTO */ - config.mono = 1; /* MONO output */ + config.mono = 0; /* STEREO output */ /* system options */ config.system = 0; /* AUTO */ @@ -1637,7 +1637,7 @@ void retro_set_environment(retro_environment_t cb) { "genesis_plus_gx_lock_on", "Cartridge lock-on; disabled|game genie|action replay (pro)|sonic & knuckles" }, { "genesis_plus_gx_ym2413", "Master System FM; auto|disabled|enabled" }, { "genesis_plus_gx_dac_bits", "YM2612 DAC quantization; disabled|enabled" }, - { "genesis_plus_gx_sound_output", "Sound output; mono|stereo" }, + { "genesis_plus_gx_sound_output", "Sound output; stereo|mono" }, { "genesis_plus_gx_audio_filter", "Audio filter; disabled|Lowpass" }, { "genesis_plus_gx_lowpass_range", "Low-pass filter %; 60|65|70|75|80|85|90|95|5|10|15|20|25|30|35|40|45|50|55"}, From 5cd8f6e7d39aa2e17d5d73fd4f21746fbccbdcbe Mon Sep 17 00:00:00 2001 From: LodanZark Date: Thu, 21 Sep 2017 15:13:17 +0100 Subject: [PATCH 3/3] change the Lowpass core option to lowercase change the Lowpass core option to lowercase for better consistence with other options --- libretro/libretro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 262c5c7..a1adb2b 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -1045,7 +1045,7 @@ static void check_variables(void) var.key = "genesis_plus_gx_audio_filter"; environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var); { - if (!strcmp(var.value, "Lowpass")) + if (!strcmp(var.value, "lowpass")) config.filter = 1; #if HAVE_EQ @@ -1638,7 +1638,7 @@ void retro_set_environment(retro_environment_t cb) { "genesis_plus_gx_ym2413", "Master System FM; auto|disabled|enabled" }, { "genesis_plus_gx_dac_bits", "YM2612 DAC quantization; disabled|enabled" }, { "genesis_plus_gx_sound_output", "Sound output; mono|stereo" }, - { "genesis_plus_gx_audio_filter", "Audio filter; disabled|Lowpass" }, + { "genesis_plus_gx_audio_filter", "Audio filter; disabled|lowpass" }, { "genesis_plus_gx_lowpass_range", "Low-pass filter %; 60|65|70|75|80|85|90|95|5|10|15|20|25|30|35|40|45|50|55"}, #if HAVE_EQ