Early return pointerstate if exceeded max element count

This commit is contained in:
Nic Barker 2024-11-30 19:38:16 +13:00
parent 4f34b25a49
commit 7cfa5b03fe

3
clay.h
View File

@ -3405,6 +3405,9 @@ void Clay_SetLayoutDimensions(Clay_Dimensions dimensions) {
CLAY_WASM_EXPORT("Clay_SetPointerState")
void Clay_SetPointerState(Clay_Vector2 position, bool isPointerDown) {
if (Clay__debugMaxElementsLatch) {
return;
}
Clay__pointerInfo.position = position;
Clay__pointerOverIds.length = 0;
Clay__int32_tArray dfsBuffer = Clay__layoutElementChildrenBuffer;