diff options
| -rw-r--r-- | src/core/hle/service/prepo/prepo.cpp | 29 | ||||
| -rw-r--r-- | src/core/hle/service/prepo/prepo.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
3 files changed, 18 insertions, 15 deletions
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index d56ce0eb9..0f79135ff 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp | |||
| @@ -15,7 +15,8 @@ namespace Service::PlayReport { | |||
| 15 | 15 | ||
| 16 | class PlayReport final : public ServiceFramework<PlayReport> { | 16 | class PlayReport final : public ServiceFramework<PlayReport> { |
| 17 | public: | 17 | public: |
| 18 | explicit PlayReport(const char* name) : ServiceFramework{name} { | 18 | explicit PlayReport(Core::System& system, const char* name) |
| 19 | : ServiceFramework{name}, system(system) { | ||
| 19 | // clang-format off | 20 | // clang-format off |
| 20 | static const FunctionInfo functions[] = { | 21 | static const FunctionInfo functions[] = { |
| 21 | {10100, &PlayReport::SaveReport<Core::Reporter::PlayReportType::Old>, "SaveReportOld"}, | 22 | {10100, &PlayReport::SaveReport<Core::Reporter::PlayReportType::Old>, "SaveReportOld"}, |
| @@ -55,8 +56,8 @@ private: | |||
| 55 | "called, type={:02X}, process_id={:016X}, data1_size={:016X}, data2_size={:016X}", | 56 | "called, type={:02X}, process_id={:016X}, data1_size={:016X}, data2_size={:016X}", |
| 56 | static_cast<u8>(Type), process_id, data1.size(), data2.size()); | 57 | static_cast<u8>(Type), process_id, data1.size(), data2.size()); |
| 57 | 58 | ||
| 58 | const auto& reporter{Core::System::GetInstance().GetReporter()}; | 59 | const auto& reporter{system.GetReporter()}; |
| 59 | reporter.SavePlayReport(Type, Core::CurrentProcess()->GetTitleID(), {data1, data2}, | 60 | reporter.SavePlayReport(Type, system.CurrentProcess()->GetTitleID(), {data1, data2}, |
| 60 | process_id); | 61 | process_id); |
| 61 | 62 | ||
| 62 | IPC::ResponseBuilder rb{ctx, 2}; | 63 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -78,8 +79,8 @@ private: | |||
| 78 | "data2_size={:016X}", | 79 | "data2_size={:016X}", |
| 79 | static_cast<u8>(Type), user_id[1], user_id[0], process_id, data1.size(), data2.size()); | 80 | static_cast<u8>(Type), user_id[1], user_id[0], process_id, data1.size(), data2.size()); |
| 80 | 81 | ||
| 81 | const auto& reporter{Core::System::GetInstance().GetReporter()}; | 82 | const auto& reporter{system.GetReporter()}; |
| 82 | reporter.SavePlayReport(Type, Core::CurrentProcess()->GetTitleID(), {data1, data2}, | 83 | reporter.SavePlayReport(Type, system.CurrentProcess()->GetTitleID(), {data1, data2}, |
| 83 | process_id, user_id); | 84 | process_id, user_id); |
| 84 | 85 | ||
| 85 | IPC::ResponseBuilder rb{ctx, 2}; | 86 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -96,7 +97,7 @@ private: | |||
| 96 | LOG_DEBUG(Service_PREPO, "called, title_id={:016X}, data1_size={:016X}, data2_size={:016X}", | 97 | LOG_DEBUG(Service_PREPO, "called, title_id={:016X}, data1_size={:016X}, data2_size={:016X}", |
| 97 | title_id, data1.size(), data2.size()); | 98 | title_id, data1.size(), data2.size()); |
| 98 | 99 | ||
| 99 | const auto& reporter{Core::System::GetInstance().GetReporter()}; | 100 | const auto& reporter{system.GetReporter()}; |
| 100 | reporter.SavePlayReport(Core::Reporter::PlayReportType::System, title_id, {data1, data2}); | 101 | reporter.SavePlayReport(Core::Reporter::PlayReportType::System, title_id, {data1, data2}); |
| 101 | 102 | ||
| 102 | IPC::ResponseBuilder rb{ctx, 2}; | 103 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -116,21 +117,23 @@ private: | |||
| 116 | "data2_size={:016X}", | 117 | "data2_size={:016X}", |
| 117 | user_id[1], user_id[0], title_id, data1.size(), data2.size()); | 118 | user_id[1], user_id[0], title_id, data1.size(), data2.size()); |
| 118 | 119 | ||
| 119 | const auto& reporter{Core::System::GetInstance().GetReporter()}; | 120 | const auto& reporter{system.GetReporter()}; |
| 120 | reporter.SavePlayReport(Core::Reporter::PlayReportType::System, title_id, {data1, data2}, | 121 | reporter.SavePlayReport(Core::Reporter::PlayReportType::System, title_id, {data1, data2}, |
| 121 | std::nullopt, user_id); | 122 | std::nullopt, user_id); |
| 122 | 123 | ||
| 123 | IPC::ResponseBuilder rb{ctx, 2}; | 124 | IPC::ResponseBuilder rb{ctx, 2}; |
| 124 | rb.Push(RESULT_SUCCESS); | 125 | rb.Push(RESULT_SUCCESS); |
| 125 | } | 126 | } |
| 127 | |||
| 128 | Core::System& system; | ||
| 126 | }; | 129 | }; |
| 127 | 130 | ||
| 128 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 131 | void InstallInterfaces(Core::System& system) { |
| 129 | std::make_shared<PlayReport>("prepo:a")->InstallAsService(service_manager); | 132 | std::make_shared<PlayReport>(system, "prepo:a")->InstallAsService(system.ServiceManager()); |
| 130 | std::make_shared<PlayReport>("prepo:a2")->InstallAsService(service_manager); | 133 | std::make_shared<PlayReport>(system, "prepo:a2")->InstallAsService(system.ServiceManager()); |
| 131 | std::make_shared<PlayReport>("prepo:m")->InstallAsService(service_manager); | 134 | std::make_shared<PlayReport>(system, "prepo:m")->InstallAsService(system.ServiceManager()); |
| 132 | std::make_shared<PlayReport>("prepo:s")->InstallAsService(service_manager); | 135 | std::make_shared<PlayReport>(system, "prepo:s")->InstallAsService(system.ServiceManager()); |
| 133 | std::make_shared<PlayReport>("prepo:u")->InstallAsService(service_manager); | 136 | std::make_shared<PlayReport>(system, "prepo:u")->InstallAsService(system.ServiceManager()); |
| 134 | } | 137 | } |
| 135 | 138 | ||
| 136 | } // namespace Service::PlayReport | 139 | } // namespace Service::PlayReport |
diff --git a/src/core/hle/service/prepo/prepo.h b/src/core/hle/service/prepo/prepo.h index 0e7b01331..0ebc3a938 100644 --- a/src/core/hle/service/prepo/prepo.h +++ b/src/core/hle/service/prepo/prepo.h | |||
| @@ -10,6 +10,6 @@ class ServiceManager; | |||
| 10 | 10 | ||
| 11 | namespace Service::PlayReport { | 11 | namespace Service::PlayReport { |
| 12 | 12 | ||
| 13 | void InstallInterfaces(SM::ServiceManager& service_manager); | 13 | void InstallInterfaces(Core::System& system); |
| 14 | 14 | ||
| 15 | } // namespace Service::PlayReport | 15 | } // namespace Service::PlayReport |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 3a0f8c3f6..59cdcf165 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -240,7 +240,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system) { | |||
| 240 | PCIe::InstallInterfaces(*sm); | 240 | PCIe::InstallInterfaces(*sm); |
| 241 | PCTL::InstallInterfaces(*sm); | 241 | PCTL::InstallInterfaces(*sm); |
| 242 | PCV::InstallInterfaces(*sm); | 242 | PCV::InstallInterfaces(*sm); |
| 243 | PlayReport::InstallInterfaces(*sm); | 243 | PlayReport::InstallInterfaces(system); |
| 244 | PM::InstallInterfaces(system); | 244 | PM::InstallInterfaces(system); |
| 245 | PSC::InstallInterfaces(*sm); | 245 | PSC::InstallInterfaces(*sm); |
| 246 | PSM::InstallInterfaces(*sm); | 246 | PSM::InstallInterfaces(*sm); |