mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-02-17 01:00:30 -05:00
Core: add helper function to apply a memory patch and mark the 'PPCPatches' as final
This commit is contained in:
@@ -23,9 +23,8 @@
|
||||
#include "Core/PowerPC/PPCSymbolDB.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
||||
void PPCPatches::Patch(std::size_t index)
|
||||
void ApplyMemoryPatch(Common::Debug::MemoryPatch& patch)
|
||||
{
|
||||
auto& patch = m_patches[index];
|
||||
if (patch.value.empty())
|
||||
return;
|
||||
|
||||
@@ -50,6 +49,18 @@ void PPCPatches::Patch(std::size_t index)
|
||||
}
|
||||
}
|
||||
|
||||
void PPCPatches::ApplyExistingPatch(std::size_t index)
|
||||
{
|
||||
auto& patch = m_patches[index];
|
||||
ApplyMemoryPatch(patch);
|
||||
}
|
||||
|
||||
void PPCPatches::Patch(std::size_t index)
|
||||
{
|
||||
auto& patch = m_patches[index];
|
||||
ApplyMemoryPatch(patch);
|
||||
}
|
||||
|
||||
PPCDebugInterface::PPCDebugInterface() = default;
|
||||
PPCDebugInterface::~PPCDebugInterface() = default;
|
||||
|
||||
@@ -168,6 +179,11 @@ void PPCDebugInterface::ClearPatches()
|
||||
m_patches.ClearPatches();
|
||||
}
|
||||
|
||||
void PPCDebugInterface::ApplyExistingPatch(std::size_t index)
|
||||
{
|
||||
m_patches.ApplyExistingPatch(index);
|
||||
}
|
||||
|
||||
Common::Debug::Threads PPCDebugInterface::GetThreads() const
|
||||
{
|
||||
Common::Debug::Threads threads;
|
||||
|
||||
Reference in New Issue
Block a user