mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
HW/Memmap: Refactor Memory to class, move to Core::System.
This commit is contained in:
parent
7cd9a78ebf
commit
839db591d9
83 changed files with 2222 additions and 1361 deletions
|
@ -18,6 +18,7 @@
|
|||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/FS/FileSystem.h"
|
||||
#include "Core/PowerPC/MMU.h"
|
||||
#include "Core/System.h"
|
||||
#include "DiscIO/DirectoryBlob.h"
|
||||
#include "DiscIO/RiivolutionParser.h"
|
||||
|
||||
|
@ -582,6 +583,9 @@ static void ApplyOcarinaMemoryPatch(const Patch& patch, const Memory& memory_pat
|
|||
|
||||
void ApplyGeneralMemoryPatches(const std::vector<Patch>& patches)
|
||||
{
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& system_memory = system.GetMemory();
|
||||
|
||||
for (const auto& patch : patches)
|
||||
{
|
||||
for (const auto& memory : patch.m_memory_patches)
|
||||
|
@ -590,7 +594,7 @@ void ApplyGeneralMemoryPatches(const std::vector<Patch>& patches)
|
|||
continue;
|
||||
|
||||
if (memory.m_search)
|
||||
ApplySearchMemoryPatch(patch, memory, 0x80000000, ::Memory::GetRamSize());
|
||||
ApplySearchMemoryPatch(patch, memory, 0x80000000, system_memory.GetRamSize());
|
||||
else
|
||||
ApplyMemoryPatch(patch, memory);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue