mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
vi: Implement TransactParcel for Disconnect and DetachBuffer
Used by homebrew on exit. According to switchbrew, returns an empty response parcel with one zero in it.
This commit is contained in:
parent
6664d7b2c5
commit
c91dc417d5
1 changed files with 22 additions and 0 deletions
|
@ -237,6 +237,22 @@ private:
|
||||||
Data data{};
|
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 {
|
class IGBPSetPreallocatedBufferRequestParcel : public Parcel {
|
||||||
public:
|
public:
|
||||||
explicit IGBPSetPreallocatedBufferRequestParcel(std::vector<u8> buffer)
|
explicit IGBPSetPreallocatedBufferRequestParcel(std::vector<u8> buffer)
|
||||||
|
@ -554,6 +570,12 @@ private:
|
||||||
ctx.WriteBuffer(response.Serialize());
|
ctx.WriteBuffer(response.Serialize());
|
||||||
} else if (transaction == TransactionId::CancelBuffer) {
|
} else if (transaction == TransactionId::CancelBuffer) {
|
||||||
LOG_CRITICAL(Service_VI, "(STUBBED) called, transaction=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 {
|
} else {
|
||||||
ASSERT_MSG(false, "Unimplemented");
|
ASSERT_MSG(false, "Unimplemented");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue