summaryrefslogtreecommitdiffstats
path: root/src/core/Game.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-11 20:07:12 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-11 20:07:12 +0200
commit0aa7f13c32ea1991f4663f5eff1c37478fdf736f (patch)
treea994ac3a72f9b65dfe6648d3086d4415fe2b1234 /src/core/Game.cpp
parentlittle fix for cam (diff)
parentremove aps from premake (diff)
downloadre3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar
re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.gz
re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.bz2
re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.lz
re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.xz
re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.zst
re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.zip
Diffstat (limited to 'src/core/Game.cpp')
-rw-r--r--src/core/Game.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 3ea85659..2ba3ae3a 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -221,22 +221,9 @@ bool CGame::InitialiseOnceAfterRW(void)
if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
{
CMenuManager::m_PrefsSpeakers = 0;
-
- for ( int32 i = 0; i < DMAudio.GetNum3DProvidersAvailable(); i++ )
- {
- wchar buff[64];
-
- char *name = DMAudio.Get3DProviderName(i);
- AsciiToUnicode(name, buff);
- char *providername = UnicodeToAscii(buff);
- strupr(providername);
-
- if ( !strcmp(providername, "MILES FAST 2D POSITIONAL AUDIO") )
- {
- FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = i;
- break;
- }
- }
+ int8 provider = DMAudio.AutoDetect3DProviders();
+ if ( provider != -1 )
+ FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider;
}
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);