summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-16 14:13:31 +0300
committerSergeanur <s.anureev@yandex.ua>2021-08-16 14:13:31 +0300
commitcd0a765f66176be12fc46184e35eb45a796e310a (patch)
treee5f77d34b977176fcca7f24f7d95c038bc928ddf
parent76f2191476317e89ae148be0f989c275299333fa (diff)
parentbcb5b4f94d57d4b2ca65c4972f1d09b11a421b49 (diff)
Merge branch 'master' into miami
# Conflicts: # src/audio/AudioCollision.cpp # src/audio/AudioLogic.cpp # src/audio/AudioManager.cpp # src/audio/AudioManager.h # src/audio/sampman.h # src/audio/sampman_miles.cpp # src/core/Frontend.cpp # src/core/MenuScreens.cpp # src/core/MenuScreensCustom.cpp # src/core/common.h # src/core/config.h # src/vehicles/Automobile.cpp
-rw-r--r--src/core/common.h2
-rw-r--r--src/core/re3.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 21337e21..12c80b71 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -296,7 +296,7 @@ extern wchar *AllocUnicode(const char*src);
#define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
-#define Clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
+#define Clamp2(v, center, radius) ((v) > (center) ? Min(v, center + radius) : Max(v, center - radius))
inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 614e8687..d3b1f266 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -501,8 +501,10 @@ bool LoadINISettings()
ReadIniIfExists("Audio", "MusicVolume", &FrontEndMenuManager.m_PrefsMusicVolume);
ReadIniIfExists("Audio", "MP3BoostVolume", &FrontEndMenuManager.m_PrefsMP3BoostVolume);
ReadIniIfExists("Audio", "Radio", &FrontEndMenuManager.m_PrefsRadioStation);
+#ifdef EXTERNAL_3D_SOUND
ReadIniIfExists("Audio", "SpeakerType", &FrontEndMenuManager.m_PrefsSpeakers);
ReadIniIfExists("Audio", "Provider", &FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
+#endif
ReadIniIfExists("Audio", "DynamicAcoustics", &FrontEndMenuManager.m_PrefsDMA);
ReadIniIfExists("Display", "Brightness", &FrontEndMenuManager.m_PrefsBrightness);
ReadIniIfExists("Display", "DrawDistance", &FrontEndMenuManager.m_PrefsLOD);
@@ -608,8 +610,10 @@ void SaveINISettings()
StoreIni("Audio", "MusicVolume", FrontEndMenuManager.m_PrefsMusicVolume);
StoreIni("Audio", "MP3BoostVolume", FrontEndMenuManager.m_PrefsMP3BoostVolume);
StoreIni("Audio", "Radio", FrontEndMenuManager.m_PrefsRadioStation);
+#ifdef EXTERNAL_3D_SOUND
StoreIni("Audio", "SpeakerType", FrontEndMenuManager.m_PrefsSpeakers);
StoreIni("Audio", "Provider", FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
+#endif
StoreIni("Audio", "DynamicAcoustics", FrontEndMenuManager.m_PrefsDMA);
StoreIni("Display", "Brightness", FrontEndMenuManager.m_PrefsBrightness);
StoreIni("Display", "DrawDistance", FrontEndMenuManager.m_PrefsLOD);