Skip to content

Commit 16c516f

Browse files
mactan-scmactan
and
mactan
authored
update patch_libcuda and star citizen protonfix (#294)
Co-authored-by: mactan <[email protected]>
1 parent f04757b commit 16c516f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

gamefixes-umu/umu-starcitizen.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
"""Game fix for Star Citizen"""
22

3+
import os
34
from protonfixes import util
45

56

67
def main() -> None:
78
# patch libcuda to workaround crashes related to DLSS
89
# See: https://github.com/jp7677/dxvk-nvapi/issues/174#issuecomment-2227462795
9-
util.patch_libcuda()
10+
patched = util.patch_libcuda()
11+
if patched:
12+
# Satisfy check for the existence of these dlls when trying to initialize ngx
13+
# Copy an existing DLL to these three names
14+
env_path = os.path.join(util.protonprefix(), 'drive_c', 'windows', 'system32')
15+
dest_files = ['cryptbase.dll', 'devobj.dll', 'drvstore.dll']
16+
for file in dest_files:
17+
link_path = os.path.join(env_path, file)
18+
if not os.path.isfile(link_path):
19+
os.symlink('security.dll', link_path)
1020

1121
# RSI Launcher depends on powershell
1222
util.protontricks('powershell')
1323

1424
# RSI Launcher animation
15-
util.winedll_override('libglesv2', 'builtin')
25+
util.winedll_override('libglesv2', 'b')

util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,8 @@ def patch_libcuda() -> bool:
516516
return False
517517

518518
log.info(f'Patched libcuda.so saved to: {patched_library}')
519-
set_environment('LD_PRELOAD', patched_library)
519+
protonmain.g_session.env['LD_LIBRARY_PATH'] = f'{os.path.dirname(patched_library)}:{protonmain.g_session.env["LD_LIBRARY_PATH"]}'
520+
520521
return True
521522

522523
except Exception as e:

0 commit comments

Comments
 (0)