From a5372622f33f44ac83f28bc09ff8b79cb2676ef5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 1 Jun 2025 20:29:46 +0100 Subject: Fix bad returns missed in the feature init rewrite --- src/autojump.c | 2 +- src/nosleep.c | 4 ++-- src/rinput.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/autojump.c b/src/autojump.c index 6d0fbda..2656796 100644 --- a/src/autojump.c +++ b/src/autojump.c @@ -91,7 +91,7 @@ INIT { errmsg_errorx("couldn't get server-side game movement interface"); return FEAT_FAIL; } - if_cold (!unprot(gmsv)) return false; + if_cold (!unprot(gmsv)) return FEAT_FAIL; gmcl = factory_client("GameMovement001", 0); if_cold (!gmcl) { errmsg_errorx("couldn't get client-side game movement interface"); diff --git a/src/nosleep.c b/src/nosleep.c index a622044..b440bf3 100644 --- a/src/nosleep.c +++ b/src/nosleep.c @@ -42,9 +42,9 @@ static void VCALLCONV hook_SleepUntilInput(void *this, int timeout) { } PREINIT { - if (con_findvar("engine_no_focus_sleep")) return false; + if (con_findvar("engine_no_focus_sleep")) return FEAT_SKIP; con_regvar(engine_no_focus_sleep); - return true; + return FEAT_OK; } INIT { diff --git a/src/rinput.c b/src/rinput.c index f4e498e..1e957b0 100644 --- a/src/rinput.c +++ b/src/rinput.c @@ -126,8 +126,8 @@ static uint VCALLCONV hook_GetRawMouseAccumulators(void *this, int *x, int *y) { INIT { bool has_rawinput = !!con_findvar("m_rawinput"); if (has_rawinput) { - if (!has_vtidx_GetRawMouseAccumulators) return false; - if (!inputsystem) return false; + if (!has_vtidx_GetRawMouseAccumulators) return FEAT_INCOMPAT; + if (!inputsystem) return FEAT_INCOMPAT; vtable_insys = mem_loadptr(inputsystem); // XXX: this is kind of duping nosleep, but that won't always init... if_cold (!os_mprot(vtable_insys + vtidx_GetRawMouseAccumulators, -- cgit v1.2.3-54-g00ecf