Skip to content

Commit c46d1e4

Browse files
committed
Merge pull request #97552 from dustdfg/drivers/use_dedicated_print_error
Use dedicated `print_error` method for colored output for unsupported drivers
2 parents 6c15d59 + 4c5094a commit c46d1e4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/SCsub

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python
22
from misc.utility.scons_hints import *
33

4+
from methods import print_error
5+
46
Import("env")
57

68
env.drivers_sources = []
@@ -20,7 +22,7 @@ if env["platform"] == "windows":
2022
SConscript("backtrace/SCsub")
2123
if env["xaudio2"]:
2224
if "xaudio2" not in supported:
23-
print("Target platform '{}' does not support the XAudio2 audio driver. Aborting.".format(env["platform"]))
25+
print_error("Target platform '{}' does not support the XAudio2 audio driver".format(env["platform"]))
2426
Exit(255)
2527
SConscript("xaudio2/SCsub")
2628

@@ -34,7 +36,7 @@ if env["vulkan"]:
3436
SConscript("vulkan/SCsub")
3537
if env["d3d12"]:
3638
if "d3d12" not in supported:
37-
print("Target platform '{}' does not support the D3D12 rendering driver. Aborting.".format(env["platform"]))
39+
print_error("Target platform '{}' does not support the D3D12 rendering driver".format(env["platform"]))
3840
Exit(255)
3941
SConscript("d3d12/SCsub")
4042
if env["opengl3"]:
@@ -43,7 +45,7 @@ if env["opengl3"]:
4345
SConscript("egl/SCsub")
4446
if env["metal"]:
4547
if "metal" not in supported:
46-
print("Target platform '{}' does not support the Metal rendering driver. Aborting.".format(env["platform"]))
48+
print_error("Target platform '{}' does not support the Metal rendering driver".format(env["platform"]))
4749
Exit(255)
4850
SConscript("metal/SCsub")
4951

0 commit comments

Comments
 (0)