From 34e6c5a5f566decc8787978e59948532832a7f7e Mon Sep 17 00:00:00 2001 From: riccardom Date: Sat, 12 Jan 2013 15:06:53 +0000 Subject: [PATCH] gtk: correct audio state with --disable-sound Audio enabled check was always set even if called with --disable-sound. Fix #3574138 --- desmume/src/gtk/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index 184bbd543..c5f190f57 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -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);