From a80775a1e8b78e7c595e0c1f993a16b2d83da62b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Mar 2021 08:40:34 +0100 Subject: [PATCH] - adapt mod_dumb_mastervolume to the increased default volume in ZMusic. --- src/gameconfigfile.cpp | 10 ++++++++++ src/version.h | 2 +- wadsrc/static/menudef.txt | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 59811fcdba2..856d29f2176 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -600,6 +600,16 @@ void FGameConfigFile::DoGlobalSetup () old_targets |= (old_targets & 1) ? 8 : 0; gl_texture_hqresize_targets = old_targets; } + if (last < 222) + { + 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/src/version.h b/src/version.h index babe3783dca..feda6ffae9e 100644 --- a/src/version.h +++ b/src/version.h @@ -65,7 +65,7 @@ const char *GetVersionString(); // Version stored in the ini's [LastRun] section. // Bump it if you made some configuration change that you want to // be able to migrate in FGameConfigFile::DoGlobalSetup(). -#define LASTRUNVERSION "221" +#define LASTRUNVERSION "222" // Protocol version used in demos. // Bump it if you change existing DEM_ commands or add new ones. diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 49fd1e6b5f4..6e0d76d7b96 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -2052,7 +2052,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.5, 1 Option "$ADVSNDMNU_SAMPLERATE", "mod_samplerate", "SampleRates" Option "$MODMNU_QUALITY", "mod_interp", "ModQuality" Option "$MODMNU_VOLUMERAMPING", "mod_volramp", "ModVolumeRamps"