mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-03 04:38:54 +00:00
context
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user