summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-02-03 19:25:01 +0100
committerGitHub <noreply@github.com>2018-02-03 19:25:01 +0100
commitabc4be8e0fe3ab2736e26dde035435512a541d0e (patch)
treefab9aec7c0df8b91247dedc3b1299894f72aeb74 /src/core/hle/service
parentMerge pull request #156 from mailwl/nifm (diff)
parentcontroller: DuplicateSession should return a ClientSession. (diff)
downloadyuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.tar
yuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.tar.gz
yuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.tar.bz2
yuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.tar.lz
yuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.tar.xz
yuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.tar.zst
yuzu-abc4be8e0fe3ab2736e26dde035435512a541d0e.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/sm/controller.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp
index a81ff9f49..e12c53442 100644
--- a/src/core/hle/service/sm/controller.cpp
+++ b/src/core/hle/service/sm/controller.cpp
@@ -4,6 +4,7 @@
#include "common/logging/log.h"
#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/session.h"
#include "core/hle/service/sm/controller.h"
namespace Service {
@@ -21,17 +22,21 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) {
}
void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
+ // TODO(bunnei): This is just creating a new handle to the same Session. I assume this is wrong
+ // and that we probably want to actually make an entirely new Session, but we still need to
+ // verify this on hardware.
IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles};
rb.Push(RESULT_SUCCESS);
- rb.PushMoveObjects(ctx.Session());
+ Kernel::SharedPtr<Kernel::ClientSession> session{ctx.Session()->parent->client};
+ rb.PushMoveObjects(session);
- LOG_DEBUG(Service, "called");
+ LOG_DEBUG(Service, "called, session=%u", session->GetObjectId());
}
void Controller::DuplicateSessionEx(Kernel::HLERequestContext& ctx) {
- DuplicateSession(ctx);
-
LOG_WARNING(Service, "(STUBBED) called, using DuplicateSession");
+
+ DuplicateSession(ctx);
}
void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) {