Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > d32ba3f0dd70f1f3218a900d6354f68c > files > 1

ltris-000705-2mdk.src.rpm

--- ltris/ltris/soundserver.cpp~	Mon Apr 17 17:40:09 2000
+++ ltris/ltris/soundserver.cpp	Thu Sep 28 23:56:14 2000
@@ -45,10 +45,7 @@
 	spec.callback = SndSrv_Callback;
 	spec.userdata = 0;
 	spec.samples = 128;
-	if (SDL_OpenAudio(&spec, 0) < 0) {
-		printf("sndsrv: ERROR: open: %s\n", SDL_GetError());
-		return RET_ERROR;
-	}
+	ok = (SDL_OpenAudio(&spec, 0) >= 0);
 	Pause(0);
 	playing = 0;
 	sleeping = 0;
@@ -131,7 +128,7 @@
 
 void SoundServer::Activate(int a)
 {
-	sleeping = !a;
+  if (ok) sleeping = !a;
 }
 
 int SoundServer::Sleeping()
@@ -159,4 +156,4 @@
 	}
 }
 
-#endif
\ No newline at end of file
+#endif
--- ltris/ltris/soundserver.h~	Mon Apr 17 17:39:51 2000
+++ ltris/ltris/soundserver.h	Thu Sep 28 23:54:38 2000
@@ -51,6 +51,7 @@
 private:
 	SDL_AudioSpec	spec;
 	Track			*tracks;
+        int  ok;
 	int				track_num;
 	char			volume;
 	int				playing;