summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ldr/ldr.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-22 15:38:13 +0200
committerGitHub <noreply@github.com>2019-09-22 15:38:13 +0200
commit4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b (patch)
treecbf3e722bf583a48f851744c8276a2caf0b2e8ef /src/core/hle/service/ldr/ldr.cpp
parentMerge pull request #2870 from FernandoS27/multi-draw (diff)
parentremoved unneeded semicolon (diff)
downloadyuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.tar
yuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.tar.gz
yuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.tar.bz2
yuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.tar.lz
yuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.tar.xz
yuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.tar.zst
yuzu-4ace69de9c90eb7d4a758aa3c3616a9c0d55bc5b.zip
Diffstat (limited to 'src/core/hle/service/ldr/ldr.cpp')
-rw-r--r--src/core/hle/service/ldr/ldr.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 8ddad8682..3164ca26e 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -78,7 +78,7 @@ public:
class RelocatableObject final : public ServiceFramework<RelocatableObject> {
public:
- explicit RelocatableObject() : ServiceFramework{"ldr:ro"} {
+ explicit RelocatableObject(Core::System& system) : ServiceFramework{"ldr:ro"}, system(system) {
// clang-format off
static const FunctionInfo functions[] = {
{0, &RelocatableObject::LoadNro, "LoadNro"},
@@ -364,7 +364,7 @@ public:
vm_manager.ReprotectRange(*map_address + header.rw_offset, header.rw_size,
Kernel::VMAPermission::ReadWrite);
- Core::System::GetInstance().InvalidateCpuInstructionCaches();
+ system.InvalidateCpuInstructionCaches();
nro.insert_or_assign(*map_address,
NROInfo{hash, nro_address, nro_size, bss_address, bss_size});
@@ -430,7 +430,7 @@ public:
.IsSuccess());
}
- Core::System::GetInstance().InvalidateCpuInstructionCaches();
+ system.InvalidateCpuInstructionCaches();
nro.erase(iter);
IPC::ResponseBuilder rb{ctx, 2};
@@ -516,13 +516,14 @@ private:
Common::Is4KBAligned(header.text_size) && Common::Is4KBAligned(header.ro_size) &&
Common::Is4KBAligned(header.rw_size);
}
+ Core::System& system;
};
-void InstallInterfaces(SM::ServiceManager& sm) {
+void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
std::make_shared<DebugMonitor>()->InstallAsService(sm);
std::make_shared<ProcessManager>()->InstallAsService(sm);
std::make_shared<Shell>()->InstallAsService(sm);
- std::make_shared<RelocatableObject>()->InstallAsService(sm);
+ std::make_shared<RelocatableObject>(system)->InstallAsService(sm);
}
} // namespace Service::LDR