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/nosleep.c | |
parent | 74563bfb8c506150172b9bbf73d828372add3394 (diff) |
Solve the error logging situation
Diffstat (limited to 'src/nosleep.c')
-rw-r--r-- | src/nosleep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nosleep.c b/src/nosleep.c index c1c5a9b..c849f04 100644 --- a/src/nosleep.c +++ b/src/nosleep.c @@ -18,6 +18,7 @@ #include "con_.h" #include "engineapi.h" +#include "errmsg.h" #include "gamedata.h" #include "hook.h" #include "os.h" @@ -41,22 +42,22 @@ bool nosleep_init(void) { con_reg(engine_no_focus_sleep); // TODO(featgen): auto-check these factories if (!factory_inputsystem) { - con_warn("nosleep: missing required factories\n"); + errmsg_warnx("missing required factories"); return false; } if (!has_vtidx_SleepUntilInput) { - con_warn("nosleep: missing gamedata entries for this engine\n"); + errmsg_warnx("missing gamedata entries for this engine"); return false; } void *insys = factory_inputsystem("InputSystemVersion001", 0); if (!insys) { - con_warn("nosleep: couldn't get input system interface\n"); + errmsg_errorx("couldn't get input system interface"); return false; } vtable = *(void ***)insys; if (!os_mprot(vtable + vtidx_SleepUntilInput, sizeof(void *), PAGE_READWRITE)) { - con_warn("nosleep: couldn't make memory writable\n"); + errmsg_errorx("couldn't make virtual table writable"); return false; } orig_SleepUntilInput = (SleepUntilInput_func)hook_vtable(vtable, |