Henri Verbeet : vkd3d-compiler: Default to monochrome output when NO_COLOUR/NO_COLOR is set.

Alexandre Julliard julliard at winehq.org
Tue Aug 31 15:37:36 CDT 2021


Module: vkd3d
Branch: master
Commit: 0de7a2eeb5ccff2d8c1e3016fb5f2dec1ad29e9b
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=0de7a2eeb5ccff2d8c1e3016fb5f2dec1ad29e9b

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Aug 31 01:16:26 2021 +0200

vkd3d-compiler: Default to monochrome output when NO_COLOUR/NO_COLOR is set.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 README                         | 5 +++++
 programs/vkd3d-compiler/main.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/README b/README
index 3c70ede..ed53f20 100644
--- a/README
+++ b/README
@@ -45,6 +45,11 @@ removed in the future versions of vkd3d.
 Some of debug variables are lists of elements. Elements must be separated by
 commas or semicolons.
 
+ * NO_COLOR - this is an alias of NO_COLOUR.
+
+ * NO_COLOUR - when set, vkd3d-compiler will default to monochrome output,
+   even when the output supports colour.
+
  * VKD3D_CONFIG - a list of options that change the behavior of libvkd3d.
     * vk_debug - enables Vulkan debug extensions.
 
diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c
index 40e27ed..ac01d59 100644
--- a/programs/vkd3d-compiler/main.c
+++ b/programs/vkd3d-compiler/main.c
@@ -674,7 +674,7 @@ int main(int argc, char **argv)
         }
     }
 
-    if (!options.explicit_colour && has_colour(output))
+    if (!options.explicit_colour && !getenv("NO_COLOUR") && !getenv("NO_COLOR") && has_colour(output))
         options.formatting |= VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR;
     add_compile_option(&options, VKD3D_SHADER_COMPILE_OPTION_FORMATTING, options.formatting);
 




More information about the wine-cvs mailing list