diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-08-16 13:13:31 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-08-16 13:13:31 +0200 |
commit | cd0a765f66176be12fc46184e35eb45a796e310a (patch) | |
tree | e5f77d34b977176fcca7f24f7d95c038bc928ddf /src/core | |
parent | Remove not needed entry from config (diff) | |
parent | Remove not needed entry from config (diff) | |
download | re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.gz re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.bz2 re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.lz re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.xz re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.zst re3-cd0a765f66176be12fc46184e35eb45a796e310a.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/common.h | 2 | ||||
-rw-r--r-- | src/core/re3.cpp | 4 |
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); |