Skip to content

Commit

Permalink
get CPostFx::Draw's address with injector::GetBranchDestination for c…
Browse files Browse the repository at this point in the history
…ompatibility with other mods that hook it
  • Loading branch information
akifle47 committed Aug 23, 2024
1 parent 1fee029 commit a8ac834
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,26 @@ static void OnInitSwapchain(reshade::api::swapchain *swapchain)
{
//1040
case 0x110FF300:
CPostFX__Draw = injector::GetBranchDestination(baseAddress + 0x3C1634).get();
injector::MakeCALL(baseAddress + 0x3C1634, DrawComposite, true);
CPostFX__Draw = (void(*)())(baseAddress + 0x3BFE50);
break;

//1070
case 0x1006E857:
CPostFX__Draw = injector::GetBranchDestination(baseAddress + 0x483BF8).get();
injector::MakeCALL(baseAddress + 0x483BF8, DrawComposite, true);
CPostFX__Draw = (void(*)())(baseAddress + 0x482250);
break;

//1080
case 0x404B100F:
CPostFX__Draw = injector::GetBranchDestination(baseAddress + 0x48E038).get();
injector::MakeCALL(baseAddress + 0x48E038, DrawComposite, true);
CPostFX__Draw = (void(*)())(baseAddress + 0x48C690);
break;

//CE
case 0x1070FF01:
CPostFX__Draw = injector::GetBranchDestination(baseAddress + 0x5303A9).get();
injector::MakeCALL(baseAddress + 0x5303A9, DrawComposite, true);
CPostFX__Draw = (void(*)())(baseAddress + 0x52E7C0);
break;

default:
Expand Down

0 comments on commit a8ac834

Please sign in to comment.