Fixed incorrect vector reserve when auto recording.

This commit is contained in:
Caball009
2026-09-05 22:28:11 +02:00
parent 479aef7082
commit 7cd53590a8
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -326,7 +326,8 @@ namespace // demo class
// store gamestate for user file
write_network_data(crit_data_, network_data);
// reserve memory (low size if auto recording is enabled, because then the demo writes almost directly to disk)
// reserve memory; use smaller buffer size when auto recording is enabled,
// since the data is written to disk almost right away.
const auto reserve_size = (demo_autorecord && demo_autorecord->current.enabled) ? 8192 : 1024 * 1024;
auto_buffer_.reserve_memory(reserve_size);