Make fakeContext use correct value from currentContext

This commit is contained in:
Alex Pedley 2025-02-17 15:59:54 +00:00 committed by GitHub
parent ee99e5f0f2
commit 4f8898b302
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);