summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-11 01:05:37 +0200
committerbunnei <bunneidev@gmail.com>2021-05-11 05:34:38 +0200
commitda25a5986666c55de1421aed978f7e92e5a87c8f (patch)
tree9050ea95e173e1ec2b9e3e5853232926c22093b6 /src/core/hle/service
parenthle: service: sm: Use RegisterNamedService to register the service. (diff)
downloadyuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.tar
yuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.tar.gz
yuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.tar.bz2
yuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.tar.lz
yuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.tar.xz
yuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.tar.zst
yuzu-da25a5986666c55de1421aed978f7e92e5a87c8f.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/service.cpp19
-rw-r--r--src/core/hle/service/service.h3
2 files changed, 13 insertions, 9 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index d7e09e8f1..e36c35a86 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -167,33 +167,36 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {
handler_invoker(this, info->handler_callback, ctx);
}
-ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) {
+ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session,
+ Kernel::HLERequestContext& ctx) {
const auto guard = LockService();
- switch (context.GetCommandType()) {
- case IPC::CommandType::Close: {
- IPC::ResponseBuilder rb{context, 2};
+ switch (ctx.GetCommandType()) {
+ case IPC::CommandType::Close:
+ case IPC::CommandType::TIPC_Close: {
+ session.Close();
+ IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
return IPC::ERR_REMOTE_PROCESS_DEAD;
}
case IPC::CommandType::ControlWithContext:
case IPC::CommandType::Control: {
- system.ServiceManager().InvokeControlRequest(context);
+ system.ServiceManager().InvokeControlRequest(ctx);
break;
}
case IPC::CommandType::RequestWithContext:
case IPC::CommandType::Request: {
- InvokeRequest(context);
+ InvokeRequest(ctx);
break;
}
default:
- UNIMPLEMENTED_MSG("command_type={}", context.GetCommandType());
+ UNIMPLEMENTED_MSG("command_type={}", ctx.GetCommandType());
}
// If emulation was shutdown, we are closing service threads, do not write the response back to
// memory that may be shutting down as well.
if (system.IsPoweredOn()) {
- context.WriteToOutgoingCommandBuffer(context.GetThread());
+ ctx.WriteToOutgoingCommandBuffer(ctx.GetThread());
}
return RESULT_SUCCESS;
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 16357b156..51e22a791 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -71,7 +71,8 @@ public:
Kernel::KClientPort& CreatePort(Kernel::KernelCore& kernel);
/// Handles a synchronization request for the service.
- ResultCode HandleSyncRequest(Kernel::HLERequestContext& context) override;
+ ResultCode HandleSyncRequest(Kernel::KServerSession& session,
+ Kernel::HLERequestContext& context) override;
protected:
/// Member-function pointer type of SyncRequest handlers.