summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_light_client_session.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-12-07 01:54:52 +0100
committerLiam <byteslice@airmail.cc>2023-12-07 15:13:43 +0100
commit9268f265a1207f0cddb97a908a1cc349f9b6410b (patch)
tree5da6aea714523b3504b78362c5d8abd53689d72f /src/core/hle/kernel/k_light_client_session.cpp
parentMerge pull request #12236 from liamwhite/cpu-refactor (diff)
downloadyuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.tar
yuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.tar.gz
yuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.tar.bz2
yuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.tar.lz
yuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.tar.xz
yuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.tar.zst
yuzu-9268f265a1207f0cddb97a908a1cc349f9b6410b.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_light_client_session.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_light_client_session.cpp b/src/core/hle/kernel/k_light_client_session.cpp
new file mode 100644
index 000000000..8ce3e1ae4
--- /dev/null
+++ b/src/core/hle/kernel/k_light_client_session.cpp
@@ -0,0 +1,31 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "core/hle/kernel/k_light_client_session.h"
+#include "core/hle/kernel/k_light_session.h"
+#include "core/hle/kernel/k_thread.h"
+
+namespace Kernel {
+
+KLightClientSession::KLightClientSession(KernelCore& kernel) : KAutoObject(kernel) {}
+
+KLightClientSession::~KLightClientSession() = default;
+
+void KLightClientSession::Destroy() {
+ m_parent->OnClientClosed();
+}
+
+void KLightClientSession::OnServerClosed() {}
+
+Result KLightClientSession::SendSyncRequest(u32* data) {
+ // Get the request thread.
+ KThread* cur_thread = GetCurrentThreadPointer(m_kernel);
+
+ // Set the light data.
+ cur_thread->SetLightSessionData(data);
+
+ // Send the request.
+ R_RETURN(m_parent->OnRequest(cur_thread));
+}
+
+} // namespace Kernel