From: <ken...@us...> - 2008-02-09 09:37:28
|
Revision: 777 http://planeshift.svn.sourceforge.net/planeshift/?rev=777&view=rev Author: kennygraunke Date: 2008-02-09 01:37:31 -0800 (Sat, 09 Feb 2008) Log Message: ----------- - Fixed bug where pssetup would no longer enable/disable sound. Modified Paths: -------------- trunk/docs/history.txt trunk/src/setup/pawssetupwindow.cpp Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-02-08 23:44:24 UTC (rev 776) +++ trunk/docs/history.txt 2008-02-09 09:37:31 UTC (rev 777) @@ -1,3 +1,6 @@ +*** 2008-02-09 by Kenny Graunke +- Fixed bug where pssetup would no longer enable/disable sound. + *** 2008-02-09 by Sasha Levin - Updater log file now uses VFS interface too. - Fixed a couple of POD errors. Modified: trunk/src/setup/pawssetupwindow.cpp =================================================================== --- trunk/src/setup/pawssetupwindow.cpp 2008-02-08 23:44:24 UTC (rev 776) +++ trunk/src/setup/pawssetupwindow.cpp 2008-02-09 09:37:31 UTC (rev 777) @@ -226,7 +226,9 @@ } // sound - cbSound->SetState(config->KeyExists("System.PlugIns.iSndSysRenderer")); + const bool nullSound = strcmp(config->GetStr("SndSys.Driver"), + "crystalspace.sndsys.software.driver.null") == 0; + cbSound->SetState(!nullSound); // all maps cbAllMaps->SetState(config->GetBool("PlaneShift.Client.Loading.AllMaps",false)); @@ -387,11 +389,15 @@ // sound enabled/disabled if (cbSound->GetState()) { - config->SetStr("System.PlugIns.iSndSysRenderer","crystalspace.sndsys.renderer.software"); + // Only delete sound driver line if it's "null"... + if (strcmp(config->GetStr("SndSys.Driver"), "crystalspace.sndsys.software.driver.null") == 0) + { + config->DeleteKey("SndSys.Driver"); + } } else { - config->DeleteKey("System.PlugIns.iSndSysRenderer"); + config->SetStr("SndSys.Driver", "crystalspace.sndsys.renderer.software.driver.null"); } // all maps This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |