diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-07-02 21:51:50 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-07-23 18:51:28 +0100 |
commit | 5b8d37094a38aff1b2669056a4011a42450fd9c5 (patch) | |
tree | 0e67c30227d4368834df94be42fef645186267c6 /src/demorec.c | |
parent | e3fd5ad05a7d933d401de431ce2d27a99d3b9995 (diff) |
Add alias management plus input filtering skeleton
Some of the alias stuff was kind of stolen from earlier figuring-out
Bill did. More Bill code is also on the way. :^)
Diffstat (limited to 'src/demorec.c')
-rw-r--r-- | src/demorec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/demorec.c b/src/demorec.c index 156e7c6..a0c85a1 100644 --- a/src/demorec.c +++ b/src/demorec.c @@ -165,7 +165,7 @@ static void hook_stop_cb(const struct con_cmdargs *args) { // This finds the "demorecorder" global variable (the engine-wide CDemoRecorder // instance). -static inline bool find_demorecorder(struct con_cmd *cmd_stop) { +static inline bool find_demorecorder(void) { #ifdef _WIN32 // The "stop" command calls the virtual function demorecorder.IsRecording(), // so just look for the load of the "this" pointer into ECX @@ -224,7 +224,7 @@ bool demorec_init(void) { return false; } orig_stop_cb = con_getcmdcb(cmd_stop); - if (!find_demorecorder(cmd_stop)) { + if (!find_demorecorder()) { errmsg_errorx("couldn't find demo recorder instance"); return false; } @@ -245,8 +245,8 @@ bool demorec_init(void) { orig_StopRecording = (StopRecording_func)hook_vtable(vtable, vtidx_StopRecording, (void *)&hook_StopRecording); - orig_record_cb = cmd_record->cb; cmd_record->cb = &hook_record_cb; - orig_stop_cb = cmd_stop->cb; cmd_stop->cb = &hook_stop_cb; + cmd_record->cb = &hook_record_cb; + cmd_stop->cb = &hook_stop_cb; sst_autorecord->base.flags &= ~CON_HIDDEN; return true; |