From 464c9398ae49d8faae46f81fb7040155408858f7 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 30 Aug 2023 23:18:38 +0100 Subject: Perform very minor load/unload optimisations Because why not. --- src/demorec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/demorec.c') diff --git a/src/demorec.c b/src/demorec.c index e728ca5..6e3b2ec 100644 --- a/src/demorec.c +++ b/src/demorec.c @@ -29,6 +29,7 @@ #include "mem.h" #include "os.h" #include "ppmagic.h" +#include "sst.h" #include "vcall.h" #include "x86.h" #include "x86util.h" @@ -289,6 +290,7 @@ INIT { } END { + if (!sst_userunloaded) return; // avoid dumb edge case if someone somehow records and immediately unloads if (*recording && *demonum == 0) *demonum = 1; void **vtable = *(void ***)demorecorder; -- cgit v1.2.3