summaryrefslogtreecommitdiffhomepage
path: root/src/demorec.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-05-30 00:57:45 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-05-30 23:37:45 +0100
commit165aa899bc9d1ea0bebb7b08351582dfeff8bbde (patch)
tree4f966f7d4526224138b8c38bb57dcddae26029aa /src/demorec.c
parentdacb42286f41065c495b685a73ac6885dba3dcd8 (diff)
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.
Diffstat (limited to 'src/demorec.c')
-rw-r--r--src/demorec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/demorec.c b/src/demorec.c
index 448e92d..a7e0486 100644
--- a/src/demorec.c
+++ b/src/demorec.c
@@ -234,7 +234,7 @@ bool demorec_init(void) {
void **vtable = *(void ***)demorecorder;
// XXX: 16 is totally arbitrary here! figure out proper bounds later
- if (!os_mprot(vtable, 16 * sizeof(void *), PAGE_EXECUTE_READWRITE)) {
+ if (!os_mprot(vtable, 16 * sizeof(void *), PAGE_READWRITE)) {
#ifdef _WIN32
char err[128];
OS_WINDOWS_ERROR(err);