mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:13:00 +00:00
Merge pull request #581 from mailwl/empty-buf-skip
IPC: skip empty buffer write
This commit is contained in:
commit
52a78228dd
|
@ -271,6 +271,11 @@ std::vector<u8> HLERequestContext::ReadBuffer(int buffer_index) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size, int buffer_index) const {
|
size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size, int buffer_index) const {
|
||||||
|
if (size == 0) {
|
||||||
|
NGLOG_WARNING(Core, "skip empty buffer write");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[buffer_index].Size()};
|
const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[buffer_index].Size()};
|
||||||
const size_t buffer_size{GetWriteBufferSize(buffer_index)};
|
const size_t buffer_size{GetWriteBufferSize(buffer_index)};
|
||||||
if (size > buffer_size) {
|
if (size > buffer_size) {
|
||||||
|
|
Loading…
Reference in a new issue