mirror of
https://github.com/gurrgur/er-patcher.git
synced 2026-06-13 09:47:54 +00:00
feature: run eldenring.exe if -- is not provided
This commit is contained in:
parent
01a6e8e910
commit
e2441c7479
1 changed files with 8 additions and 2 deletions
10
er-patcher
10
er-patcher
|
|
@ -10,7 +10,10 @@ import struct
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
patcher_args = sys.argv[1:sys.argv.index("--")]
|
if "--" in sys.argv:
|
||||||
|
patcher_args = sys.argv[1:sys.argv.index("--")]
|
||||||
|
else:
|
||||||
|
patcher_args = sys.argv[1:]
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Patch Elden Ring executable and launch it without EAC.")
|
parser = argparse.ArgumentParser(description="Patch Elden Ring executable and launch it without EAC.")
|
||||||
parser.add_argument("-r", "--rate", type=int, default=60, help="Modify the frame rate limit (e.g. 30, 120, 165 or whatever).")
|
parser.add_argument("-r", "--rate", type=int, default=60, help="Modify the frame rate limit (e.g. 30, 120, 165 or whatever).")
|
||||||
|
|
@ -73,7 +76,10 @@ if __name__ == "__main__":
|
||||||
del exe_hex
|
del exe_hex
|
||||||
|
|
||||||
# start patched exe directly to avoid EAC
|
# start patched exe directly to avoid EAC
|
||||||
steam_cmd = sys.argv[1 + sys.argv.index("--"):]
|
if "--" in sys.argv:
|
||||||
|
steam_cmd = sys.argv[1 + sys.argv.index("--"):]
|
||||||
|
else:
|
||||||
|
steam_cmd = [exe_name]
|
||||||
steam_cmd[-1] = Path(steam_cmd[-1]).parent.absolute() / patched_exe_dir / exe_name
|
steam_cmd[-1] = Path(steam_cmd[-1]).parent.absolute() / patched_exe_dir / exe_name
|
||||||
subprocess.run(steam_cmd)
|
subprocess.run(steam_cmd)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue