gtk: correct audio state with --disable-sound

Audio enabled check was always set even if called with
--disable-sound.

Fix #3574138
This commit is contained in:
riccardom 2013-01-12 15:06:53 +00:00
parent d46f75c188
commit 34e6c5a5f5
1 changed files with 6 additions and 0 deletions

View File

@ -2177,6 +2177,12 @@ common_gtk_main( class configured_features *my_config)
gtk_action_group_add_actions(action_group, action_entries, G_N_ELEMENTS(action_entries), NULL);
gtk_action_group_add_toggle_actions(action_group, toggle_entries, G_N_ELEMENTS(toggle_entries), NULL);
/* Update audio toggle status */
if (my_config->disable_sound) {
GtkAction *action = gtk_action_group_get_action(action_group, "enableaudio");
if (action)
gtk_toggle_action_set_active((GtkToggleAction *)action, FALSE);
}
desmume_gtk_menu_emulation_layers(action_group);
desmume_gtk_menu_file_saveload_slot(action_group);
desmume_gtk_menu_tools(action_group);