aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2015-03-06 02:27:48 +0100
committerEinar Johan Trøan Sømåen2015-03-06 02:27:48 +0100
commit07623530f328f7eabf29dc76484504093ff7fd94 (patch)
tree7b99a89818b78e2fd42a5d877dda25754e09c74f
parent2d858d817fb9e11f084d176211328e72dc9fd4df (diff)
downloadscummvm-rg350-07623530f328f7eabf29dc76484504093ff7fd94.tar.gz
scummvm-rg350-07623530f328f7eabf29dc76484504093ff7fd94.tar.bz2
scummvm-rg350-07623530f328f7eabf29dc76484504093ff7fd94.zip
SDL: Special case the call to SDL_CreateThread for SDL2, since SDL2 requires threads to be named.
- Fixes compilation on OS X with SDL2 enabled, SDL1 builds should be entirely unaffected.
-rw-r--r--backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
index d59b0ebdfc..e5f63dc908 100644
--- a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
+++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
@@ -53,7 +53,11 @@ void DoubleBufferSDLMixerManager::startAudio() {
_soundThreadIsRunning = true;
// Finally start the thread
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ _soundThread = SDL_CreateThread(mixerProducerThreadEntry, "ScummVM Double Buffer Mixer", this);
+#else
_soundThread = SDL_CreateThread(mixerProducerThreadEntry, this);
+#endif
SdlMixerManager::startAudio();
}