gtk: fixed bug where sound would not init if sound was toggled on before the game was loaded

This commit is contained in:
punkrockguy318 2011-02-03 00:27:38 +00:00
parent a0b2915c68
commit 0e09dcfecd
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@ opts.AddVariables(
BoolVariable('DEBUG', 'Build with debugging symbols', 1), BoolVariable('DEBUG', 'Build with debugging symbols', 1),
BoolVariable('LUA', 'Enable Lua support', 1), BoolVariable('LUA', 'Enable Lua support', 1),
BoolVariable('NEWPPU', 'Enable new PPU core', 1), BoolVariable('NEWPPU', 'Enable new PPU core', 1),
BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 0), BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 1),
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'), BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1), BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 0) BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 0)

View File

@ -969,6 +969,7 @@ void toggleSound(GtkWidget* check, gpointer data)
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))) if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)))
{ {
g_config->setOption("SDL.Sound", 1); g_config->setOption("SDL.Sound", 1);
if(GameInfo)
InitSound(); InitSound();
} }
else else