From 165aa899bc9d1ea0bebb7b08351582dfeff8bbde Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 30 May 2022 00:57:45 +0100 Subject: Add basic Portal crosshair colour customisation Currently only works in 3420 and 5135 and uses hardcoded offsets with a byte pattern sanity check. Future work includes making it more widely compatible, and also doing the crazy thing I wanted to do but gave up on wherein the actual textures and stuff get patched in memory to sync up all the colours. Oh also, a couple of vtables were erroneously made executable, so I went ahead and fixed that while I was at it. --- src/nosleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nosleep.c') diff --git a/src/nosleep.c b/src/nosleep.c index 4ad02df..c1c5a9b 100644 --- a/src/nosleep.c +++ b/src/nosleep.c @@ -55,7 +55,7 @@ bool nosleep_init(void) { } vtable = *(void ***)insys; if (!os_mprot(vtable + vtidx_SleepUntilInput, sizeof(void *), - PAGE_EXECUTE_READWRITE)) { + PAGE_READWRITE)) { con_warn("nosleep: couldn't make memory writable\n"); return false; } -- cgit v1.2.3