summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar David Marcec2019-09-22 16:35:43 +1000
committerGravatar David Marcec2019-09-22 16:35:43 +1000
commitf21ab654db620198b388bd25cd0db4c2085c4c8a (patch)
tree4a787355d020e7df09dd0c032f1892f08009e0de /src
parentDeglobalize System: Nim (diff)
downloadyuzu-f21ab654db620198b388bd25cd0db4c2085c4c8a.tar.gz
yuzu-f21ab654db620198b388bd25cd0db4c2085c4c8a.tar.xz
yuzu-f21ab654db620198b388bd25cd0db4c2085c4c8a.zip
Rebase
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/ns/ns.cpp6
-rw-r--r--src/core/hle/service/ns/ns.h4
-rw-r--r--src/core/hle/service/ns/pl_u.cpp7
-rw-r--r--src/core/hle/service/ns/pl_u.h3
4 files changed, 12 insertions, 8 deletions
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp
index 13121c4f1..dffd2eefe 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -617,7 +617,9 @@ public:
617 } 617 }
618}; 618};
619 619
620void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSystemController& fsc) { 620void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system,
621 FileSystem::FileSystemController& fsc) {
622
621 std::make_shared<NS>("ns:am2")->InstallAsService(service_manager); 623 std::make_shared<NS>("ns:am2")->InstallAsService(service_manager);
622 std::make_shared<NS>("ns:ec")->InstallAsService(service_manager); 624 std::make_shared<NS>("ns:ec")->InstallAsService(service_manager);
623 std::make_shared<NS>("ns:rid")->InstallAsService(service_manager); 625 std::make_shared<NS>("ns:rid")->InstallAsService(service_manager);
@@ -628,7 +630,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSyst
628 std::make_shared<NS_SU>()->InstallAsService(service_manager); 630 std::make_shared<NS_SU>()->InstallAsService(service_manager);
629 std::make_shared<NS_VM>()->InstallAsService(service_manager); 631 std::make_shared<NS_VM>()->InstallAsService(service_manager);
630 632
631 std::make_shared<PL_U>(fsc)->InstallAsService(service_manager); 633 std::make_shared<PL_U>(system, fsc)->InstallAsService(service_manager);
632} 634}
633 635
634} // namespace Service::NS 636} // namespace Service::NS
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h
index d067e7a9a..4a10c98f9 100644
--- a/src/core/hle/service/ns/ns.h
+++ b/src/core/hle/service/ns/ns.h
@@ -97,8 +97,8 @@ private:
97}; 97};
98 98
99/// Registers all NS services with the specified service manager. 99/// Registers all NS services with the specified service manager.
100void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSystemController& fsc); 100void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system,
101 FileSystem::FileSystemController& fsc);
101 102
102} // namespace NS 103} // namespace NS
103
104} // namespace Service 104} // namespace Service
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp
index 8f0c6bc07..4f9b843e6 100644
--- a/src/core/hle/service/ns/pl_u.cpp
+++ b/src/core/hle/service/ns/pl_u.cpp
@@ -145,8 +145,9 @@ struct PL_U::Impl {
145 std::vector<FontRegion> shared_font_regions; 145 std::vector<FontRegion> shared_font_regions;
146}; 146};
147 147
148PL_U::PL_U(FileSystem::FileSystemController& fsc) 148PL_U::PL_U(Core::System& system, FileSystem::FileSystemController& fsc)
149 : ServiceFramework("pl:u"), impl{std::make_unique<Impl>()} { 149 : ServiceFramework("pl:u"), impl{std::make_unique<Impl>()}, system(system) {
150
150 static const FunctionInfo functions[] = { 151 static const FunctionInfo functions[] = {
151 {0, &PL_U::RequestLoad, "RequestLoad"}, 152 {0, &PL_U::RequestLoad, "RequestLoad"},
152 {1, &PL_U::GetLoadState, "GetLoadState"}, 153 {1, &PL_U::GetLoadState, "GetLoadState"},
@@ -255,7 +256,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) {
255 Kernel::MemoryState::Shared); 256 Kernel::MemoryState::Shared);
256 257
257 // Create shared font memory object 258 // Create shared font memory object
258 auto& kernel = Core::System::GetInstance().Kernel(); 259 auto& kernel = system.Kernel();
259 impl->shared_font_mem = Kernel::SharedMemory::Create( 260 impl->shared_font_mem = Kernel::SharedMemory::Create(
260 kernel, Core::CurrentProcess(), SHARED_FONT_MEM_SIZE, Kernel::MemoryPermission::ReadWrite, 261 kernel, Core::CurrentProcess(), SHARED_FONT_MEM_SIZE, Kernel::MemoryPermission::ReadWrite,
261 Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE, 262 Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE,
diff --git a/src/core/hle/service/ns/pl_u.h b/src/core/hle/service/ns/pl_u.h
index 7e9fe6220..0d38d7d36 100644
--- a/src/core/hle/service/ns/pl_u.h
+++ b/src/core/hle/service/ns/pl_u.h
@@ -20,7 +20,7 @@ void EncryptSharedFont(const std::vector<u8>& input, Kernel::PhysicalMemory& out
20 20
21class PL_U final : public ServiceFramework<PL_U> { 21class PL_U final : public ServiceFramework<PL_U> {
22public: 22public:
23 PL_U(FileSystem::FileSystemController& fsc); 23 PL_U(Core::System& system, FileSystem::FileSystemController& fsc);
24 ~PL_U() override; 24 ~PL_U() override;
25 25
26private: 26private:
@@ -33,6 +33,7 @@ private:
33 33
34 struct Impl; 34 struct Impl;
35 std::unique_ptr<Impl> impl; 35 std::unique_ptr<Impl> impl;
36 Core::System& system;
36}; 37};
37 38
38} // namespace NS 39} // namespace NS