From 03a6f3b0f424ad2e4f0dc53e38b325cb1da6a91c Mon Sep 17 00:00:00 2001 From: David Marcec Date: Fri, 24 Apr 2020 17:16:39 +1000 Subject: vi: Don't let uninitialized data pass as a response for SetBufferCount Currently SetBufferCount doesn't write to the out buffer which then contains uninitialized data. This leads to non-zero data which leads to responding with different error codes --- src/core/hle/service/vi/vi.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/vi') diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 7f109f4eb..9390ca83d 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -267,7 +267,7 @@ protected: private: struct Data { - u32_le unk_0; + u32_le unk_0{}; }; Data data{}; @@ -614,6 +614,14 @@ private: ctx.WriteBuffer(response.Serialize()); break; } + case TransactionId::SetBufferCount: { + LOG_WARNING(Service_VI, "(STUBBED) called, transaction=SetBufferCount"); + [[maybe_unused]] const auto buffer = ctx.ReadBuffer(); + + IGBPEmptyResponseParcel response{}; + ctx.WriteBuffer(response.Serialize()); + break; + } default: ASSERT_MSG(false, "Unimplemented"); } -- cgit v1.2.3