From aa789c76050ca717917e5f322158a1e91ac44827 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Mar 2021 08:51:59 +0100 Subject: [PATCH] - adapt to changed value range of module master volume in ZMusic. The default was far too quiet and had to be increased to let the player have comparable output to the rest of the music system. --- source/core/gameconfigfile.cpp | 14 ++++++++++++-- wadsrc/static/menudef.txt | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/source/core/gameconfigfile.cpp b/source/core/gameconfigfile.cpp index f34e9076a..582508017 100644 --- a/source/core/gameconfigfile.cpp +++ b/source/core/gameconfigfile.cpp @@ -45,7 +45,7 @@ #include "gamecontrol.h" #include "version.h" -#define LASTRUNVERSION "1" +#define LASTRUNVERSION "2" #if !defined _MSC_VER && !defined __APPLE__ #include "i_system.h" // for SHARE_DIR @@ -253,7 +253,17 @@ void FGameConfigFile::DoGlobalSetup () const char *lastver = GetValueForKey ("Version"); if (lastver != NULL) { - //double last = atof (lastver); + double last = atof (lastver); + if (last < 2) + { + auto var = FindCVar("mod_dumb_mastervolume", NULL); + if (var != NULL) + { + UCVarValue v = var->GetGenericRep(CVAR_Float); + v.Float /= 4.f; + if (v.Float < 1.f) v.Float = 1.f; + } + } } } } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index ef0f905b0..35e2a9cb1 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1400,7 +1400,7 @@ OptionValue ModVolumeRamps OptionMenu ModReplayerOptions protected { Title "$MODMNU_TITLE" - Slider "$MODMNU_MASTERVOLUME", "mod_dumb_mastervolume", 1, 16, 0.5, 1 + Slider "$MODMNU_MASTERVOLUME", "mod_dumb_mastervolume", 0.25, 4, 0.1, 1 Option "$ADVSNDMNU_SAMPLERATE", "mod_samplerate", "SampleRates2" Option "$MODMNU_QUALITY", "mod_interp", "ModQuality" Option "$MODMNU_VOLUMERAMPING", "mod_volramp", "ModVolumeRamps"