diff options
Diffstat (limited to 'src/yuzu_tester/service/yuzutest.cpp')
| -rw-r--r-- | src/yuzu_tester/service/yuzutest.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/yuzu_tester/service/yuzutest.cpp b/src/yuzu_tester/service/yuzutest.cpp index 2d3f6e3a7..e257fae25 100644 --- a/src/yuzu_tester/service/yuzutest.cpp +++ b/src/yuzu_tester/service/yuzutest.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | #include "common/string_util.h" | 6 | #include "common/string_util.h" |
| 7 | #include "core/core.h" | ||
| 7 | #include "core/hle/ipc_helpers.h" | 8 | #include "core/hle/ipc_helpers.h" |
| 8 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 9 | #include "core/hle/service/sm/sm.h" | 10 | #include "core/hle/service/sm/sm.h" |
| @@ -15,10 +16,10 @@ constexpr u64 SERVICE_VERSION = 0x00000002; | |||
| 15 | 16 | ||
| 16 | class YuzuTest final : public ServiceFramework<YuzuTest> { | 17 | class YuzuTest final : public ServiceFramework<YuzuTest> { |
| 17 | public: | 18 | public: |
| 18 | explicit YuzuTest(std::string data, | 19 | explicit YuzuTest(Core::System& system_, std::string data_, |
| 19 | std::function<void(std::vector<TestResult>)> finish_callback) | 20 | std::function<void(std::vector<TestResult>)> finish_callback_) |
| 20 | : ServiceFramework{"yuzutest"}, data(std::move(data)), | 21 | : ServiceFramework{system_, "yuzutest"}, data{std::move(data_)}, finish_callback{std::move( |
| 21 | finish_callback(std::move(finish_callback)) { | 22 | finish_callback_)} { |
| 22 | static const FunctionInfo functions[] = { | 23 | static const FunctionInfo functions[] = { |
| 23 | {0, &YuzuTest::Initialize, "Initialize"}, | 24 | {0, &YuzuTest::Initialize, "Initialize"}, |
| 24 | {1, &YuzuTest::GetServiceVersion, "GetServiceVersion"}, | 25 | {1, &YuzuTest::GetServiceVersion, "GetServiceVersion"}, |
| @@ -104,9 +105,11 @@ private: | |||
| 104 | std::function<void(std::vector<TestResult>)> finish_callback; | 105 | std::function<void(std::vector<TestResult>)> finish_callback; |
| 105 | }; | 106 | }; |
| 106 | 107 | ||
| 107 | void InstallInterfaces(SM::ServiceManager& sm, std::string data, | 108 | void InstallInterfaces(Core::System& system, std::string data, |
| 108 | std::function<void(std::vector<TestResult>)> finish_callback) { | 109 | std::function<void(std::vector<TestResult>)> finish_callback) { |
| 109 | std::make_shared<YuzuTest>(data, finish_callback)->InstallAsService(sm); | 110 | auto& sm = system.ServiceManager(); |
| 111 | std::make_shared<YuzuTest>(system, std::move(data), std::move(finish_callback)) | ||
| 112 | ->InstallAsService(sm); | ||
| 110 | } | 113 | } |
| 111 | 114 | ||
| 112 | } // namespace Service::Yuzu | 115 | } // namespace Service::Yuzu |