summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/server_session.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-11-01 00:30:05 +0100
committerbunnei <bunneidev@gmail.com>2017-11-01 00:30:05 +0100
commit3597650f221036deb382d4e8812e717014619eee (patch)
treee16f1231d1423a16edf40735b9462187d0792138 /src/core/hle/kernel/server_session.cpp
parenthle: Use Switch formatted result codes. (diff)
downloadyuzu-3597650f221036deb382d4e8812e717014619eee.tar
yuzu-3597650f221036deb382d4e8812e717014619eee.tar.gz
yuzu-3597650f221036deb382d4e8812e717014619eee.tar.bz2
yuzu-3597650f221036deb382d4e8812e717014619eee.tar.lz
yuzu-3597650f221036deb382d4e8812e717014619eee.tar.xz
yuzu-3597650f221036deb382d4e8812e717014619eee.tar.zst
yuzu-3597650f221036deb382d4e8812e717014619eee.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/server_session.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index 337896abf..68e5cc2b7 100644
--- a/src/core/hle/kernel/server_session.cpp
+++ b/src/core/hle/kernel/server_session.cpp
@@ -60,12 +60,13 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) {
// similar.
// If this ServerSession has an associated HLE handler, forward the request to it.
+ ResultCode result{RESULT_SUCCESS};
if (hle_handler != nullptr) {
// Attempt to translate the incoming request's command buffer.
- ResultCode result = TranslateHLERequest(this);
- if (result.IsError())
- return result;
- hle_handler->HandleSyncRequest(SharedPtr<ServerSession>(this));
+ ResultCode translate_result = TranslateHLERequest(this);
+ if (translate_result.IsError())
+ return translate_result;
+ result = hle_handler->HandleSyncRequest(SharedPtr<ServerSession>(this));
// TODO(Subv): Translate the response command buffer.
} else {
// Add the thread to the list of threads that have issued a sync request with this
@@ -76,7 +77,7 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) {
// If this ServerSession does not have an HLE implementation, just wake up the threads waiting
// on it.
WakeupAllWaitingThreads();
- return RESULT_SUCCESS;
+ return result;
}
ServerSession::SessionPair ServerSession::CreateSessionPair(const std::string& name,