2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

hle_ipc: Do not ensure write buffer size.

This commit is contained in:
bunnei 2018-03-31 16:05:19 -04:00
parent 88582b84a5
commit eef097bdc7

View file

@ -268,8 +268,11 @@ std::vector<u8> HLERequestContext::ReadBuffer() const {
size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size) const { size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size) const {
const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()}; const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()};
const size_t buffer_size{GetWriteBufferSize()};
ASSERT_MSG(size <= GetWriteBufferSize(), "Size %lx is too big", size); if (size > buffer_size) {
LOG_CRITICAL(Core, "size=%08x is greater than buffer_size=%08x", size, buffer_size);
size = buffer_size; // TODO(bunnei): This needs to be HW tested
}
if (is_buffer_b) { if (is_buffer_b) {
Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size); Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size);