mirror of
https://github.com/gurrgur/er-patcher.git
synced 2026-06-13 09:47:54 +00:00
feature: add camera fix
This commit is contained in:
parent
6396ebb6ea
commit
f254eb37b9
1 changed files with 9 additions and 1 deletions
10
er-patcher
10
er-patcher
|
|
@ -16,7 +16,8 @@ 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("--all", action='store_true', help="Enable all options except rate adjustment.")
|
||||
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.")
|
||||
parser.add_argument("-v", "--disable-vigniette", action='store_true', help="Disables the vigniette overlay.")
|
||||
parser.add_argument("-c", "--disable-ca", action='store_true', help="Disables chromatic abberation.")
|
||||
|
|
@ -37,6 +38,13 @@ if __name__ == "__main__":
|
|||
)
|
||||
)
|
||||
|
||||
if patch.fix_camera:
|
||||
cf_pattern = '0f 29 a6 .. .. .. .. 41 0f 28 cf'.replace(" ", "")
|
||||
cf_addr = re.search(cf_pattern, exe_hex).span()[0]
|
||||
cf_offset = 0
|
||||
cf_patch = "90 90 90 90 90 90 90".replace(" ", "")
|
||||
exe_hex = exe_hex[:cf_addr + cf_offset] + cf_patch + exe_hex[cf_addr + cf_offset + len(cf_patch):]
|
||||
|
||||
if patch.ultrawide or patch.all:
|
||||
exe_hex = exe_hex.replace(
|
||||
"8b0185c07442448b5904",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue