diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-17 23:10:10 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-17 23:10:19 +0100 |
commit | c91dc417d53615417a31bf810c5d05adf7c2b88b (patch) | |
tree | 82e7ec50c13f08d1f4defd9ef52c854db1693e4c | |
parent | Merge pull request #1636 from ogniK5377/hwopus-bad-assert (diff) | |
download | yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.tar yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.tar.gz yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.tar.bz2 yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.tar.lz yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.tar.xz yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.tar.zst yuzu-c91dc417d53615417a31bf810c5d05adf7c2b88b.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"); } |