mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-26 12:21:39 +00:00
Allow music attenuation to be enabled on Linux
This commit is contained in:
parent
6b95a6d193
commit
d53e55e056
1 changed files with 7 additions and 1 deletions
|
|
@ -20,13 +20,19 @@ static be<float>* GetVolume(bool isMusic = true)
|
||||||
|
|
||||||
bool AudioPatches::CanAttenuate()
|
bool AudioPatches::CanAttenuate()
|
||||||
{
|
{
|
||||||
#if _WIN32
|
#if defined(_WIN32) || defined(__linux__)
|
||||||
if (m_isAttenuationSupported >= 0)
|
if (m_isAttenuationSupported >= 0)
|
||||||
return m_isAttenuationSupported;
|
return m_isAttenuationSupported;
|
||||||
|
|
||||||
auto version = os::version::GetOSVersion();
|
auto version = os::version::GetOSVersion();
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
m_isAttenuationSupported = version.Major >= 10 && version.Build >= 17763;
|
m_isAttenuationSupported = version.Major >= 10 && version.Build >= 17763;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
m_isAttenuationSupported = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
return m_isAttenuationSupported;
|
return m_isAttenuationSupported;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue