diff options
author | bunnei <bunneidev@gmail.com> | 2017-12-29 06:36:22 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-12-29 06:36:22 +0100 |
commit | dcdaac8a0b5ae5b8d251c3713d3024287b0720b1 (patch) | |
tree | 35cb5631e4d00d1582aa238cf93abdc73b6afa8a /src/core/hle/kernel/handle_table.cpp | |
parent | ap, aoc_u: Minor cleanup. (diff) | |
download | yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.gz yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.bz2 yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.lz yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.xz yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.zst yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.zip |
Diffstat (limited to 'src/core/hle/kernel/handle_table.cpp')
-rw-r--r-- | src/core/hle/kernel/handle_table.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index c7322d883..12506e64c 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp @@ -5,10 +5,12 @@ #include <utility> #include "common/assert.h" #include "common/logging/log.h" +#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/errors.h" #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/process.h" +#include "core/hle/kernel/session.h" #include "core/hle/kernel/thread.h" namespace Kernel { @@ -53,6 +55,14 @@ ResultVal<Handle> HandleTable::Duplicate(Handle handle) { return Create(std::move(object)); } +void HandleTable::ConvertSessionToDomain(const Session& session, SharedPtr<Object> domain) { + for (auto& object : objects) { + if (DynamicObjectCast<ClientSession>(object) == session.client) { + object = domain; + } + } +} + ResultCode HandleTable::Close(Handle handle) { if (!IsValid(handle)) return ERR_INVALID_HANDLE; |