diff options
author | Liam <byteslice@airmail.cc> | 2024-01-25 06:50:03 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-25 20:35:51 +0100 |
commit | 01a2d978ebc24aa517048f941f53213db9de722e (patch) | |
tree | 989cb25197de378ae71c639e7dcd564d29630438 /src/core/hle/service/hle_ipc.cpp | |
parent | Merge pull request #12763 from liamwhite/fix-hbl-again (diff) | |
download | yuzu-01a2d978ebc24aa517048f941f53213db9de722e.tar yuzu-01a2d978ebc24aa517048f941f53213db9de722e.tar.gz yuzu-01a2d978ebc24aa517048f941f53213db9de722e.tar.bz2 yuzu-01a2d978ebc24aa517048f941f53213db9de722e.tar.lz yuzu-01a2d978ebc24aa517048f941f53213db9de722e.tar.xz yuzu-01a2d978ebc24aa517048f941f53213db9de722e.tar.zst yuzu-01a2d978ebc24aa517048f941f53213db9de722e.zip |
Diffstat (limited to 'src/core/hle/service/hle_ipc.cpp')
-rw-r--r-- | src/core/hle/service/hle_ipc.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hle/service/hle_ipc.cpp b/src/core/hle/service/hle_ipc.cpp index e491dd260..50e1ed756 100644 --- a/src/core/hle/service/hle_ipc.cpp +++ b/src/core/hle/service/hle_ipc.cpp @@ -501,6 +501,22 @@ bool HLERequestContext::CanWriteBuffer(std::size_t buffer_index) const { } } +void HLERequestContext::AddMoveInterface(SessionRequestHandlerPtr s) { + ASSERT(Kernel::GetCurrentProcess(kernel).GetResourceLimit()->Reserve( + Kernel::LimitableResource::SessionCountMax, 1)); + + auto* session = Kernel::KSession::Create(kernel); + session->Initialize(nullptr, 0); + Kernel::KSession::Register(kernel, session); + + auto& server = manager.lock()->GetServerManager(); + auto next_manager = std::make_shared<Service::SessionRequestManager>(kernel, server); + next_manager->SetSessionHandler(std::move(s)); + server.RegisterSession(&session->GetServerSession(), next_manager); + + AddMoveObject(&session->GetClientSession()); +} + std::string HLERequestContext::Description() const { if (!command_header) { return "No command header available"; |