QTfrontend/hwform.cpp
changeset 2399 ddde0ac1472b
parent 2395 d01d3bf3e1de
child 2400 2422ea85d100
--- a/QTfrontend/hwform.cpp	Sun Sep 27 20:25:49 2009 +0000
+++ b/QTfrontend/hwform.cpp	Sun Sep 27 22:25:27 2009 +0000
@@ -73,8 +73,10 @@
 	ui.setupUi(this);
 
 	CustomizePalettes();
-
-	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
+        
+        sdli = new SDLInteraction(ui.pageOptions->CBHardwareSound->isChecked());
+        
+	ui.pageOptions->CBResolution->addItems(sdli->getResolutions());
 
 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
 
@@ -876,9 +878,9 @@
 void HWForm::Music(bool checked)
 {
 	if (checked)
-		sdli.StartMusic(ui.pageOptions->CBHardwareSound->isChecked());
+		sdli->StartMusic();
 	else
-		sdli.StopMusic();
+		sdli->StopMusic();
 }
 
 void HWForm::NetGameChangeStatus(bool isMaster)