mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 11:11:49 +01:00
Fixup CancelBuffer fence handling
This commit is contained in:
parent
7f24c7b857
commit
ec139b3027
@ -660,7 +660,7 @@ namespace skyline::service::hosbinder {
|
||||
}
|
||||
|
||||
case TransactionCode::CancelBuffer: {
|
||||
CancelBuffer(in.Pop<i32>(), in.Pop<AndroidFence>());
|
||||
CancelBuffer(in.Pop<i32>(), in.PopFlattenable<AndroidFence>());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -49,20 +49,27 @@ namespace skyline::service::hosbinder {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A reference to an item from the top of data
|
||||
*/
|
||||
template<typename ValueType>
|
||||
ValueType &PopFlattenable() {
|
||||
auto size{Pop<u64>()};
|
||||
if (size != sizeof(ValueType))
|
||||
throw exception("Popping flattenable of size 0x{:X} with type size 0x{:X}", size, sizeof(ValueType));
|
||||
return Pop<ValueType>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A pointer to an optional flattenable from the top of data, nullptr will be returned if the object doesn't exist
|
||||
*/
|
||||
template<typename ValueType>
|
||||
ValueType *PopOptionalFlattenable() {
|
||||
bool hasObject{Pop<u32>() != 0};
|
||||
if (hasObject) {
|
||||
auto size{Pop<u64>()};
|
||||
if (size != sizeof(ValueType))
|
||||
throw exception("Popping flattenable of size 0x{:X} with type size 0x{:X}", size, sizeof(ValueType));
|
||||
return &Pop<ValueType>();
|
||||
} else {
|
||||
if (hasObject)
|
||||
return &PopFlattenable<ValueType>();
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
|
Loading…
Reference in New Issue
Block a user