diff options
author | aap <aap@papnet.eu> | 2020-05-11 22:21:26 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-11 22:21:26 +0200 |
commit | 0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2 (patch) | |
tree | 16bf11e0e8a0353448a643322e9511e8ba659fca /src/core/Game.cpp | |
parent | CVisibilityPlugins (diff) | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.gz re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.bz2 re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.lz re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.xz re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.zst re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.zip |
Diffstat (limited to 'src/core/Game.cpp')
-rw-r--r-- | src/core/Game.cpp | 19 |
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); |