mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 17:17:09 -04:00
DS: Try to fix crash when generating 64x64x64 world
This commit is contained in:
parent
47d5b5e17c
commit
633d6abbec
@ -585,6 +585,14 @@ void Platform_Init(void) {
|
||||
Platform_Log1("Running in %c mode with NDS wifi", dsiMode ? "DSi" : "DS");
|
||||
#endif
|
||||
|
||||
// By default, the "heap limit" is calculated in `sbrk` based on current
|
||||
// stack pointer value - however this does not reliably in ClassiCube's
|
||||
// case as e.g. map gen and bitmap decoding use much more stack space
|
||||
// So to avoid having the stack overlapping the heap when more stack space
|
||||
// is used, manually reduce the heap limit by 32 kb
|
||||
extern char* fake_heap_end;
|
||||
fake_heap_end -= 32768;
|
||||
|
||||
InitFilesystem();
|
||||
InitNetworking();
|
||||
cpuStartTiming(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user