mirror of
https://github.com/gurrgur/er-patcher.git
synced 2026-06-13 09:47:54 +00:00
fix: save memory
This commit is contained in:
parent
db368aa371
commit
9dc4e6d6da
1 changed files with 3 additions and 2 deletions
|
|
@ -23,8 +23,7 @@ if __name__ == "__main__":
|
|||
|
||||
exe_name = Path("eldenring.exe")
|
||||
with open(exe_name, "rb") as f:
|
||||
exe = f.read()
|
||||
exe_hex = exe.hex()
|
||||
exe_hex = f.read().hex()
|
||||
|
||||
if patch.rate != 60 and patch.rate > 0:
|
||||
exe_hex = exe_hex.replace(
|
||||
|
|
@ -71,6 +70,8 @@ if __name__ == "__main__":
|
|||
with open(patched_exe_dir / exe_name, "wb") as f:
|
||||
f.write(bytes.fromhex(exe_hex))
|
||||
|
||||
del exe_hex
|
||||
|
||||
# start patched exe directly to avoid EAC
|
||||
steam_cmd = sys.argv[1 + sys.argv.index("--"):]
|
||||
steam_cmd[-1] = Path(steam_cmd[-1]).parent.absolute() / patched_exe_dir / exe_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue