From 9648c026a9a78d0116ed44097af9577e823c1388 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Oct 2019 20:36:18 +0200 Subject: [PATCH] - small adjustments --- source/blood/src/menu.cpp | 2 +- source/common/gamecvars.cpp | 2 +- source/common/gamecvars.h | 1 + source/duke3d/src/menus.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blood/src/menu.cpp b/source/blood/src/menu.cpp index b8357f143..1e0c5b8cc 100644 --- a/source/blood/src/menu.cpp +++ b/source/blood/src/menu.cpp @@ -1835,7 +1835,7 @@ void SetSound(CGameMenuItemChain *pItem) UNREFERENCED_PARAMETER(pItem); snd_mixrate = nSoundRateValues[itemOptionsSoundSampleRate.m_nFocus]; snd_numvoices = itemOptionsSoundNumVoices.nValue; - MusicDevice = nMusicDeviceValues[itemOptionsSoundMusicDevice.m_nFocus]; + mus_device = nMusicDeviceValues[itemOptionsSoundMusicDevice.m_nFocus]; sfxTerm(); sndTerm(); diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index 65fb5328c..d8dc6b4c9 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -154,7 +154,7 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus if (self > 255) self = 255; } -int MusicDevice; +int MusicDevice = 1; CUSTOM_CVARD(Int, mus_device, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "selects music device") { if (self < 0) self = 0; diff --git a/source/common/gamecvars.h b/source/common/gamecvars.h index 8d35f4478..2c5f16df6 100644 --- a/source/common/gamecvars.h +++ b/source/common/gamecvars.h @@ -48,6 +48,7 @@ EXTERN_CVAR(Int, snd_numchannels) EXTERN_CVAR(Int, snd_numvoices) EXTERN_CVAR(Int, snd_speech) EXTERN_CVAR(Int, mus_volume) +EXTERN_CVAR(Int, mus_device) extern int MusicDevice; EXTERN_CVAR(Int, hud_layout) diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 717618ef9..4fb15a524 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -3237,7 +3237,7 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry) { snd_mixrate = soundrate; snd_numvoices = soundvoices; - MusicDevice = musicdevice; + mus_device = musicdevice; S_SoundShutdown(); S_MusicShutdown();