diff options
| author | 2017-06-22 23:57:05 -0700 | |
|---|---|---|
| committer | 2017-06-23 11:26:37 -0700 | |
| commit | e192d417ecc24648106cf3d088bd715525f83e5e (patch) | |
| tree | d4f4be2c9ed527b9f4df3a74e686a2722e5e05be /src/core/hle/svc.cpp | |
| parent | Kernel: Fix SVC wrapper for CreatePort (diff) | |
| download | yuzu-e192d417ecc24648106cf3d088bd715525f83e5e.tar.gz yuzu-e192d417ecc24648106cf3d088bd715525f83e5e.tar.xz yuzu-e192d417ecc24648106cf3d088bd715525f83e5e.zip | |
Kernel: Implement AcceptSession SVC
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 2e11d41ce..c05401143 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -971,6 +971,17 @@ static ResultCode CreateSession(Handle* server_session, Handle* client_session) | |||
| 971 | return RESULT_SUCCESS; | 971 | return RESULT_SUCCESS; |
| 972 | } | 972 | } |
| 973 | 973 | ||
| 974 | static ResultCode AcceptSession(Handle* out_server_session, Handle server_port_handle) { | ||
| 975 | using Kernel::ServerPort; | ||
| 976 | SharedPtr<ServerPort> server_port = Kernel::g_handle_table.Get<ServerPort>(server_port_handle); | ||
| 977 | if (server_port == nullptr) | ||
| 978 | return ERR_INVALID_HANDLE; | ||
| 979 | |||
| 980 | CASCADE_RESULT(auto session, server_port->Accept()); | ||
| 981 | CASCADE_RESULT(*out_server_session, Kernel::g_handle_table.Create(std::move(session))); | ||
| 982 | return RESULT_SUCCESS; | ||
| 983 | } | ||
| 984 | |||
| 974 | static ResultCode GetSystemInfo(s64* out, u32 type, s32 param) { | 985 | static ResultCode GetSystemInfo(s64* out, u32 type, s32 param) { |
| 975 | using Kernel::MemoryRegion; | 986 | using Kernel::MemoryRegion; |
| 976 | 987 | ||
| @@ -1147,7 +1158,7 @@ static const FunctionDef SVC_Table[] = { | |||
| 1147 | {0x47, HLE::Wrap<CreatePort>, "CreatePort"}, | 1158 | {0x47, HLE::Wrap<CreatePort>, "CreatePort"}, |
| 1148 | {0x48, HLE::Wrap<CreateSessionToPort>, "CreateSessionToPort"}, | 1159 | {0x48, HLE::Wrap<CreateSessionToPort>, "CreateSessionToPort"}, |
| 1149 | {0x49, HLE::Wrap<CreateSession>, "CreateSession"}, | 1160 | {0x49, HLE::Wrap<CreateSession>, "CreateSession"}, |
| 1150 | {0x4A, nullptr, "AcceptSession"}, | 1161 | {0x4A, HLE::Wrap<AcceptSession>, "AcceptSession"}, |
| 1151 | {0x4B, nullptr, "ReplyAndReceive1"}, | 1162 | {0x4B, nullptr, "ReplyAndReceive1"}, |
| 1152 | {0x4C, nullptr, "ReplyAndReceive2"}, | 1163 | {0x4C, nullptr, "ReplyAndReceive2"}, |
| 1153 | {0x4D, nullptr, "ReplyAndReceive3"}, | 1164 | {0x4D, nullptr, "ReplyAndReceive3"}, |