diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2020-04-24 17:16:39 +1000 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2020-04-24 17:24:58 +1000 |
commit | 03a6f3b0f424ad2e4f0dc53e38b325cb1da6a91c (patch) | |
tree | e1c4b7166dd40c91d017af8dffd7acce39ee9430 /src | |
parent | 8f548266cd0493a537ed7edf56c869bd7420953a (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 7f109f4eb7..9390ca83d4 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"); } |