diff options
| author | 2018-08-15 13:02:25 -0400 | |
|---|---|---|
| committer | 2018-08-15 13:02:25 -0400 | |
| commit | f96de510eef0b5721d4d81c0b8722dc08e14ddfd (patch) | |
| tree | 92c1c5f85ef7226d05dc240ce5953b12a5c250fa /src/core/hle/kernel | |
| parent | Merge pull request #1077 from bunnei/rgba16u (diff) | |
| parent | kernel/server_session: Add IsSession() member function (diff) | |
| download | yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.gz yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.tar.xz yuzu-f96de510eef0b5721d4d81c0b8722dc08e14ddfd.zip | |
Merge pull request #1081 from lioncash/convert
kernel/server_session: Add IsSession() member function
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/server_session.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/server_session.h | 7 |
2 files changed, 7 insertions, 2 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) { | |||
| 152 | // Handle scenario when ConvertToDomain command was issued, as we must do the conversion at the | 152 | // Handle scenario when ConvertToDomain command was issued, as we must do the conversion at the |
| 153 | // end of the command such that only commands following this one are handled as domains | 153 | // end of the command such that only commands following this one are handled as domains |
| 154 | if (convert_to_domain) { | 154 | if (convert_to_domain) { |
| 155 | ASSERT_MSG(domain_request_handlers.empty(), "already a domain"); | 155 | ASSERT_MSG(IsSession(), "ServerSession is already a domain instance."); |
| 156 | domain_request_handlers = {hle_handler}; | 156 | domain_request_handlers = {hle_handler}; |
| 157 | convert_to_domain = false; | 157 | convert_to_domain = false; |
| 158 | } | 158 | } |
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: | |||
| 97 | 97 | ||
| 98 | /// Returns true if the session has been converted to a domain, otherwise False | 98 | /// Returns true if the session has been converted to a domain, otherwise False |
| 99 | bool IsDomain() const { | 99 | bool IsDomain() const { |
| 100 | return !domain_request_handlers.empty(); | 100 | return !IsSession(); |
| 101 | } | ||
| 102 | |||
| 103 | /// Returns true if this session has not been converted to a domain, otherwise false. | ||
| 104 | bool IsSession() const { | ||
| 105 | return domain_request_handlers.empty(); | ||
| 101 | } | 106 | } |
| 102 | 107 | ||
| 103 | /// Converts the session to a domain at the end of the current command | 108 | /// Converts the session to a domain at the end of the current command |