From f21ab654db620198b388bd25cd0db4c2085c4c8a Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 22 Sep 2019 16:35:43 +1000 Subject: Rebase --- src/core/hle/service/ns/pl_u.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service/ns/pl_u.cpp') 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 { std::vector shared_font_regions; }; -PL_U::PL_U(FileSystem::FileSystemController& fsc) - : ServiceFramework("pl:u"), impl{std::make_unique()} { +PL_U::PL_U(Core::System& system, FileSystem::FileSystemController& fsc) + : ServiceFramework("pl:u"), impl{std::make_unique()}, system(system) { + static const FunctionInfo functions[] = { {0, &PL_U::RequestLoad, "RequestLoad"}, {1, &PL_U::GetLoadState, "GetLoadState"}, @@ -255,7 +256,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { Kernel::MemoryState::Shared); // Create shared font memory object - auto& kernel = Core::System::GetInstance().Kernel(); + auto& kernel = system.Kernel(); impl->shared_font_mem = Kernel::SharedMemory::Create( kernel, Core::CurrentProcess(), SHARED_FONT_MEM_SIZE, Kernel::MemoryPermission::ReadWrite, Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE, -- cgit v1.2.3 From fcdbf0bc53d9361351ac8bae22d590e526fdb49d Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 22 Sep 2019 16:40:58 +1000 Subject: Rebase --- src/core/hle/service/ns/pl_u.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/ns/pl_u.cpp') diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index 4f9b843e6..c91cfa36e 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp @@ -145,7 +145,7 @@ struct PL_U::Impl { std::vector shared_font_regions; }; -PL_U::PL_U(Core::System& system, FileSystem::FileSystemController& fsc) +PL_U::PL_U(Core::System& system) : ServiceFramework("pl:u"), impl{std::make_unique()}, system(system) { static const FunctionInfo functions[] = { @@ -157,6 +157,9 @@ PL_U::PL_U(Core::System& system, FileSystem::FileSystemController& fsc) {5, &PL_U::GetSharedFontInOrderOfPriority, "GetSharedFontInOrderOfPriority"}, }; RegisterHandlers(functions); + + auto& fsc = system.GetFileSystemController(); + // Attempt to load shared font data from disk const auto* nand = fsc.GetSystemNANDContents(); std::size_t offset = 0; -- cgit v1.2.3