diff options
author | Subv <subv2112@gmail.com> | 2015-12-15 17:34:35 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-12-24 15:19:27 +0100 |
commit | 282f2c8042a40e6e3f731cc96a7c43f093cd53d8 (patch) | |
tree | 3e6003af3bf6b83234ccb5b705e1a60d609b65f6 /src/core/hle/service/soc_u.cpp | |
parent | Merge pull request #1267 from yuriks/flipped-framebuffer (diff) | |
download | yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.tar yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.tar.gz yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.tar.bz2 yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.tar.lz yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.tar.xz yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.tar.zst yuzu-282f2c8042a40e6e3f731cc96a7c43f093cd53d8.zip |
Diffstat (limited to 'src/core/hle/service/soc_u.cpp')
-rw-r--r-- | src/core/hle/service/soc_u.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp index 633b66fe2..822b093f4 100644 --- a/src/core/hle/service/soc_u.cpp +++ b/src/core/hle/service/soc_u.cpp @@ -552,13 +552,23 @@ static void RecvFrom(Service::Interface* self) { u32 flags = cmd_buffer[3]; socklen_t addr_len = static_cast<socklen_t>(cmd_buffer[4]); - u8* output_buff = Memory::GetPointer(cmd_buffer[0x104 >> 2]); + struct + { + u32 output_buffer_descriptor; + u32 output_buffer_addr; + u32 address_buffer_descriptor; + u32 output_src_address_buffer; + } buffer_parameters; + + std::memcpy(&buffer_parameters, &cmd_buffer[64], sizeof(buffer_parameters)); + + u8* output_buff = Memory::GetPointer(buffer_parameters.output_buffer_addr); sockaddr src_addr; socklen_t src_addr_len = sizeof(src_addr); int ret = ::recvfrom(socket_handle, (char*)output_buff, len, flags, &src_addr, &src_addr_len); - if (cmd_buffer[0x1A0 >> 2] != 0) { - CTRSockAddr* ctr_src_addr = reinterpret_cast<CTRSockAddr*>(Memory::GetPointer(cmd_buffer[0x1A0 >> 2])); + if (buffer_parameters.output_src_address_buffer != 0) { + CTRSockAddr* ctr_src_addr = reinterpret_cast<CTRSockAddr*>(Memory::GetPointer(buffer_parameters.output_src_address_buffer)); *ctr_src_addr = CTRSockAddr::FromPlatform(src_addr); } |