summaryrefslogtreecommitdiffstats
path: root/src/skel/win/win.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-25 22:49:50 +0100
committeraap <aap@papnet.eu>2020-11-25 22:49:50 +0100
commit4ddc35634160da5779c46ab63a5b3d351af50b83 (patch)
tree9e38a65296bb049d0292948c135ef8f3a939df9b /src/skel/win/win.cpp
parentimplemented CMemoryHeap, not used or tested yet (diff)
downloadre3-4ddc35634160da5779c46ab63a5b3d351af50b83.tar
re3-4ddc35634160da5779c46ab63a5b3d351af50b83.tar.gz
re3-4ddc35634160da5779c46ab63a5b3d351af50b83.tar.bz2
re3-4ddc35634160da5779c46ab63a5b3d351af50b83.tar.lz
re3-4ddc35634160da5779c46ab63a5b3d351af50b83.tar.xz
re3-4ddc35634160da5779c46ab63a5b3d351af50b83.tar.zst
re3-4ddc35634160da5779c46ab63a5b3d351af50b83.zip
Diffstat (limited to '')
-rw-r--r--src/skel/win/win.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 9effaa31..b4897d67 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -97,6 +97,7 @@ static psGlobalType PsGlobal;
#include "Sprite2d.h"
#include "AnimViewer.h"
#include "Font.h"
+#include "MemoryHeap.h"
VALIDATE_SIZE(psGlobalType, 0x28);
@@ -304,7 +305,11 @@ psMouseSetPos(RwV2d *pos)
RwMemoryFunctions*
psGetMemoryFunctions(void)
{
+#ifdef USE_CUSTOM_ALLOCATOR
+ return &memFuncs;
+#else
return nil;
+#endif
}
/*
@@ -2006,7 +2011,11 @@ WinMain(HINSTANCE instance,
RwChar **argv;
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
-#if 0
+#ifdef USE_CUSTOM_ALLOCATOR
+ InitMemoryMgr();
+#endif
+
+#if 1
// TODO: make this an option somewhere
AllocConsole();
freopen("CONIN$", "r", stdin);