From aa2f1b6b294b74d87d7e6d9e21ed276011a417ca Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sun, 13 Sep 2020 21:45:42 +0300 Subject: vehicle audio(first part) and temp fix for openAL --- src/core/Frontend.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index cdecb8b4..9c33d48a 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -1121,15 +1121,19 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen) rightText = TheText.Get("FEA_ADP"); else { char* provider = DMAudio.Get3DProviderName(m_nPrefsAudio3DProviderIndex); - - if (!strcmp(strupr(provider), "DIRECTSOUND3D HARDWARE SUPPORT")) { - strcpy(provider, "DSOUND3D HARDWARE SUPPORT"); + if (provider != NULL) { + if (!strcmp(strupr(provider), "DIRECTSOUND3D HARDWARE SUPPORT")) { + strcpy(provider, "DSOUND3D HARDWARE SUPPORT"); + } + else if (!strcmp(strupr(provider), "DIRECTSOUND3D SOFTWARE EMULATION")) { + strcpy(provider, "DSOUND3D SOFTWARE EMULATION"); + } + AsciiToUnicode(provider, unicodeTemp); + rightText = unicodeTemp; } - else if (!strcmp(strupr(provider), "DIRECTSOUND3D SOFTWARE EMULATION")) { - strcpy(provider, "DSOUND3D SOFTWARE EMULATION"); + else { + rightText = TheText.Get("not defined"); } - AsciiToUnicode(provider, unicodeTemp); - rightText = unicodeTemp; } break; case MENUACTION_SPEAKERCONF: { -- cgit v1.2.3