fix: save memory

This commit is contained in:
Donal Cahill 2022-03-09 03:30:31 +00:00
parent db368aa371
commit 9dc4e6d6da

View file

@ -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