aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-06-24 13:00:08 -0700
committerChris Robinson <[email protected]>2022-06-24 13:00:08 -0700
commit7494fe5736fb63c181354d8219524b88165430f6 (patch)
tree2d4a012940935b28590ce95135d85f129f45f709 /alc
parent05f5faf2655f4a51c69bfaacd4f67a740429f0dc (diff)
Fix the PipeWire version check
PW_CHECK_VERSION checks if the header version is equal to or newer than the values specified, it can't be used to check if the library version is equal to or newer than the header version.
Diffstat (limited to 'alc')
-rw-r--r--alc/backends/pipewire.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index 3cef0b2a..1a2cb8ea 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -135,7 +135,8 @@ bool check_version(const char *version)
*/
int major{0}, minor{0}, revision{0};
int ret{sscanf(version, "%d.%d.%d", &major, &minor, &revision)};
- if(ret == 3 && PW_CHECK_VERSION(major, minor, revision))
+ if(ret == 3 && (major > PW_MAJOR || (major == PW_MAJOR && minor > PW_MINOR)
+ || (major == PW_MAJOR && minor == PW_MINOR && revision >= PW_MICRO)))
return true;
return false;
}