libstratosphere: Fix receive for multi-static IPC buffers

This commit is contained in:
Michael Scire
2018-10-17 03:48:30 -07:00
parent 4944986814
commit 781f2597e5
2 changed files with 5 additions and 1 deletions

View File

@@ -187,6 +187,10 @@ class ISession : public IWaitable {
ipcAddRecvStatic(&c_for_reply, this->pointer_buffer.data(), this->pointer_buffer.size(), 0);
ipcPrepareHeader(&c_for_reply, 0);
/* Fix libnx bug in serverside C descriptor handling. */
((u32 *)armGetTls())[1] &= 0xFFFFC3FF;
((u32 *)armGetTls())[1] |= (2) << 10;
if (R_SUCCEEDED(rc = svcReplyAndReceive(&handle_index, &this->server_handle, 1, 0, U64_MAX))) {
if (handle_index != 0) {
/* TODO: Panic? */