QTfrontend/hwform.cpp
changeset 2428 6800f8aa0184
parent 2403 6c5d504af2ba
child 2439 a1720b062b9c
--- a/QTfrontend/hwform.cpp	Mon Oct 12 13:56:07 2009 +0000
+++ b/QTfrontend/hwform.cpp	Mon Oct 12 16:44:30 2009 +0000
@@ -77,9 +77,9 @@
 
 	CustomizePalettes();
         
-        sdli = new SDLInteraction(ui.pageOptions->CBHardwareSound->isChecked());
+    sdli.setHardwareSound(ui.pageOptions->CBHardwareSound->isChecked());
         
-	ui.pageOptions->CBResolution->addItems(sdli->getResolutions());
+	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
 
 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
 
@@ -784,9 +784,11 @@
 				pRegisterServer->unregister();
 				pRegisterServer = 0;
 			}
+			setVisible(false);
 			break;
 		}
 		case gsFinished: {
+			setVisible(true);
 			GoBack();
 			Music(ui.pageOptions->CBEnableMusic->isChecked());
 			if (wBackground) wBackground->startAnimation();
@@ -795,6 +797,7 @@
 			break;
 		}
 		default: {
+			setVisible(true);
 			quint8 id = ui.Pages->currentIndex();
 			if (id == ID_PAGE_INGAME) {
 				GoBack();
@@ -889,9 +892,9 @@
 void HWForm::Music(bool checked)
 {
 	if (checked)
-		sdli->StartMusic();
+		sdli.StartMusic();
 	else
-		sdli->StopMusic();
+		sdli.StopMusic();
 }
 
 void HWForm::NetGameChangeStatus(bool isMaster)