attempt to dlopen libddcutil.so.5 first

The backwards-incompatible changes in libddcutil.so.5 are documented at
https://www.ddcutil.com/c_api_200/ - a quick grep says that the only affected
symbol appearing in E is ddca_set_global_sleep_multiplier (which is already
optional).

This change does not make any of the changes suggested in the "Library
Initialization" section of the above doc.
This commit is contained in:
Ross Vandegrift 2024-03-24 21:21:15 -07:00
parent 4e32c90b7d
commit 9c4b442335
1 changed files with 8 additions and 3 deletions

View File

@ -304,9 +304,14 @@ err:
static Eina_Bool
_ddc_init(void)
{
// .so.3 is ABI compatible twith .so.2 for out uses - see
// https://www.ddcutil.com/c_api_99/ for changes between them
ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
// .so.[345] are ABI compatible with .so.2 for our uses - see
// the changes listed at:
// - https://www.ddcutil.com/c_api_99/
// - https://www.ddcutil.com/c_api_120/
// - https://www.ddcutil.com/c_api_200/
ddc_lib = dlopen("libddcutil.so.5", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
ddc_lib = dlopen("libddcutil.so.3", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)