Grow the HeapDef for tex_heap_extra_mb at the game's own resolution too

heapdef_overlay returned at once when res_heap_extra_kib() was 0, which it is at 1920x1080 with the game's scene size
and shadow map, so tex_heap_extra_mb did nothing there and a 1080p player with an HD pack still hit the Blood Moon
loop. It now also builds the table when res_tex_heap_extra_bytes() is set. Found by itaskaev2 in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Herbert CostaandClaude Opus 5.5 authored and itaskaev2 committed 2026-11-06 09:43:41 +01:00
1 parent a57ea119fa
commit 2a70683007
1 file changed
+4 -4
+4 -4
View File
@@ -829,12 +829,12 @@ static void restbl_overlay(void) {
members, packs, (now_s() - t0) * 1000);
}
// The HeapDef table a bigger game resolution needs (resolution.c): its texture heap and that heap's parent grow. The
// base is an overlay that replaces the table (a mod's heap sizes stay), else the RomFS original; the grown table is
// written to <profile>/resolution/ and served in the base's place.
// The HeapDef table a bigger game resolution or TOTK_TEX_HEAP_EXTRA_MB needs (resolution.c): its texture heaps and
// their parents grow. The base is an overlay that replaces the table (a mod's heap sizes stay), else the RomFS
// original; the grown table is written to <profile>/resolution/ and served in the base's place.
#define HEAPDEF "System/HeapSize/Product.Nin_NX_NVN.HeapDef.byml.zs"
static void heapdef_overlay(void) {
if (!res_heap_extra_kib()) return;
if (!res_heap_extra_kib() && !res_tex_heap_extra_bytes()) return;
static const char keeps[] = "the game keeps its own resolution";
Overlay *base;
size_t n;