diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-11 20:21:09 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-11 20:21:09 +0200 |
commit | 9b23e33c36facdad4b6f669501dbee7fa82ef50a (patch) | |
tree | 3f81b31669c2187720881afa07e2ed3db93d6694 /src/core/Game.cpp | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.tar re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.tar.gz re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.tar.bz2 re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.tar.lz re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.tar.xz re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.tar.zst re3-9b23e33c36facdad4b6f669501dbee7fa82ef50a.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); |