summaryrefslogtreecommitdiffstats
path: root/src/yuzu_tester
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_tester')
-rw-r--r--src/yuzu_tester/service/yuzutest.cpp15
-rw-r--r--src/yuzu_tester/service/yuzutest.h6
-rw-r--r--src/yuzu_tester/yuzu.cpp3
3 files changed, 14 insertions, 10 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 @@
#include <memory>
#include "common/string_util.h"
+#include "core/core.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
@@ -15,10 +16,10 @@ constexpr u64 SERVICE_VERSION = 0x00000002;
class YuzuTest final : public ServiceFramework<YuzuTest> {
public:
- explicit YuzuTest(std::string data,
- std::function<void(std::vector<TestResult>)> finish_callback)
- : ServiceFramework{"yuzutest"}, data(std::move(data)),
- finish_callback(std::move(finish_callback)) {
+ explicit YuzuTest(Core::System& system_, std::string data_,
+ std::function<void(std::vector<TestResult>)> finish_callback_)
+ : ServiceFramework{system_, "yuzutest"}, data{std::move(data_)}, finish_callback{std::move(
+ finish_callback_)} {
static const FunctionInfo functions[] = {
{0, &YuzuTest::Initialize, "Initialize"},
{1, &YuzuTest::GetServiceVersion, "GetServiceVersion"},
@@ -104,9 +105,11 @@ private:
std::function<void(std::vector<TestResult>)> finish_callback;
};
-void InstallInterfaces(SM::ServiceManager& sm, std::string data,
+void InstallInterfaces(Core::System& system, std::string data,
std::function<void(std::vector<TestResult>)> finish_callback) {
- std::make_shared<YuzuTest>(data, finish_callback)->InstallAsService(sm);
+ auto& sm = system.ServiceManager();
+ std::make_shared<YuzuTest>(system, std::move(data), std::move(finish_callback))
+ ->InstallAsService(sm);
}
} // namespace Service::Yuzu
diff --git a/src/yuzu_tester/service/yuzutest.h b/src/yuzu_tester/service/yuzutest.h
index eca129c8c..7794814fa 100644
--- a/src/yuzu_tester/service/yuzutest.h
+++ b/src/yuzu_tester/service/yuzutest.h
@@ -7,8 +7,8 @@
#include <functional>
#include <string>
-namespace Service::SM {
-class ServiceManager;
+namespace Core {
+class System;
}
namespace Service::Yuzu {
@@ -19,7 +19,7 @@ struct TestResult {
std::string name;
};
-void InstallInterfaces(SM::ServiceManager& sm, std::string data,
+void InstallInterfaces(Core::System& system, std::string data,
std::function<void(std::vector<TestResult>)> finish_callback);
} // namespace Service::Yuzu
diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp
index 88e4bd1f7..ea94a6537 100644
--- a/src/yuzu_tester/yuzu.cpp
+++ b/src/yuzu_tester/yuzu.cpp
@@ -247,9 +247,10 @@ int main(int argc, char** argv) {
"additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}",
loader_id, error_id, static_cast<Loader::ResultStatus>(error_id));
}
+ break;
}
- Service::Yuzu::InstallInterfaces(system.ServiceManager(), datastring, callback);
+ Service::Yuzu::InstallInterfaces(system, datastring, callback);
system.TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend",
"SDLHideTester");