mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 15:47:20 +02:00
Attempt to load unversioned library for compatibility with older installations
Games built against a new gamemode_client.h will fail to work with older GameMode installations without this change. There are no ABI changes right now so just attempt to load the old unversioned path if loading the versioned one fails.
This commit is contained in:
parent
2ae86fabd6
commit
7051051f19
@ -154,12 +154,18 @@ __attribute__((always_inline)) static inline int internal_load_libgamemode(void)
|
|||||||
/* Try and load libgamemode */
|
/* Try and load libgamemode */
|
||||||
libgamemode = dlopen("libgamemode.so.0", RTLD_NOW);
|
libgamemode = dlopen("libgamemode.so.0", RTLD_NOW);
|
||||||
if (!libgamemode) {
|
if (!libgamemode) {
|
||||||
snprintf(internal_gamemode_client_error_string,
|
/* Attempt to load unversioned library for compatibility with older
|
||||||
sizeof(internal_gamemode_client_error_string),
|
* versions (as of writing, there are no ABI changes between the two -
|
||||||
"dylopen failed - %s",
|
* this may need to change if ever ABI-breaking changes are made) */
|
||||||
dlerror());
|
libgamemode = dlopen("libgamemode.so", RTLD_NOW);
|
||||||
internal_libgamemode_loaded = -1;
|
if (!libgamemode) {
|
||||||
return -1;
|
snprintf(internal_gamemode_client_error_string,
|
||||||
|
sizeof(internal_gamemode_client_error_string),
|
||||||
|
"dlopen failed - %s",
|
||||||
|
dlerror());
|
||||||
|
internal_libgamemode_loaded = -1;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Attempt to bind all symbols */
|
/* Attempt to bind all symbols */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user