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

Merge pull request #6083 from Morph1984/bsd-avoid-writebuffer

bsd: Avoid writing empty buffers
This commit is contained in:
bunnei 2021-03-16 11:59:05 -07:00 committed by GitHub
commit ab102787fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,9 @@ void BSD::PollWork::Execute(BSD* bsd) {
} }
void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) { void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) {
ctx.WriteBuffer(write_buffer); if (write_buffer.size() > 0) {
ctx.WriteBuffer(write_buffer);
}
IPC::ResponseBuilder rb{ctx, 4}; IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
@ -55,7 +57,9 @@ void BSD::AcceptWork::Execute(BSD* bsd) {
} }
void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) { void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) {
ctx.WriteBuffer(write_buffer); if (write_buffer.size() > 0) {
ctx.WriteBuffer(write_buffer);
}
IPC::ResponseBuilder rb{ctx, 5}; IPC::ResponseBuilder rb{ctx, 5};
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);