summaryrefslogtreecommitdiffhomepage
path: root/src/demorec.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-07-16 16:37:25 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-07-23 19:02:10 +0100
commit8c8680ad112f3ad1360aa5547392119ed4de6581 (patch)
tree66e4a6f650693dedf20246d083492153724aae10 /src/demorec.c
parent5b801b6934bf8361af4cee7556351a7fd43150fa (diff)
Add keybind lookup code
Also centralise NEXT_INSN macro, into its own header at least for now.
Diffstat (limited to 'src/demorec.c')
-rw-r--r--src/demorec.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/demorec.c b/src/demorec.c
index 17b1d08..b4a674d 100644
--- a/src/demorec.c
+++ b/src/demorec.c
@@ -32,6 +32,7 @@
#include "ppmagic.h"
#include "vcall.h"
#include "x86.h"
+#include "x86util.h"
DEF_CVAR(sst_autorecord, "Continuously record demos even after reconnecting", 1,
CON_ARCHIVE | CON_HIDDEN)
@@ -152,17 +153,6 @@ static void hook_stop_cb(const struct con_cmdargs *args) {
wantstop = false;
}
-// XXX: probably want some general foreach-instruction macro once we start doing
-// this kind of hackery in multiple different places
-#define NEXT_INSN(p, tgt) do { \
- int _len = x86_len(p); \
- if (_len == -1) { \
- errmsg_errorx("unknown or invalid instruction looking for %s", tgt); \
- return false; \
- } \
- (p) += _len; \
-} while (0)
-
// This finds the "demorecorder" global variable (the engine-wide CDemoRecorder
// instance).
static inline bool find_demorecorder(void) {