Skip to content

Commit

Permalink
don't check for updates in the background while Origin is running
Browse files Browse the repository at this point in the history
  • Loading branch information
p0358 committed Oct 28, 2023
1 parent 244707f commit f14a17a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/origin_client_dll_patches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ bool __fastcall treatUpdatesAsMandatory_hook(void* thisptr /*ecx*/, void* /*edx*
return false;
}

// Origin::Services::SelfUpdateService::checkForUpdate
void(__thiscall* checkForUpdate_org)(void*);
void __fastcall checkForUpdate_hook(void* thisptr /*ecx*/)
{
// How about no?
// If there's a real update, and the user didn't disable updating, then it will be
// downloaded upon next Origin launch by thin setup.
}

void DoOriginClientDllPatches()
{
{
Expand Down Expand Up @@ -124,4 +133,7 @@ void DoOriginClientDllPatches()

// Bonus patch: allow to launch games without updating by treating all updates as non-mandatory
CreateHookNamed("OriginClient", "?treatUpdatesAsMandatory@LocalContent@Content@Engine@Origin@@QBE_NXZ", treatUpdatesAsMandatory_hook, reinterpret_cast<LPVOID*>(&treatUpdatesAsMandatory_org));

// This checks for update to nag the user in the UI and auto-download the update zip, we don't ever need that
CreateHookNamed("OriginClient", "?checkForUpdate@SelfUpdateService@Services@Origin@@QAEXXZ", checkForUpdate_hook, reinterpret_cast<LPVOID*>(&checkForUpdate_org));
}

0 comments on commit f14a17a

Please sign in to comment.