mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-09 15:49:59 +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()};
|
const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()};
|
||||||
|
|
||||||
if (is_buffer_b) {
|
if (is_buffer_b) {
|
||||||
const size_t size{std::min(BufferDescriptorB()[0].Size(), size)};
|
|
||||||
Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size);
|
Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size);
|
||||||
return size;
|
|
||||||
} else {
|
} else {
|
||||||
const size_t size{std::min(BufferDescriptorC()[0].Size(), size)};
|
|
||||||
Memory::WriteBlock(BufferDescriptorC()[0].Address(), buffer, size);
|
Memory::WriteBlock(BufferDescriptorC()[0].Address(), buffer, size);
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t HLERequestContext::WriteBuffer(const std::vector<u8>& buffer) const {
|
size_t HLERequestContext::WriteBuffer(const std::vector<u8>& buffer) const {
|
||||||
|
|
Loading…
Reference in a new issue