Browse Source
Merge pull request #1671 from DarkLordZach/vi-disconnect
vi: Implement TransactParcel for Disconnect and DetachBuffer
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
22 additions and
0 deletions
-
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"); |
|
|
|
} |
|
|
|
|