mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 20:31:48 +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: {
|
case TransactionCode::CancelBuffer: {
|
||||||
CancelBuffer(in.Pop<i32>(), in.Pop<AndroidFence>());
|
CancelBuffer(in.Pop<i32>(), in.PopFlattenable<AndroidFence>());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,20 +49,27 @@ namespace skyline::service::hosbinder {
|
|||||||
return value;
|
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
|
* @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>
|
template<typename ValueType>
|
||||||
ValueType *PopOptionalFlattenable() {
|
ValueType *PopOptionalFlattenable() {
|
||||||
bool hasObject{Pop<u32>() != 0};
|
bool hasObject{Pop<u32>() != 0};
|
||||||
if (hasObject) {
|
if (hasObject)
|
||||||
auto size{Pop<u64>()};
|
return &PopFlattenable<ValueType>();
|
||||||
if (size != sizeof(ValueType))
|
else
|
||||||
throw exception("Popping flattenable of size 0x{:X} with type size 0x{:X}", size, sizeof(ValueType));
|
|
||||||
return &Pop<ValueType>();
|
|
||||||
} else {
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename ValueType>
|
template<typename ValueType>
|
||||||
|
Loading…
Reference in New Issue
Block a user