summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-15 19:02:25 +0200
committerGitHub <noreply@github.com>2018-08-15 19:02:25 +0200
commitf96de510eef0b5721d4d81c0b8722dc08e14ddfd (patch)
tree92c1c5f85ef7226d05dc240ce5953b12a5c250fa /src
parentMerge pull request #1077 from bunnei/rgba16u (diff)
parentkernel/server_session: Add IsSession() member function (diff)
downloadyuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar
yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.gz
yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.bz2
yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.lz
yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.xz
yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.zst
yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/server_session.cpp2
-rw-r--r--src/core/hle/kernel/server_session.h7
-rw-r--r--src/core/hle/service/sm/controller.cpp2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index d09ca5992..51a1ec160 100644
--- a/src/core/hle/kernel/server_session.cpp
+++ b/src/core/hle/kernel/server_session.cpp
@@ -152,7 +152,7 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) {
// Handle scenario when ConvertToDomain command was issued, as we must do the conversion at the
// end of the command such that only commands following this one are handled as domains
if (convert_to_domain) {
- ASSERT_MSG(domain_request_handlers.empty(), "already a domain");
+ ASSERT_MSG(IsSession(), "ServerSession is already a domain instance.");
domain_request_handlers = {hle_handler};
convert_to_domain = false;
}
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h
index 2bce54fee..1a88e66b9 100644
--- a/src/core/hle/kernel/server_session.h
+++ b/src/core/hle/kernel/server_session.h
@@ -97,7 +97,12 @@ public:
/// Returns true if the session has been converted to a domain, otherwise False
bool IsDomain() const {
- return !domain_request_handlers.empty();
+ return !IsSession();
+ }
+
+ /// Returns true if this session has not been converted to a domain, otherwise false.
+ bool IsSession() const {
+ return domain_request_handlers.empty();
}
/// Converts the session to a domain at the end of the current command
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp
index 518a0cc46..ae8cd9eeb 100644
--- a/src/core/hle/service/sm/controller.cpp
+++ b/src/core/hle/service/sm/controller.cpp
@@ -10,7 +10,7 @@
namespace Service::SM {
void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) {
- ASSERT_MSG(!ctx.Session()->IsDomain(), "session is alread a domain");
+ ASSERT_MSG(ctx.Session()->IsSession(), "Session is already a domain");
ctx.Session()->ConvertToDomain();
IPC::ResponseBuilder rb{ctx, 3};