From 524cec907adcaf03f53f376b7aeb87bd453f9085 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 24 Mar 2018 14:47:18 -0230 Subject: [PATCH] Updated Windows build to support SDL 2.0.8. --- Changes.txt | 2 ++ src/common/SoundSDL2.cxx | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Changes.txt b/Changes.txt index 5de411fb7..b56964a1d 100644 --- a/Changes.txt +++ b/Changes.txt @@ -23,6 +23,8 @@ * Fixed bug in UI navigation with joystick hat movement. + * Updated version of SDL included with the Windows build to 2.0.8. + -Have fun! diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx index 40c22a2b8..0fb5f2cb1 100644 --- a/src/common/SoundSDL2.cxx +++ b/src/common/SoundSDL2.cxx @@ -46,6 +46,13 @@ SoundSDL2::SoundSDL2(OSystem& osystem) { myOSystem.logMessage("SoundSDL2::SoundSDL2 started ...", 2); +#ifdef BSPF_WINDOWS + // TODO - remove the following code once we convert to the new sound + // core, and use 32-bit floating point samples and do + // our own resampling + SDL_setenv("SDL_AUDIODRIVER", "directsound", true); +#endif + // The sound system is opened only once per program run, to eliminate // issues with opening and closing it multiple times // This fixes a bug most prevalent with ATI video cards in Windows,