patcher: refactor (#808)

## Link to GitHub Issue or related Pull Request, if one exists
n/a

## Description of change
Refactor patch manager.

This one file had the UI logic, config save/load, parsing patches JSON,
applying memory patches, everything all in one cpp file. Refactor and
separate out the layers.

## Testing
Sanity checked patch workflows.
This commit is contained in:
bicarus
2026-07-17 03:48:01 -07:00
committed by GitHub
parent 2aae8ad9ca
commit e1d1b39567
10 changed files with 3078 additions and 2978 deletions
+5 -9
View File
@@ -102,7 +102,7 @@
#include "misc/wintouchemu.h"
#include "overlay/overlay.h"
#include "overlay/notifications.h"
#include "overlay/windows/patch_manager.h"
#include "patcher/patch_manager.h"
#include "overlay/windows/iidx_seg.h"
#include "overlay/windows/obs.h"
#include "rawinput/rawinput.h"
@@ -889,7 +889,7 @@ int main_implementation(int argc, char *argv[]) {
options[launcher::Options::ScreenResizeConfigPath].value_text();
}
if (options[launcher::Options::PatchManagerConfigPath].is_active()) {
overlay::windows::PATCH_MANAGER_CFG_PATH_OVERRIDE =
patcher::PATCH_MANAGER_CFG_PATH_OVERRIDE =
options[launcher::Options::PatchManagerConfigPath].value_text();
}
if (options[launcher::Options::PathToAppConfig].is_active()) {
@@ -2517,10 +2517,8 @@ int main_implementation(int argc, char *argv[]) {
// copy defaults to nvram
avs::core::copy_defaults();
// prepare patches
{
overlay::windows::PatchManager patch_manager(nullptr, false);
}
// prepare patches (registers the DLL-load notification before the game DLL loads)
patcher::init();
// load game
avs::game::load_dll();
@@ -2648,9 +2646,7 @@ int main_implementation(int argc, char *argv[]) {
}
// apply patches
{
overlay::windows::PatchManager patch_manager(nullptr, true);
}
patcher::apply_patches_on_start();
// load AVS-EA3
avs::ea3::boot(easrv_port, easrv_maint, easrv_smart);