You've already forked pico-loader
mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-01-09 16:28:35 -08:00
Initial commit
This commit is contained in:
28
arm9/source/patches/PatchCollection.cpp
Normal file
28
arm9/source/patches/PatchCollection.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "common.h"
|
||||
#include "PatchContext.h"
|
||||
#include "PatchCollection.h"
|
||||
|
||||
bool PatchCollection::TryPerformPatches(PatchContext& patchContext)
|
||||
{
|
||||
LOG_DEBUG("PatchCollection::PerformPatches\n");
|
||||
Patch* cur = _head;
|
||||
while (cur)
|
||||
{
|
||||
if (!cur->FindPatchTarget(patchContext))
|
||||
{
|
||||
LOG_DEBUG("Patch target not found!\n");
|
||||
return false;
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
cur = _head;
|
||||
while (cur)
|
||||
{
|
||||
cur->ApplyPatch(patchContext);
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
patchContext.GetPatchCodeCollection().CopyAllToTarget();
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user