From 04e32cd5c5f2158a74dde44bf72bb156e6d73e24 Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Tue, 14 Nov 2017 00:24:16 +0000 Subject: [PATCH] intercept: Attempt using existing code-paths for all snapd libgl work Signed-off-by: Ikey Doherty --- src/intercept/main.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/intercept/main.c b/src/intercept/main.c index c1b473d..8d63987 100644 --- a/src/intercept/main.c +++ b/src/intercept/main.c @@ -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);