[Core] Make fakeContext use correct value from currentContext (#269)

This commit is contained in:
Alex Pedley 2025-02-19 20:21:14 +00:00 committed by GitHub
parent a60b977946
commit 5afdf3f8c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
clay.h
View File

@ -3589,7 +3589,7 @@ uint32_t Clay_MinMemorySize(void) {
Clay_Context* currentContext = Clay_GetCurrentContext();
if (currentContext) {
fakeContext.maxElementCount = currentContext->maxElementCount;
fakeContext.maxMeasureTextCacheWordCount = currentContext->maxElementCount;
fakeContext.maxMeasureTextCacheWordCount = currentContext->maxMeasureTextCacheWordCount;
}
// Reserve space in the arena for the context, important for calculating min memory size correctly
Clay__Context_Allocate_Arena(&fakeContext.internalArena);