mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 02:19:57 +00:00
hle_ipc: Add helper functions for reading and writing buffers.
This commit is contained in:
parent
1ce6fff064
commit
fc1b425520
1 changed files with 2 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue