diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-19 04:18:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 04:18:46 +0100 |
commit | 611141e09f090e067e98cd99cd5ad56c96c302bb (patch) | |
tree | 75ef6e356998eb3a68a1cbf10db3d22fbc48d42e | |
parent | Merge pull request #1728 from FearlessTobi/reset-signal (diff) | |
parent | vi: Implement TransactParcel for Disconnect and DetachBuffer (diff) | |
download | yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.gz yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.bz2 yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.lz yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.xz yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.zst yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.zip |
-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"); } |