From 8c8680ad112f3ad1360aa5547392119ed4de6581 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 16 Jul 2022 16:37:25 +0100 Subject: Add keybind lookup code Also centralise NEXT_INSN macro, into its own header at least for now. --- src/demorec.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/demorec.c') 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) { -- cgit v1.2.3