summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-29 23:17:35 +0200
committerZach Hilman <zachhilman@gmail.com>2019-09-22 18:34:55 +0200
commit4153bd8d171ffe7cd11c467b338f843859565d51 (patch)
tree024f3a856b4aab1398f836c243382a3962f6e666 /src/core/hle/service
parentreporter: Add log output for packaged lm log data (diff)
downloadyuzu-4153bd8d171ffe7cd11c467b338f843859565d51.tar
yuzu-4153bd8d171ffe7cd11c467b338f843859565d51.tar.gz
yuzu-4153bd8d171ffe7cd11c467b338f843859565d51.tar.bz2
yuzu-4153bd8d171ffe7cd11c467b338f843859565d51.tar.lz
yuzu-4153bd8d171ffe7cd11c467b338f843859565d51.tar.xz
yuzu-4153bd8d171ffe7cd11c467b338f843859565d51.tar.zst
yuzu-4153bd8d171ffe7cd11c467b338f843859565d51.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/lm/lm.cpp25
-rw-r--r--src/core/hle/service/lm/lm.h6
-rw-r--r--src/core/hle/service/service.cpp2
3 files changed, 17 insertions, 16 deletions
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index 2a61593e2..efba18fe7 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -6,8 +6,10 @@
#include <string>
#include "common/logging/log.h"
+#include "common/scope_exit.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/service/lm/lm.h"
+#include "core/hle/service/lm/manager.h"
#include "core/hle/service/service.h"
#include "core/memory.h"
@@ -194,31 +196,30 @@ private:
class LM final : public ServiceFramework<LM> {
public:
- explicit LM() : ServiceFramework{"lm"} {
+ explicit LM(Manager& manager) : ServiceFramework{"lm"}, manager(manager) {
+ // clang-format off
static const FunctionInfo functions[] = {
- {0x00000000, &LM::OpenLogger, "OpenLogger"},
+ {0, &LM::OpenLogger, "OpenLogger"},
};
+ // clang-format on
+
RegisterHandlers(functions);
}
- /**
- * LM::OpenLogger service function
- * Inputs:
- * 0: 0x00000000
- * Outputs:
- * 0: ResultCode
- */
+private:
void OpenLogger(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_LM, "called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushIpcInterface<ILogger>();
+ rb.PushIpcInterface<ILogger>(manager);
}
+
+ Manager& manager;
};
-void InstallInterfaces(SM::ServiceManager& service_manager) {
- std::make_shared<LM>()->InstallAsService(service_manager);
+void InstallInterfaces(Core::System& system) {
+ std::make_shared<LM>(system.GetLogManager())->InstallAsService(system.ServiceManager());
}
} // namespace Service::LM
diff --git a/src/core/hle/service/lm/lm.h b/src/core/hle/service/lm/lm.h
index 7806ae27b..d40410b5c 100644
--- a/src/core/hle/service/lm/lm.h
+++ b/src/core/hle/service/lm/lm.h
@@ -4,13 +4,13 @@
#pragma once
-namespace Service::SM {
-class ServiceManager;
+namespace Core {
+class System;
}
namespace Service::LM {
/// Registers all LM services with the specified service manager.
-void InstallInterfaces(SM::ServiceManager& service_manager);
+void InstallInterfaces(Core::System& system);
} // namespace Service::LM
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 831a427de..c12a746c8 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -226,7 +226,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system) {
LBL::InstallInterfaces(*sm);
LDN::InstallInterfaces(*sm);
LDR::InstallInterfaces(*sm, system);
- LM::InstallInterfaces(*sm);
+ LM::InstallInterfaces(system);
Migration::InstallInterfaces(*sm);
Mii::InstallInterfaces(*sm);
MM::InstallInterfaces(*sm);