From 9f82f28fc16c6e6fb8a024f1ff6e2ef6ba7fd854 Mon Sep 17 00:00:00 2001 From: BatteryShark Date: Thu, 2 Mar 2023 00:15:27 -0500 Subject: [PATCH] Added additional notes for colormap patch and proper naming of value. --- src/main/hook/patch/gfx.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/hook/patch/gfx.c b/src/main/hook/patch/gfx.c index 7e59b95..9c2f1dc 100644 --- a/src/main/hook/patch/gfx.c +++ b/src/main/hook/patch/gfx.c @@ -78,11 +78,14 @@ Window XCreateWindow( } if (patch_gfx_initialized) { - - if (valuemask == 0x80A) { - log_info("Patching to enable usage of non nvidia cards."); - /* enables usage of non nvidia cards and newer nvidia models */ - valuemask = 0x280A; + // During early Exceed-Era code, CWColorMap was not included as a valuemask for creation of a window. + // Eventually, this was brought back, but it's suspected that NVIDIA cards, drivers at the time, or + // perhaps even a combination of that and X11 supported querying the gpu itself for a colormap. + // Either way, this no longer works consistently and we need to account for that. + if (valuemask & CWColormap == 0) { + log_info("Adding CWColorMap to ValueMask for Non-NVIDIA Cards."); + /* enables usage of nvidia cards where hardware colormaps are not available or supported */ + valuemask |= CWColormap; } }