diff --git a/prboom2/src/gl_main.c b/prboom2/src/gl_main.c index 9efe79b77..460e2356b 100644 --- a/prboom2/src/gl_main.c +++ b/prboom2/src/gl_main.c @@ -850,7 +850,12 @@ void gld_FillBlock(int x, int y, int width, int height, int col) void gld_DrawShaded(int x, int y, int width, int height, int shade) { - color_rgb_t color = gld_LookupIndexedColor(playpal_black, V_IsAutomapLightmodeIndexed()); + // This is more messy than I'd like. (I hate this, but this is my current fix for the menu overlay invert) + // The `col` fixes the menu overlay from inverting during `invul_cm`. + // The 'automap` boolean is to undo the `col` invert for the automap. + dboolean automap = V_IsAutomapLightmodeIndexed(); + int col = invul_cm && !automap ? playpal_white : playpal_black; + color_rgb_t color = gld_LookupIndexedColor(col, V_IsUILightmodeIndexed() || V_IsAutomapLightmodeIndexed()); glsl_PushNullShader();