Feat: Added option to run game with EAC enabled

This commit is contained in:
João Pedro Rodrigues Prates Braz 2022-04-21 00:54:22 -03:00
parent 0ec730fe89
commit 771663eabf

View file

@ -17,6 +17,7 @@ if __name__ == "__main__":
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("--with-eac", action='store_true', help="Run game with EAC (Use at own your risk)")
parser.add_argument("--fix-camera", action='store_true', help="Disable camera auto-rotation.")
parser.add_argument("--all", action='store_true', help="Enable all options except rate adjustment and gamplay changes like `--fix-camera`.")
parser.add_argument("-u", "--ultrawide", action='store_true', help="Removes black bars when using a resolution with an aspect ratio other than 16:9.")
@ -133,7 +134,7 @@ if __name__ == "__main__":
# start patched exe directly to avoid EAC
steam_cmd = sys.argv[1 + sys.argv.index("--"):]
steam_cmd[-1] = Path(steam_cmd[-1]).parent.absolute() / game_dir_patched / "eldenring.exe"
steam_cmd[-1] = Path(steam_cmd[-1]).parent.absolute() / game_dir_patched / ("start_protected_game.exe" if patch.with_eac else "eldenring.exe")
subprocess.run(steam_cmd, cwd=steam_cmd[-1].parent.absolute())
# cleanup