This commit is contained in:
Jeroen van Rijn
2026-07-30 12:03:08 +02:00
parent 7050779643
commit d272bfb9ca
2 changed files with 4 additions and 4 deletions

View File

@@ -72,10 +72,10 @@ get_environment_color :: proc() -> Color_Depth {
@(init)
init_terminal :: proc "contextless" () {
_init_terminal()
context = runtime.default_context()
_init_terminal()
// We respect `NO_COLOR` specifically as a color-disabler but not as a
// blanket ban on any terminal manipulation codes, hence why this comes
// after `_init_terminal` which will allow Windows to enable Virtual

View File

@@ -18,6 +18,8 @@ old_modes: [2]struct{
}
_init_terminal :: proc "contextless" () {
context = runtime.default_context()
vtp_enabled: bool
for &v in old_modes {
@@ -41,8 +43,6 @@ _init_terminal :: proc "contextless" () {
// This color depth is available on Windows 10 since build 10586.
color_depth = .Four_Bit
} else {
context = runtime.default_context()
// The user may be on a non-default terminal emulator.
color_depth = get_environment_color()
}