intercept: Attempt using existing code-paths for all snapd libgl work

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2017-11-14 00:24:16 +00:00
parent cd5a1e6f97
commit 04e32cd5c5
+6 -14
View File
@@ -397,10 +397,16 @@ static bool lsi_override_replace_with_host(const char *orig_name, const char **s
char *small_name = NULL;
static const char *library_paths[] = {
#if UINTPTR_MAX == 0xffffffffffffffff
#ifdef HAVE_SNAPD_SUPPORT
"/var/lib/snapd/lib/gl",
#endif
"/usr/lib64",
"/usr/lib/x86_64-linux-gnu",
"/usr/lib",
#else
#ifdef HAVE_SNAPD_SUPPORT
"/var/lib/snapd/lib/gl32",
#endif
"/usr/lib32",
"/usr/lib/i386-linux-gnu",
"/usr/lib",
@@ -604,20 +610,6 @@ char *lsi_blacklist_vendor(unsigned int flag, const char *name)
_nica_public_ char *la_objsearch(const char *name, __lsi_unused__ uintptr_t *cookie,
unsigned int flag)
{
#ifdef HAVE_SNAPD_SUPPORT
const char *out_name = NULL;
/* Only attempt snapd overrides if snapd support is enabled */
if (lsi_override_snapd_gl(name, &out_name)) {
return (char *)out_name;
}
if (lsi_override_snapd_nvidia(name, &out_name)) {
return (char *)out_name;
}
if (lsi_override_snapd_dri(name, &out_name)) {
return (char *)out_name;
}
#endif
switch (work_mode) {
case INTERCEPT_MODE_STEAM:
return lsi_search_steam(name);