summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-11-18 19:18:46 -0800
committerGravatar GitHub2018-11-18 19:18:46 -0800
commit611141e09f090e067e98cd99cd5ad56c96c302bb (patch)
tree75ef6e356998eb3a68a1cbf10db3d22fbc48d42e /src
parentMerge pull request #1728 from FearlessTobi/reset-signal (diff)
parentvi: Implement TransactParcel for Disconnect and DetachBuffer (diff)
downloadyuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.gz
yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.tar.xz
yuzu-611141e09f090e067e98cd99cd5ad56c96c302bb.zip
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.cpp22
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:
237 Data data{}; 237 Data data{};
238}; 238};
239 239
240/// Represents a parcel containing one int '0' as its data
241/// Used by DetachBuffer and Disconnect
242class IGBPEmptyResponseParcel : public Parcel {
243protected:
244 void SerializeData() override {
245 Write(data);
246 }
247
248private:
249 struct Data {
250 u32_le unk_0;
251 };
252
253 Data data{};
254};
255
240class IGBPSetPreallocatedBufferRequestParcel : public Parcel { 256class IGBPSetPreallocatedBufferRequestParcel : public Parcel {
241public: 257public:
242 explicit IGBPSetPreallocatedBufferRequestParcel(std::vector<u8> buffer) 258 explicit IGBPSetPreallocatedBufferRequestParcel(std::vector<u8> buffer)
@@ -554,6 +570,12 @@ private:
554 ctx.WriteBuffer(response.Serialize()); 570 ctx.WriteBuffer(response.Serialize());
555 } else if (transaction == TransactionId::CancelBuffer) { 571 } else if (transaction == TransactionId::CancelBuffer) {
556 LOG_CRITICAL(Service_VI, "(STUBBED) called, transaction=CancelBuffer"); 572 LOG_CRITICAL(Service_VI, "(STUBBED) called, transaction=CancelBuffer");
573 } else if (transaction == TransactionId::Disconnect ||
574 transaction == TransactionId::DetachBuffer) {
575 const auto buffer = ctx.ReadBuffer();
576
577 IGBPEmptyResponseParcel response{};
578 ctx.WriteBuffer(response.Serialize());
557 } else { 579 } else {
558 ASSERT_MSG(false, "Unimplemented"); 580 ASSERT_MSG(false, "Unimplemented");
559 } 581 }