diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-18 19:18:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-18 19:18:46 -0800 |
commit | 611141e09f090e067e98cd99cd5ad56c96c302bb (patch) | |
tree | 75ef6e356998eb3a68a1cbf10db3d22fbc48d42e /src | |
parent | 9a1bac840eab6f2353192c2c389972046d5bbed6 (diff) | |
parent | c91dc417d53615417a31bf810c5d05adf7c2b88b (diff) |
Merge pull request #1671 from DarkLordZach/vi-disconnect
vi: Implement TransactParcel for Disconnect and DetachBuffer
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index d764b2406..d25fdb1fe 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -237,6 +237,22 @@ private: Data data{}; }; +/// Represents a parcel containing one int '0' as its data +/// Used by DetachBuffer and Disconnect +class IGBPEmptyResponseParcel : public Parcel { +protected: + void SerializeData() override { + Write(data); + } + +private: + struct Data { + u32_le unk_0; + }; + + Data data{}; +}; + class IGBPSetPreallocatedBufferRequestParcel : public Parcel { public: explicit IGBPSetPreallocatedBufferRequestParcel(std::vector<u8> buffer) @@ -554,6 +570,12 @@ private: ctx.WriteBuffer(response.Serialize()); } else if (transaction == TransactionId::CancelBuffer) { LOG_CRITICAL(Service_VI, "(STUBBED) called, transaction=CancelBuffer"); + } else if (transaction == TransactionId::Disconnect || + transaction == TransactionId::DetachBuffer) { + const auto buffer = ctx.ReadBuffer(); + + IGBPEmptyResponseParcel response{}; + ctx.WriteBuffer(response.Serialize()); } else { ASSERT_MSG(false, "Unimplemented"); } |