Rebase
This commit is contained in:
parent
8d3ff2b127
commit
f21ab654db
4 changed files with 12 additions and 8 deletions
|
@ -617,7 +617,9 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSystemController& fsc) {
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system,
|
||||||
|
FileSystem::FileSystemController& fsc) {
|
||||||
|
|
||||||
std::make_shared<NS>("ns:am2")->InstallAsService(service_manager);
|
std::make_shared<NS>("ns:am2")->InstallAsService(service_manager);
|
||||||
std::make_shared<NS>("ns:ec")->InstallAsService(service_manager);
|
std::make_shared<NS>("ns:ec")->InstallAsService(service_manager);
|
||||||
std::make_shared<NS>("ns:rid")->InstallAsService(service_manager);
|
std::make_shared<NS>("ns:rid")->InstallAsService(service_manager);
|
||||||
|
@ -628,7 +630,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSyst
|
||||||
std::make_shared<NS_SU>()->InstallAsService(service_manager);
|
std::make_shared<NS_SU>()->InstallAsService(service_manager);
|
||||||
std::make_shared<NS_VM>()->InstallAsService(service_manager);
|
std::make_shared<NS_VM>()->InstallAsService(service_manager);
|
||||||
|
|
||||||
std::make_shared<PL_U>(fsc)->InstallAsService(service_manager);
|
std::make_shared<PL_U>(system, fsc)->InstallAsService(service_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::NS
|
} // namespace Service::NS
|
||||||
|
|
|
@ -97,8 +97,8 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Registers all NS services with the specified service manager.
|
/// Registers all NS services with the specified service manager.
|
||||||
void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSystemController& fsc);
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system,
|
||||||
|
FileSystem::FileSystemController& fsc);
|
||||||
|
|
||||||
} // namespace NS
|
} // namespace NS
|
||||||
|
|
||||||
} // namespace Service
|
} // namespace Service
|
||||||
|
|
|
@ -145,8 +145,9 @@ struct PL_U::Impl {
|
||||||
std::vector<FontRegion> shared_font_regions;
|
std::vector<FontRegion> shared_font_regions;
|
||||||
};
|
};
|
||||||
|
|
||||||
PL_U::PL_U(FileSystem::FileSystemController& fsc)
|
PL_U::PL_U(Core::System& system, FileSystem::FileSystemController& fsc)
|
||||||
: ServiceFramework("pl:u"), impl{std::make_unique<Impl>()} {
|
: ServiceFramework("pl:u"), impl{std::make_unique<Impl>()}, system(system) {
|
||||||
|
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &PL_U::RequestLoad, "RequestLoad"},
|
{0, &PL_U::RequestLoad, "RequestLoad"},
|
||||||
{1, &PL_U::GetLoadState, "GetLoadState"},
|
{1, &PL_U::GetLoadState, "GetLoadState"},
|
||||||
|
@ -255,7 +256,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) {
|
||||||
Kernel::MemoryState::Shared);
|
Kernel::MemoryState::Shared);
|
||||||
|
|
||||||
// Create shared font memory object
|
// Create shared font memory object
|
||||||
auto& kernel = Core::System::GetInstance().Kernel();
|
auto& kernel = system.Kernel();
|
||||||
impl->shared_font_mem = Kernel::SharedMemory::Create(
|
impl->shared_font_mem = Kernel::SharedMemory::Create(
|
||||||
kernel, Core::CurrentProcess(), SHARED_FONT_MEM_SIZE, Kernel::MemoryPermission::ReadWrite,
|
kernel, Core::CurrentProcess(), SHARED_FONT_MEM_SIZE, Kernel::MemoryPermission::ReadWrite,
|
||||||
Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE,
|
Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE,
|
||||||
|
|
|
@ -20,7 +20,7 @@ void EncryptSharedFont(const std::vector<u8>& input, Kernel::PhysicalMemory& out
|
||||||
|
|
||||||
class PL_U final : public ServiceFramework<PL_U> {
|
class PL_U final : public ServiceFramework<PL_U> {
|
||||||
public:
|
public:
|
||||||
PL_U(FileSystem::FileSystemController& fsc);
|
PL_U(Core::System& system, FileSystem::FileSystemController& fsc);
|
||||||
~PL_U() override;
|
~PL_U() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,6 +33,7 @@ private:
|
||||||
|
|
||||||
struct Impl;
|
struct Impl;
|
||||||
std::unique_ptr<Impl> impl;
|
std::unique_ptr<Impl> impl;
|
||||||
|
Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace NS
|
} // namespace NS
|
||||||
|
|
Loading…
Reference in a new issue