diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-06-02 01:26:45 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-06-02 01:30:26 +0100 |
commit | 3ebe43eb75806990a402aafd5858de615d5c1cca (patch) | |
tree | 16edcb4b560520ad5225673e1a8ad45facc20c40 /src/autojump.c | |
parent | 74563bfb8c506150172b9bbf73d828372add3394 (diff) |
Solve the error logging situation
Diffstat (limited to 'src/autojump.c')
-rw-r--r-- | src/autojump.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/autojump.c b/src/autojump.c index a8064da..e0b6a9f 100644 --- a/src/autojump.c +++ b/src/autojump.c @@ -18,6 +18,7 @@ #include "con_.h" #include "engineapi.h" +#include "errmsg.h" #include "gamedata.h" #include "intdefs.h" #include "hook.h" @@ -63,30 +64,30 @@ static bool unprot(void *gm) { void **vtable = *(void ***)gm; bool ret = os_mprot(vtable + vtidx_CheckJumpButton, sizeof(void *), PAGE_READWRITE); - if (!ret) con_warn("autojump: couldn't make memory writable\n"); + if (!ret) errmsg_errorsys("couldn't make virtual table writable"); return ret; } bool autojump_init(void) { // TODO(featgen): auto-check these factories if (!factory_client || !factory_server) { - con_warn("autojump: missing required factories\n"); + errmsg_warnx("missing required factories"); return false; } if (!has_vtidx_CheckJumpButton || !has_off_mv) { - con_warn("autojump: missing gamedata entries for this engine\n"); + errmsg_warnx("missing gamedata entries for this engine"); return false; } gmsv = factory_server("GameMovement001", 0); if (!gmsv) { - con_warn("autojump: couldn't get server-side game movement interface\n"); + errmsg_errorx("couldn't get server-side game movement interface"); return false; } if (!unprot(gmsv)) return false; gmcl = factory_client("GameMovement001", 0); if (!gmcl) { - con_warn("autojump: couldn't get client-side game movement interface\n"); + errmsg_errorx("couldn't get client-side game movement interface"); return false; } if (!unprot(gmcl)) return false; |