mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-27 11:45:42 +00:00
hle_ipc: Add helper functions for reading and writing buffers.
This commit is contained in:
parent
1ce6fff064
commit
fc1b425520
|
@ -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