mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-07-31 01:21:42 +03:00
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 <amoss@nvidia.com>
This commit is contained in:
parent
f7b8a814cb
commit
ae13658e1f
11
proton
11
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user