mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Refactor Jolt-related project settings to only be loaded as needed
This commit is contained in:
parent
b15b24b087
commit
3b78ff564a
18 changed files with 137 additions and 247 deletions
|
|
@ -64,7 +64,7 @@ constexpr TValue align_up(TValue p_value, TAlignment p_alignment) {
|
|||
} //namespace
|
||||
|
||||
JoltTempAllocator::JoltTempAllocator() :
|
||||
capacity((uint64_t)JoltProjectSettings::get_temp_memory_b()),
|
||||
capacity((uint64_t)JoltProjectSettings::temp_memory_b),
|
||||
base(static_cast<uint8_t *>(JPH::Allocate((size_t)capacity))) {
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ void *JoltTempAllocator::Allocate(uint32_t p_size) {
|
|||
WARN_PRINT_ONCE(vformat("Jolt Physics temporary memory allocator exceeded capacity of %d MiB. "
|
||||
"Falling back to slower general-purpose allocator. "
|
||||
"Consider increasing maximum temporary memory in project settings.",
|
||||
JoltProjectSettings::get_temp_memory_mib()));
|
||||
JoltProjectSettings::temp_memory_mib));
|
||||
|
||||
ptr = JPH::Allocate(p_size);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue