More sanity checking.

This commit is contained in:
Brandon Wright 2018-06-07 16:16:22 -05:00
parent 3578139270
commit 651ec0bf7e
2 changed files with 10 additions and 0 deletions

View File

@ -699,6 +699,11 @@ Snes9xPreferences::move_settings_to_dialog (void)
set_check ("mute_sound_check", config->mute_sound);
set_check ("mute_sound_turbo_check", config->mute_sound_turbo);
set_slider ("sound_input_rate", config->sound_input_rate);
if (top_level->get_auto_input_rate () == 0)
{
config->auto_input_rate = 0;
gtk_widget_set_sensitive (get_widget ("auto_input_rate"), FALSE);
}
set_check ("auto_input_rate", config->auto_input_rate);
gtk_widget_set_sensitive (get_widget("sound_input_rate"),
config->auto_input_rate ? FALSE : TRUE);

View File

@ -130,6 +130,11 @@ S9xPortSoundInit (void)
if (gui_config->auto_input_rate)
{
Settings.SoundInputRate = top_level->get_auto_input_rate ();
if (Settings.SoundInputRate == 0.0)
{
Settings.SoundInputRate = 31950;
gui_config->auto_input_rate = 0;
}
}
else
{