summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/bcat/module.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-10-01 15:13:09 +0200
committerZach Hilman <zachhilman@gmail.com>2019-10-01 15:13:09 +0200
commit19c466dfb1f997eaa16fc9d9b832aaf3321adc40 (patch)
treef5aa993c55239c4d5bb8af83496895fe9f98b7b0 /src/core/hle/service/bcat/module.cpp
parentboxcat: Implement events global field (diff)
downloadyuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.tar
yuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.tar.gz
yuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.tar.bz2
yuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.tar.lz
yuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.tar.xz
yuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.tar.zst
yuzu-19c466dfb1f997eaa16fc9d9b832aaf3321adc40.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/bcat/module.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp
index 1b9a75a1c..b3fed56c7 100644
--- a/src/core/hle/service/bcat/module.cpp
+++ b/src/core/hle/service/bcat/module.cpp
@@ -539,7 +539,7 @@ void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestCont
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
rb.PushIpcInterface<IDeliveryCacheStorageService>(
- Service::FileSystem::GetBCATDirectory(Core::CurrentProcess()->GetTitleID()));
+ fsc.GetBCATDirectory(Core::CurrentProcess()->GetTitleID()));
}
void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId(
@@ -551,8 +551,7 @@ void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId(
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushIpcInterface<IDeliveryCacheStorageService>(
- Service::FileSystem::GetBCATDirectory(title_id));
+ rb.PushIpcInterface<IDeliveryCacheStorageService>(fsc.GetBCATDirectory(title_id));
}
std::unique_ptr<Backend> CreateBackendFromSettings(DirectoryGetter getter) {
@@ -566,18 +565,23 @@ std::unique_ptr<Backend> CreateBackendFromSettings(DirectoryGetter getter) {
return std::make_unique<NullBackend>(std::move(getter));
}
-Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
- : ServiceFramework(name), module(std::move(module)),
- backend(CreateBackendFromSettings(&Service::FileSystem::GetBCATDirectory)) {}
+Module::Interface::Interface(std::shared_ptr<Module> module, FileSystem::FileSystemController& fsc,
+ const char* name)
+ : ServiceFramework(name), module(std::move(module)), fsc(fsc),
+ backend(CreateBackendFromSettings([&fsc](u64 tid) { return fsc.GetBCATDirectory(tid); })) {}
Module::Interface::~Interface() = default;
-void InstallInterfaces(SM::ServiceManager& service_manager) {
+void InstallInterfaces(Core::System& system) {
auto module = std::make_shared<Module>();
- std::make_shared<BCAT>(module, "bcat:a")->InstallAsService(service_manager);
- std::make_shared<BCAT>(module, "bcat:m")->InstallAsService(service_manager);
- std::make_shared<BCAT>(module, "bcat:u")->InstallAsService(service_manager);
- std::make_shared<BCAT>(module, "bcat:s")->InstallAsService(service_manager);
+ std::make_shared<BCAT>(module, system.GetFileSystemController(), "bcat:a")
+ ->InstallAsService(system.ServiceManager());
+ std::make_shared<BCAT>(module, system.GetFileSystemController(), "bcat:m")
+ ->InstallAsService(system.ServiceManager());
+ std::make_shared<BCAT>(module, system.GetFileSystemController(), "bcat:u")
+ ->InstallAsService(system.ServiceManager());
+ std::make_shared<BCAT>(module, system.GetFileSystemController(), "bcat:s")
+ ->InstallAsService(system.ServiceManager());
}
} // namespace Service::BCAT