diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-12-25 11:03:50 +0000 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-12-25 11:03:50 +0000 |
commit | 9a09c605402e6ff74f93f7fe7afc50ccc785acc3 (patch) | |
tree | 0a098cecec7e0787023df9ad4c2f6d915817bdea /src/nosleep.c | |
parent | f6fb10a7d3bfb59a729ee4b7a9368632ab52077a (diff) |
Add basic mouse input scaling
Diffstat (limited to 'src/nosleep.c')
-rw-r--r-- | src/nosleep.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nosleep.c b/src/nosleep.c index 07a5500..e75c6e6 100644 --- a/src/nosleep.c +++ b/src/nosleep.c @@ -20,12 +20,13 @@ #include "feature.h" #include "gamedata.h" #include "hook.h" +#include "mem.h" #include "os.h" #include "vcall.h" FEATURE("inactive window sleep adjustment") REQUIRE_GAMEDATA(vtidx_SleepUntilInput) -REQUIRE_GLOBAL(factory_inputsystem) +REQUIRE_GLOBAL(inputsystem) DEF_CVAR_UNREG(engine_no_focus_sleep, "Delay while tabbed out (SST reimplementation)", 50, @@ -46,12 +47,7 @@ PREINIT { } INIT { - void *insys = factory_inputsystem("InputSystemVersion001", 0); - if (!insys) { - errmsg_errorx("couldn't get input system interface"); - return false; - } - vtable = *(void ***)insys; + vtable = mem_loadptr(inputsystem); if (!os_mprot(vtable + vtidx_SleepUntilInput, sizeof(void *), PAGE_READWRITE)) { errmsg_errorx("couldn't make virtual table writable"); |