From f2dddd9f88588975b1cb7e86f4ce2f85e32f027c Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Wed, 11 Oct 2017 00:15:52 +0100 Subject: [PATCH] intercept: Catch the last of the SDL offenders like steamwebhelper This now ensures steamwebhelper is also using our SDL as it was previously loading from a relative location. This actually fixes issues on my local system whereby the steam trailer videos couldn't full screen properly, now using our own SDL, they can. Signed-off-by: Ikey Doherty --- src/intercept/main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/intercept/main.c b/src/intercept/main.c index 4fa9e0e..044a644 100644 --- a/src/intercept/main.c +++ b/src/intercept/main.c @@ -152,19 +152,26 @@ _nica_public_ char *la_objsearch(const char *name, __lsi_unused__ uintptr_t *coo "panorama", "libpangoft2-1.0.so", "libpango-1.0.so", + + /* steamwebhelper */ + "libcef.so", }; - /* Find out if its a Steam private lib.. */ - if (name && strstr(name, "Steam/ubuntu12_")) { + /* Find out if it exists */ + bool file_exists = nc_file_exists(name); + + /* Find out if its a Steam private lib.. These are relative "./" files too! */ + if (name && (strstr(name, "/Steam/") || strncmp(name, "./", 2) == 0)) { for (size_t i = 0; i < ARRAY_SIZE(steam_allowed); i++) { if (strstr(name, steam_allowed[i])) { return (char *)name; } } /* If LSI_DEBUG is set, spam it. */ - if (getenv("LSI_DEBUG")) { + if (getenv("LSI_DEBUG") && file_exists) { emit_overriden_lib(name); } + return NULL; }