Fix proton wrapper search
This commit is contained in:
parent
7eee31c3e2
commit
127728d329
|
@ -13,12 +13,12 @@ from rare.utils.extra_widgets import PathEdit
|
||||||
|
|
||||||
def find_proton_wrappers():
|
def find_proton_wrappers():
|
||||||
possible_proton_wrappers = []
|
possible_proton_wrappers = []
|
||||||
try:
|
compatibilitytools_dirs = [
|
||||||
compatibilitytools_dirs = [
|
os.path.expanduser("~/.steam/steam/steamapps/common"),
|
||||||
os.path.expanduser("~/.steam/steam/steamapps/common"),
|
"/usr/share/steam/compatibilitytools.d"
|
||||||
"/usr/share/steam/compatibilitytools.d"
|
]
|
||||||
]
|
for c in compatibilitytools_dirs:
|
||||||
for c in compatibilitytools_dirs:
|
if os.path.exists(c):
|
||||||
for i in os.listdir(c):
|
for i in os.listdir(c):
|
||||||
proton = os.path.join(c, i, "proton")
|
proton = os.path.join(c, i, "proton")
|
||||||
compatibilitytool = os.path.join(c, i, "compatibilitytool.vdf")
|
compatibilitytool = os.path.join(c, i, "compatibilitytool.vdf")
|
||||||
|
@ -26,7 +26,7 @@ def find_proton_wrappers():
|
||||||
if os.path.exists(proton) and (os.path.exists(compatibilitytool) or os.path.exists(toolmanifest)):
|
if os.path.exists(proton) and (os.path.exists(compatibilitytool) or os.path.exists(toolmanifest)):
|
||||||
wrapper = '"' + proton + '" run'
|
wrapper = '"' + proton + '" run'
|
||||||
possible_proton_wrappers.append(wrapper)
|
possible_proton_wrappers.append(wrapper)
|
||||||
except FileNotFoundError as e:
|
if not possible_proton_wrappers:
|
||||||
print("Unable to find any Proton version")
|
print("Unable to find any Proton version")
|
||||||
return possible_proton_wrappers
|
return possible_proton_wrappers
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue