diff options
| -rw-r--r-- | src/core/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/core/file_sys/system_archive/shared_font.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/applet_web_browser.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/ns/iplatform_service_manager.cpp (renamed from src/core/hle/service/ns/pl_u.cpp) | 34 | ||||
| -rw-r--r-- | src/core/hle/service/ns/iplatform_service_manager.h (renamed from src/core/hle/service/ns/pl_u.h) | 6 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 5 |
6 files changed, 27 insertions, 26 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 25b39c52b..806e7ff6c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -538,14 +538,14 @@ add_library(core STATIC | |||
| 538 | hle/service/npns/npns.cpp | 538 | hle/service/npns/npns.cpp |
| 539 | hle/service/npns/npns.h | 539 | hle/service/npns/npns.h |
| 540 | hle/service/ns/errors.h | 540 | hle/service/ns/errors.h |
| 541 | hle/service/ns/iplatform_service_manager.cpp | ||
| 542 | hle/service/ns/iplatform_service_manager.h | ||
| 541 | hle/service/ns/language.cpp | 543 | hle/service/ns/language.cpp |
| 542 | hle/service/ns/language.h | 544 | hle/service/ns/language.h |
| 543 | hle/service/ns/ns.cpp | 545 | hle/service/ns/ns.cpp |
| 544 | hle/service/ns/ns.h | 546 | hle/service/ns/ns.h |
| 545 | hle/service/ns/pdm_qry.cpp | 547 | hle/service/ns/pdm_qry.cpp |
| 546 | hle/service/ns/pdm_qry.h | 548 | hle/service/ns/pdm_qry.h |
| 547 | hle/service/ns/pl_u.cpp | ||
| 548 | hle/service/ns/pl_u.h | ||
| 549 | hle/service/nvdrv/devices/nvdevice.h | 549 | hle/service/nvdrv/devices/nvdevice.h |
| 550 | hle/service/nvdrv/devices/nvdisp_disp0.cpp | 550 | hle/service/nvdrv/devices/nvdisp_disp0.cpp |
| 551 | hle/service/nvdrv/devices/nvdisp_disp0.h | 551 | hle/service/nvdrv/devices/nvdisp_disp0.h |
diff --git a/src/core/file_sys/system_archive/shared_font.cpp b/src/core/file_sys/system_archive/shared_font.cpp index f841988ff..3210583f0 100644 --- a/src/core/file_sys/system_archive/shared_font.cpp +++ b/src/core/file_sys/system_archive/shared_font.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include "core/file_sys/system_archive/data/font_standard.h" | 9 | #include "core/file_sys/system_archive/data/font_standard.h" |
| 10 | #include "core/file_sys/system_archive/shared_font.h" | 10 | #include "core/file_sys/system_archive/shared_font.h" |
| 11 | #include "core/file_sys/vfs_vector.h" | 11 | #include "core/file_sys/vfs_vector.h" |
| 12 | #include "core/hle/service/ns/pl_u.h" | 12 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 13 | 13 | ||
| 14 | namespace FileSys::SystemArchive { | 14 | namespace FileSys::SystemArchive { |
| 15 | 15 | ||
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp index 4b804b78c..14aa6f69e 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.cpp +++ b/src/core/hle/service/am/applets/applet_web_browser.cpp | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include "core/hle/service/am/am.h" | 21 | #include "core/hle/service/am/am.h" |
| 22 | #include "core/hle/service/am/applets/applet_web_browser.h" | 22 | #include "core/hle/service/am/applets/applet_web_browser.h" |
| 23 | #include "core/hle/service/filesystem/filesystem.h" | 23 | #include "core/hle/service/filesystem/filesystem.h" |
| 24 | #include "core/hle/service/ns/pl_u.h" | 24 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 25 | #include "core/loader/loader.h" | 25 | #include "core/loader/loader.h" |
| 26 | 26 | ||
| 27 | namespace Service::AM::Applets { | 27 | namespace Service::AM::Applets { |
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/iplatform_service_manager.cpp index cc11f3e08..fd047ff26 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/iplatform_service_manager.cpp | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include "core/hle/kernel/kernel.h" | 20 | #include "core/hle/kernel/kernel.h" |
| 21 | #include "core/hle/kernel/physical_memory.h" | 21 | #include "core/hle/kernel/physical_memory.h" |
| 22 | #include "core/hle/service/filesystem/filesystem.h" | 22 | #include "core/hle/service/filesystem/filesystem.h" |
| 23 | #include "core/hle/service/ns/pl_u.h" | 23 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 24 | 24 | ||
| 25 | namespace Service::NS { | 25 | namespace Service::NS { |
| 26 | 26 | ||
| @@ -99,7 +99,7 @@ static u32 GetU32Swapped(const u8* data) { | |||
| 99 | return Common::swap32(value); | 99 | return Common::swap32(value); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | struct PL_U::Impl { | 102 | struct IPlatformServiceManager::Impl { |
| 103 | const FontRegion& GetSharedFontRegion(std::size_t index) const { | 103 | const FontRegion& GetSharedFontRegion(std::size_t index) const { |
| 104 | if (index >= shared_font_regions.size() || shared_font_regions.empty()) { | 104 | if (index >= shared_font_regions.size() || shared_font_regions.empty()) { |
| 105 | // No font fallback | 105 | // No font fallback |
| @@ -134,16 +134,16 @@ struct PL_U::Impl { | |||
| 134 | std::vector<FontRegion> shared_font_regions; | 134 | std::vector<FontRegion> shared_font_regions; |
| 135 | }; | 135 | }; |
| 136 | 136 | ||
| 137 | PL_U::PL_U(Core::System& system_) | 137 | IPlatformServiceManager::IPlatformServiceManager(Core::System& system_, const char* service_name_) |
| 138 | : ServiceFramework{system_, "pl:u"}, impl{std::make_unique<Impl>()} { | 138 | : ServiceFramework{system_, service_name_}, impl{std::make_unique<Impl>()} { |
| 139 | // clang-format off | 139 | // clang-format off |
| 140 | static const FunctionInfo functions[] = { | 140 | static const FunctionInfo functions[] = { |
| 141 | {0, &PL_U::RequestLoad, "RequestLoad"}, | 141 | {0, &IPlatformServiceManager::RequestLoad, "RequestLoad"}, |
| 142 | {1, &PL_U::GetLoadState, "GetLoadState"}, | 142 | {1, &IPlatformServiceManager::GetLoadState, "GetLoadState"}, |
| 143 | {2, &PL_U::GetSize, "GetSize"}, | 143 | {2, &IPlatformServiceManager::GetSize, "GetSize"}, |
| 144 | {3, &PL_U::GetSharedMemoryAddressOffset, "GetSharedMemoryAddressOffset"}, | 144 | {3, &IPlatformServiceManager::GetSharedMemoryAddressOffset, "GetSharedMemoryAddressOffset"}, |
| 145 | {4, &PL_U::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"}, | 145 | {4, &IPlatformServiceManager::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"}, |
| 146 | {5, &PL_U::GetSharedFontInOrderOfPriority, "GetSharedFontInOrderOfPriority"}, | 146 | {5, &IPlatformServiceManager::GetSharedFontInOrderOfPriority, "GetSharedFontInOrderOfPriority"}, |
| 147 | {6, nullptr, "GetSharedFontInOrderOfPriorityForSystem"}, | 147 | {6, nullptr, "GetSharedFontInOrderOfPriorityForSystem"}, |
| 148 | {100, nullptr, "RequestApplicationFunctionAuthorization"}, | 148 | {100, nullptr, "RequestApplicationFunctionAuthorization"}, |
| 149 | {101, nullptr, "RequestApplicationFunctionAuthorizationByProcessId"}, | 149 | {101, nullptr, "RequestApplicationFunctionAuthorizationByProcessId"}, |
| @@ -206,9 +206,9 @@ PL_U::PL_U(Core::System& system_) | |||
| 206 | } | 206 | } |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | PL_U::~PL_U() = default; | 209 | IPlatformServiceManager::~IPlatformServiceManager() = default; |
| 210 | 210 | ||
| 211 | void PL_U::RequestLoad(Kernel::HLERequestContext& ctx) { | 211 | void IPlatformServiceManager::RequestLoad(Kernel::HLERequestContext& ctx) { |
| 212 | IPC::RequestParser rp{ctx}; | 212 | IPC::RequestParser rp{ctx}; |
| 213 | const u32 shared_font_type{rp.Pop<u32>()}; | 213 | const u32 shared_font_type{rp.Pop<u32>()}; |
| 214 | // Games don't call this so all fonts should be loaded | 214 | // Games don't call this so all fonts should be loaded |
| @@ -218,7 +218,7 @@ void PL_U::RequestLoad(Kernel::HLERequestContext& ctx) { | |||
| 218 | rb.Push(ResultSuccess); | 218 | rb.Push(ResultSuccess); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | void PL_U::GetLoadState(Kernel::HLERequestContext& ctx) { | 221 | void IPlatformServiceManager::GetLoadState(Kernel::HLERequestContext& ctx) { |
| 222 | IPC::RequestParser rp{ctx}; | 222 | IPC::RequestParser rp{ctx}; |
| 223 | const u32 font_id{rp.Pop<u32>()}; | 223 | const u32 font_id{rp.Pop<u32>()}; |
| 224 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 224 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -228,7 +228,7 @@ void PL_U::GetLoadState(Kernel::HLERequestContext& ctx) { | |||
| 228 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); | 228 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void PL_U::GetSize(Kernel::HLERequestContext& ctx) { | 231 | void IPlatformServiceManager::GetSize(Kernel::HLERequestContext& ctx) { |
| 232 | IPC::RequestParser rp{ctx}; | 232 | IPC::RequestParser rp{ctx}; |
| 233 | const u32 font_id{rp.Pop<u32>()}; | 233 | const u32 font_id{rp.Pop<u32>()}; |
| 234 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 234 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -238,7 +238,7 @@ void PL_U::GetSize(Kernel::HLERequestContext& ctx) { | |||
| 238 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).size); | 238 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).size); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | void PL_U::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) { | 241 | void IPlatformServiceManager::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) { |
| 242 | IPC::RequestParser rp{ctx}; | 242 | IPC::RequestParser rp{ctx}; |
| 243 | const u32 font_id{rp.Pop<u32>()}; | 243 | const u32 font_id{rp.Pop<u32>()}; |
| 244 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 244 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -248,7 +248,7 @@ void PL_U::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) { | |||
| 248 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset); | 248 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset); |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | 251 | void IPlatformServiceManager::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { |
| 252 | // Map backing memory for the font data | 252 | // Map backing memory for the font data |
| 253 | LOG_DEBUG(Service_NS, "called"); | 253 | LOG_DEBUG(Service_NS, "called"); |
| 254 | 254 | ||
| @@ -261,7 +261,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | |||
| 261 | rb.PushCopyObjects(&kernel.GetFontSharedMem()); | 261 | rb.PushCopyObjects(&kernel.GetFontSharedMem()); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { | 264 | void IPlatformServiceManager::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { |
| 265 | IPC::RequestParser rp{ctx}; | 265 | IPC::RequestParser rp{ctx}; |
| 266 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for | 266 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for |
| 267 | LOG_DEBUG(Service_NS, "called, language_code={:X}", language_code); | 267 | LOG_DEBUG(Service_NS, "called, language_code={:X}", language_code); |
diff --git a/src/core/hle/service/ns/pl_u.h b/src/core/hle/service/ns/iplatform_service_manager.h index 07d0ac934..ed6eda89f 100644 --- a/src/core/hle/service/ns/pl_u.h +++ b/src/core/hle/service/ns/iplatform_service_manager.h | |||
| @@ -36,10 +36,10 @@ constexpr std::array<std::pair<FontArchives, const char*>, 7> SHARED_FONTS{ | |||
| 36 | void DecryptSharedFontToTTF(const std::vector<u32>& input, std::vector<u8>& output); | 36 | void DecryptSharedFontToTTF(const std::vector<u32>& input, std::vector<u8>& output); |
| 37 | void EncryptSharedFont(const std::vector<u32>& input, std::vector<u8>& output, std::size_t& offset); | 37 | void EncryptSharedFont(const std::vector<u32>& input, std::vector<u8>& output, std::size_t& offset); |
| 38 | 38 | ||
| 39 | class PL_U final : public ServiceFramework<PL_U> { | 39 | class IPlatformServiceManager final : public ServiceFramework<IPlatformServiceManager> { |
| 40 | public: | 40 | public: |
| 41 | explicit PL_U(Core::System& system_); | 41 | explicit IPlatformServiceManager(Core::System& system_, const char* service_name_); |
| 42 | ~PL_U() override; | 42 | ~IPlatformServiceManager() override; |
| 43 | 43 | ||
| 44 | private: | 44 | private: |
| 45 | void RequestLoad(Kernel::HLERequestContext& ctx); | 45 | void RequestLoad(Kernel::HLERequestContext& ctx); |
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index aafc8fe03..f7318c3cb 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -9,10 +9,10 @@ | |||
| 9 | #include "core/file_sys/vfs.h" | 9 | #include "core/file_sys/vfs.h" |
| 10 | #include "core/hle/ipc_helpers.h" | 10 | #include "core/hle/ipc_helpers.h" |
| 11 | #include "core/hle/service/ns/errors.h" | 11 | #include "core/hle/service/ns/errors.h" |
| 12 | #include "core/hle/service/ns/iplatform_service_manager.h" | ||
| 12 | #include "core/hle/service/ns/language.h" | 13 | #include "core/hle/service/ns/language.h" |
| 13 | #include "core/hle/service/ns/ns.h" | 14 | #include "core/hle/service/ns/ns.h" |
| 14 | #include "core/hle/service/ns/pdm_qry.h" | 15 | #include "core/hle/service/ns/pdm_qry.h" |
| 15 | #include "core/hle/service/ns/pl_u.h" | ||
| 16 | #include "core/hle/service/set/set.h" | 16 | #include "core/hle/service/set/set.h" |
| 17 | 17 | ||
| 18 | namespace Service::NS { | 18 | namespace Service::NS { |
| @@ -764,7 +764,8 @@ void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system | |||
| 764 | 764 | ||
| 765 | std::make_shared<PDM_QRY>(system)->InstallAsService(service_manager); | 765 | std::make_shared<PDM_QRY>(system)->InstallAsService(service_manager); |
| 766 | 766 | ||
| 767 | std::make_shared<PL_U>(system)->InstallAsService(service_manager); | 767 | std::make_shared<IPlatformServiceManager>(system, "pl:s")->InstallAsService(service_manager); |
| 768 | std::make_shared<IPlatformServiceManager>(system, "pl:u")->InstallAsService(service_manager); | ||
| 768 | } | 769 | } |
| 769 | 770 | ||
| 770 | } // namespace Service::NS | 771 | } // namespace Service::NS |