Skip to content

Commit

Permalink
Merge pull request #65 from polsrepo/patch-1
Browse files Browse the repository at this point in the history
Update er-patcher for v1.12
  • Loading branch information
gurrgur authored Jun 20, 2024
2 parents e8be93b + a388b09 commit 2fb795c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions er-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if __name__ == "__main__":
exe_hex = f.read().hex()

if patch.rate != 60 and patch.rate > 0:
r_pattern = "c7 43 20 89 88 88 3c eb 43 89 73 18 eb ca 89 73 18".replace(" ", "")
r_pattern = "c7 43 1c 89 88 88 3c eb 6d 89 73 18 eb c7 89 73 18".replace(" ", "")
if (res := re.search(r_pattern, exe_hex)) is not None:
r_addr = res.span()[0] + 6
r_patch = struct.pack('<f', 1 / patch.rate).hex()
Expand Down Expand Up @@ -104,7 +104,7 @@ if __name__ == "__main__":
if patch.remove_60hz_fullscreen or patch.all:
fs_pattern = "c7 45 ef 3c 00 00 00".replace(" ", "")
if (res := re.search(fs_pattern, exe_hex)) is not None:
fs_addr = res.span()[0] + 6
fs_addr = res.span()[0] + 3
fs_patch = "00"
exe_hex = exe_hex[:fs_addr] + fs_patch + exe_hex[fs_addr + len(fs_patch):]
else:
Expand Down

0 comments on commit 2fb795c

Please sign in to comment.