summaryrefslogtreecommitdiffstats
path: root/src/audio/DMAudio.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 18:16:37 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 18:16:37 +0200
commita6aa782d6d5fa9a2165dafec5794a2e2cfbc653f (patch)
treedea344ffa5b7073b94b94a35dee13519fbc04b82 /src/audio/DMAudio.cpp
parentUpload to bintray when creating tags (diff)
downloadre3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.gz
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.bz2
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.lz
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.xz
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.zst
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.zip
Diffstat (limited to 'src/audio/DMAudio.cpp')
-rw-r--r--src/audio/DMAudio.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 7174c23c..17963cc9 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -118,7 +118,12 @@ int8 cDMAudio::AutoDetect3DProviders(void)
for ( int32 i = 0; i < GetNum3DProvidersAvailable(); i++ )
{
wchar buff[64];
-
+
+#ifdef AUDIO_OAL
+ if (defaultProvider >= 0 && defaultProvider < GetNum3DProvidersAvailable()) {
+ return i;
+ }
+#endif
char *name = Get3DProviderName(i);
AsciiToUnicode(name, buff);
char *providername = UnicodeToAscii(buff);