pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/sound sound.cxx,1.3,1.4


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/sound sound.cxx,1.3,1.4
Date: 12 Apr 2003 15:33:32 -0000

Update of /var/lib/cvs/Games/Pingus/src/sound
In directory dark:/tmp/cvs-serv24157/sound

Modified Files:
        sound.cxx 
Log Message:
added catch to disable sound on problems from CL_SetupSound::init()

Index: sound.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/sound/sound.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sound.cxx   4 Mar 2003 13:59:44 -0000       1.3
+++ sound.cxx   12 Apr 2003 15:33:30 -0000      1.4
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <ClanLib/Core/System/error.h>
 #include <iostream>
 #include <assert.h>
 #include "../path_manager.hxx"
@@ -37,8 +38,14 @@
         {
           if (verbose)
             std::cout << "Init Sound" << std::endl;
-
-          PingusSound::init (new PingusSoundReal ());
+          
+          try {
+            PingusSound::init (new PingusSoundReal ());
+          } catch (CL_Error& err) {
+            std::cout << "CL_Error: " << err.message << std::endl;
+            std::cout << "Sound will be disabled" << std::endl;
+            PingusSound::init (new PingusSoundDummy ());
+          }
         }
       else
         {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]