[planetblupi] 06/13: Prefer directsound over winmm under Windows

Didier Raboud odyx at moszumanska.debian.org
Tue Feb 6 19:50:09 UTC 2018


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository planetblupi.

commit 6975b664b9a4d679a2b4d907c2931bfc18e0c81c
Author: Mathieu Schroeter <mathieu at schroetersa.ch>
Date:   Wed Jan 31 23:38:27 2018 +0100

    Prefer directsound over winmm under Windows
---
 src/blupi.cxx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/blupi.cxx b/src/blupi.cxx
index 71b57df..1c83429 100644
--- a/src/blupi.cxx
+++ b/src/blupi.cxx
@@ -709,6 +709,11 @@ DoInit (int argc, char * argv[], bool & exit)
     return EXIT_FAILURE;
   }
 
+#ifdef _WIN32
+  /* Fix laggy sounds on Windows by not using winmm driver. */
+  SDL_setenv ("SDL_AUDIODRIVER", "directsound", true);
+#endif /* _WIN32 */
+
   auto res = SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER);
   if (res < 0)
   {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/planetblupi.git



More information about the Pkg-games-commits mailing list