From ae13658e1f8279386a3d2e845a5667ea2566848f Mon Sep 17 00:00:00 2001 From: Liam Middlebrook Date: Wed, 9 Jun 2021 09:43:04 -0700 Subject: [PATCH] proton: Simplify find_nvidia_wine_dll_dir libdl discovery After testing DLSS+Proton on a different system than I normally use I discovered that the call to `find_library("dl")` wasn't properly discovering libdl.so.2 To simplify things here, just remove usage of find_library altogether. Reviewed-by: Adam Moss --- proton | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/proton b/proton index 3caedaf7..eb2150f5 100755 --- a/proton +++ b/proton @@ -23,7 +23,6 @@ from ctypes import cast from ctypes import c_int from ctypes import c_char_p from ctypes import c_void_p -from ctypes.util import find_library from filelock import FileLock @@ -155,14 +154,8 @@ def try_get_game_library_dir(): # On failure, returns None def find_nvidia_wine_dll_dir(): try: - libdl_soname = find_library("dl") - - # If we couldn't determine the proper soname for libdl, bail out. - if libdl_soname is None: - return None - - libdl = CDLL(libdl_soname) - except (FileNotFoundError, OSError): + libdl = CDLL("libdl.so.2") + except (OSError): return None try: