From f14a17a797c84b2d0b5a4af1952bbb839abe41e4 Mon Sep 17 00:00:00 2001 From: p0358 Date: Sat, 28 Oct 2023 23:26:08 +0200 Subject: [PATCH] don't check for updates in the background while Origin is running --- src/main/origin_client_dll_patches.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/origin_client_dll_patches.cpp b/src/main/origin_client_dll_patches.cpp index e7d09a1..4208ce4 100644 --- a/src/main/origin_client_dll_patches.cpp +++ b/src/main/origin_client_dll_patches.cpp @@ -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() { { @@ -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(&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(&checkForUpdate_org)); }