diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_ae.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_ae.h | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_oe.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_oe.h | 4 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.h | 14 | ||||
| -rw-r--r-- | src/core/hle/service/ns/pl_u.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/ns/pl_u.h | 14 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/service.h | 8 |
11 files changed, 47 insertions, 20 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index eae052ce0..7f8514b0d 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -1268,7 +1268,7 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) { | |||
| 1268 | "new_journal={:016X}", | 1268 | "new_journal={:016X}", |
| 1269 | static_cast<u8>(type), user_id[1], user_id[0], new_normal_size, new_journal_size); | 1269 | static_cast<u8>(type), user_id[1], user_id[0], new_normal_size, new_journal_size); |
| 1270 | 1270 | ||
| 1271 | fsc.WriteSaveDataSize(type, Core::CurrentProcess()->GetTitleID(), user_id, | 1271 | fsc.WriteSaveDataSize(type, system.CurrentProcess()->GetTitleID(), user_id, |
| 1272 | {new_normal_size, new_journal_size}); | 1272 | {new_normal_size, new_journal_size}); |
| 1273 | 1273 | ||
| 1274 | IPC::ResponseBuilder rb{ctx, 4}; | 1274 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -1288,7 +1288,8 @@ void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) { | |||
| 1288 | LOG_DEBUG(Service_AM, "called with type={:02X}, user_id={:016X}{:016X}", static_cast<u8>(type), | 1288 | LOG_DEBUG(Service_AM, "called with type={:02X}, user_id={:016X}{:016X}", static_cast<u8>(type), |
| 1289 | user_id[1], user_id[0]); | 1289 | user_id[1], user_id[0]); |
| 1290 | 1290 | ||
| 1291 | const auto size = fsc.ReadSaveDataSize(type, Core::CurrentProcess()->GetTitleID(), user_id); | 1291 | const auto size = system.FileSystemController().ReadSaveDataSize( |
| 1292 | type, system.CurrentProcess()->GetTitleID(), user_id); | ||
| 1292 | 1293 | ||
| 1293 | IPC::ResponseBuilder rb{ctx, 6}; | 1294 | IPC::ResponseBuilder rb{ctx, 6}; |
| 1294 | rb.Push(RESULT_SUCCESS); | 1295 | rb.Push(RESULT_SUCCESS); |
diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index e454b77d8..d04476ae0 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp | |||
| @@ -106,7 +106,7 @@ private: | |||
| 106 | 106 | ||
| 107 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 107 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 108 | rb.Push(RESULT_SUCCESS); | 108 | rb.Push(RESULT_SUCCESS); |
| 109 | rb.PushIpcInterface<IApplicationFunctions>(system); | 109 | rb.PushIpcInterface<IApplicationFunctions>(system.FileSystemController()); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; | 112 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; |
diff --git a/src/core/hle/service/am/applet_ae.h b/src/core/hle/service/am/applet_ae.h index 9e006cd9d..0e0d10858 100644 --- a/src/core/hle/service/am/applet_ae.h +++ b/src/core/hle/service/am/applet_ae.h | |||
| @@ -9,6 +9,10 @@ | |||
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 10 | 10 | ||
| 11 | namespace Service { | 11 | namespace Service { |
| 12 | namespace FileSystem { | ||
| 13 | class FileSystemController; | ||
| 14 | } | ||
| 15 | |||
| 12 | namespace NVFlinger { | 16 | namespace NVFlinger { |
| 13 | class NVFlinger; | 17 | class NVFlinger; |
| 14 | } | 18 | } |
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index a2ffaa440..2ee21620b 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp | |||
| @@ -95,7 +95,7 @@ private: | |||
| 95 | 95 | ||
| 96 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 96 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 97 | rb.Push(RESULT_SUCCESS); | 97 | rb.Push(RESULT_SUCCESS); |
| 98 | rb.PushIpcInterface<IApplicationFunctions>(system); | 98 | rb.PushIpcInterface<IApplicationFunctions>(system.FileSystemController()); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; | 101 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; |
diff --git a/src/core/hle/service/am/applet_oe.h b/src/core/hle/service/am/applet_oe.h index 22c05419d..99a65e7b5 100644 --- a/src/core/hle/service/am/applet_oe.h +++ b/src/core/hle/service/am/applet_oe.h | |||
| @@ -9,6 +9,10 @@ | |||
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 10 | 10 | ||
| 11 | namespace Service { | 11 | namespace Service { |
| 12 | namespace FileSystem { | ||
| 13 | class FileSystemController; | ||
| 14 | } | ||
| 15 | |||
| 12 | namespace NVFlinger { | 16 | namespace NVFlinger { |
| 13 | class NVFlinger; | 17 | class NVFlinger; |
| 14 | } | 18 | } |
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index ce88a2941..13121c4f1 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -617,7 +617,7 @@ public: | |||
| 617 | } | 617 | } |
| 618 | }; | 618 | }; |
| 619 | 619 | ||
| 620 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 620 | void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSystemController& fsc) { |
| 621 | std::make_shared<NS>("ns:am2")->InstallAsService(service_manager); | 621 | std::make_shared<NS>("ns:am2")->InstallAsService(service_manager); |
| 622 | std::make_shared<NS>("ns:ec")->InstallAsService(service_manager); | 622 | std::make_shared<NS>("ns:ec")->InstallAsService(service_manager); |
| 623 | std::make_shared<NS>("ns:rid")->InstallAsService(service_manager); | 623 | std::make_shared<NS>("ns:rid")->InstallAsService(service_manager); |
| @@ -628,7 +628,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager) { | |||
| 628 | std::make_shared<NS_SU>()->InstallAsService(service_manager); | 628 | std::make_shared<NS_SU>()->InstallAsService(service_manager); |
| 629 | std::make_shared<NS_VM>()->InstallAsService(service_manager); | 629 | std::make_shared<NS_VM>()->InstallAsService(service_manager); |
| 630 | 630 | ||
| 631 | std::make_shared<PL_U>()->InstallAsService(service_manager); | 631 | std::make_shared<PL_U>(fsc)->InstallAsService(service_manager); |
| 632 | } | 632 | } |
| 633 | 633 | ||
| 634 | } // namespace Service::NS | 634 | } // namespace Service::NS |
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index 0e8256cb4..d067e7a9a 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h | |||
| @@ -6,7 +6,13 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Service::NS { | 9 | namespace Service { |
| 10 | |||
| 11 | namespace FileSystem { | ||
| 12 | class FileSystemController; | ||
| 13 | } // namespace FileSystem | ||
| 14 | |||
| 15 | namespace NS { | ||
| 10 | 16 | ||
| 11 | class IAccountProxyInterface final : public ServiceFramework<IAccountProxyInterface> { | 17 | class IAccountProxyInterface final : public ServiceFramework<IAccountProxyInterface> { |
| 12 | public: | 18 | public: |
| @@ -91,6 +97,8 @@ private: | |||
| 91 | }; | 97 | }; |
| 92 | 98 | ||
| 93 | /// Registers all NS services with the specified service manager. | 99 | /// Registers all NS services with the specified service manager. |
| 94 | void InstallInterfaces(SM::ServiceManager& service_manager); | 100 | void InstallInterfaces(SM::ServiceManager& service_manager, FileSystem::FileSystemController& fsc); |
| 101 | |||
| 102 | } // namespace NS | ||
| 95 | 103 | ||
| 96 | } // namespace Service::NS | 104 | } // namespace Service |
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index 2a522136d..9d49f36e8 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp | |||
| @@ -150,7 +150,8 @@ struct PL_U::Impl { | |||
| 150 | std::vector<FontRegion> shared_font_regions; | 150 | std::vector<FontRegion> shared_font_regions; |
| 151 | }; | 151 | }; |
| 152 | 152 | ||
| 153 | PL_U::PL_U() : ServiceFramework("pl:u"), impl{std::make_unique<Impl>()} { | 153 | PL_U::PL_U(FileSystem::FileSystemController& fsc) |
| 154 | : ServiceFramework("pl:u"), impl{std::make_unique<Impl>()} { | ||
| 154 | static const FunctionInfo functions[] = { | 155 | static const FunctionInfo functions[] = { |
| 155 | {0, &PL_U::RequestLoad, "RequestLoad"}, | 156 | {0, &PL_U::RequestLoad, "RequestLoad"}, |
| 156 | {1, &PL_U::GetLoadState, "GetLoadState"}, | 157 | {1, &PL_U::GetLoadState, "GetLoadState"}, |
| @@ -161,7 +162,7 @@ PL_U::PL_U() : ServiceFramework("pl:u"), impl{std::make_unique<Impl>()} { | |||
| 161 | }; | 162 | }; |
| 162 | RegisterHandlers(functions); | 163 | RegisterHandlers(functions); |
| 163 | // Attempt to load shared font data from disk | 164 | // Attempt to load shared font data from disk |
| 164 | const auto* nand = FileSystem::GetSystemNANDContents(); | 165 | const auto* nand = fsc.GetSystemNANDContents(); |
| 165 | std::size_t offset = 0; | 166 | std::size_t offset = 0; |
| 166 | // Rebuild shared fonts from data ncas | 167 | // Rebuild shared fonts from data ncas |
| 167 | if (nand->HasEntry(static_cast<u64>(FontArchives::Standard), | 168 | if (nand->HasEntry(static_cast<u64>(FontArchives::Standard), |
diff --git a/src/core/hle/service/ns/pl_u.h b/src/core/hle/service/ns/pl_u.h index 253f26a2a..35ca424d2 100644 --- a/src/core/hle/service/ns/pl_u.h +++ b/src/core/hle/service/ns/pl_u.h | |||
| @@ -7,11 +7,17 @@ | |||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| 9 | 9 | ||
| 10 | namespace Service::NS { | 10 | namespace Service { |
| 11 | |||
| 12 | namespace FileSystem { | ||
| 13 | class FileSystemController; | ||
| 14 | } // namespace FileSystem | ||
| 15 | |||
| 16 | namespace NS { | ||
| 11 | 17 | ||
| 12 | class PL_U final : public ServiceFramework<PL_U> { | 18 | class PL_U final : public ServiceFramework<PL_U> { |
| 13 | public: | 19 | public: |
| 14 | PL_U(); | 20 | PL_U(FileSystem::FileSystemController& fsc); |
| 15 | ~PL_U() override; | 21 | ~PL_U() override; |
| 16 | 22 | ||
| 17 | private: | 23 | private: |
| @@ -26,4 +32,6 @@ private: | |||
| 26 | std::unique_ptr<Impl> impl; | 32 | std::unique_ptr<Impl> impl; |
| 27 | }; | 33 | }; |
| 28 | 34 | ||
| 29 | } // namespace Service::NS | 35 | } // namespace NS |
| 36 | |||
| 37 | } // namespace Service | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 3a0f8c3f6..8bf033c88 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -199,6 +199,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system) { | |||
| 199 | // NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it | 199 | // NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it |
| 200 | // here and pass it into the respective InstallInterfaces functions. | 200 | // here and pass it into the respective InstallInterfaces functions. |
| 201 | auto nv_flinger = std::make_shared<NVFlinger::NVFlinger>(system.CoreTiming()); | 201 | auto nv_flinger = std::make_shared<NVFlinger::NVFlinger>(system.CoreTiming()); |
| 202 | fsc.CreateFactories(*system.GetFilesystem(), false); | ||
| 202 | 203 | ||
| 203 | SM::ServiceManager::InstallInterfaces(sm); | 204 | SM::ServiceManager::InstallInterfaces(sm); |
| 204 | 205 | ||
| @@ -229,13 +230,13 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system) { | |||
| 229 | Migration::InstallInterfaces(*sm); | 230 | Migration::InstallInterfaces(*sm); |
| 230 | Mii::InstallInterfaces(*sm); | 231 | Mii::InstallInterfaces(*sm); |
| 231 | MM::InstallInterfaces(*sm); | 232 | MM::InstallInterfaces(*sm); |
| 232 | NCM::InstallInterfaces(*sm); | 233 | NCM::InstallInterfaces(*sm, fsc); |
| 233 | NFC::InstallInterfaces(*sm); | 234 | NFC::InstallInterfaces(*sm); |
| 234 | NFP::InstallInterfaces(*sm); | 235 | NFP::InstallInterfaces(*sm); |
| 235 | NIFM::InstallInterfaces(*sm); | 236 | NIFM::InstallInterfaces(*sm); |
| 236 | NIM::InstallInterfaces(*sm); | 237 | NIM::InstallInterfaces(*sm); |
| 237 | NPNS::InstallInterfaces(*sm); | 238 | NPNS::InstallInterfaces(*sm); |
| 238 | NS::InstallInterfaces(*sm); | 239 | NS::InstallInterfaces(*sm, fsc); |
| 239 | Nvidia::InstallInterfaces(*sm, *nv_flinger, system); | 240 | Nvidia::InstallInterfaces(*sm, *nv_flinger, system); |
| 240 | PCIe::InstallInterfaces(*sm); | 241 | PCIe::InstallInterfaces(*sm); |
| 241 | PCTL::InstallInterfaces(*sm); | 242 | PCTL::InstallInterfaces(*sm); |
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index c6c4bdae5..aef964861 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -18,10 +18,6 @@ namespace Core { | |||
| 18 | class System; | 18 | class System; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | namespace FileSys { | ||
| 22 | class VfsFilesystem; | ||
| 23 | } | ||
| 24 | |||
| 25 | namespace Kernel { | 21 | namespace Kernel { |
| 26 | class ClientPort; | 22 | class ClientPort; |
| 27 | class ServerPort; | 23 | class ServerPort; |
| @@ -31,6 +27,10 @@ class HLERequestContext; | |||
| 31 | 27 | ||
| 32 | namespace Service { | 28 | namespace Service { |
| 33 | 29 | ||
| 30 | namespace FileSystem { | ||
| 31 | class FileSystemController; | ||
| 32 | } // namespace FileSystem | ||
| 33 | |||
| 34 | namespace SM { | 34 | namespace SM { |
| 35 | class ServiceManager; | 35 | class ServiceManager; |
| 36 | } | 36 | } |