aboutsummaryrefslogtreecommitdiff
path: root/patches/prboom/0001-skip-zclose.patch
blob: 51b81b02f726af4f7113f5fc5597c30e8bc2a5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/Makefile b/Makefile
index 5dfa675..c913d73 100644
--- a/Makefile
+++ b/Makefile
@@ -163,7 +163,8 @@ else ifeq ($(platform), classic_armv7_a7)
 	-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
 	-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
 	-fmerge-all-constants -fno-math-errno \
-	-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
+	-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard \
+	-DSKIP_ZCLOSE
 	CXXFLAGS += $(CFLAGS)
 	HAVE_NEON = 1
 	ARCH = arm
diff --git a/src/z_zone.c b/src/z_zone.c
index bf9ec1a..5a89885 100644
--- a/src/z_zone.c
+++ b/src/z_zone.c
@@ -116,7 +116,7 @@ void Z_Close(void)
    /* The libretro core will crash on
     * close content if we free memory
     * here while running on Windows... */
-#if !defined(_WIN32)
+#if !defined(_WIN32) && !defined(SKIP_ZCLOSE)
    Z_FreeTags(PU_FREE, PU_MAX);
 #endif
    memory_size = 0;