yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

hle_ipc: Add helper functions for reading and writing buffers.

This commit is contained in:
bunnei 2018-02-13 23:53:18 -05:00
parent 1ce6fff064
commit fc1b425520
1 changed files with 2 additions and 4 deletions

View File

@ -230,14 +230,12 @@ size_t HLERequestContext::WriteBuffer(const void* buffer, const size_t size) con
const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()};
if (is_buffer_b) {
const size_t size{std::min(BufferDescriptorB()[0].Size(), size)};
Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size);
return size;
} else {
const size_t size{std::min(BufferDescriptorC()[0].Size(), size)};
Memory::WriteBlock(BufferDescriptorC()[0].Address(), buffer, size);
return size;
}
return size;
}
size_t HLERequestContext::WriteBuffer(const std::vector<u8>& buffer) const {