Really fix #17982 this time.
This commit is contained in:
parent
fd53657484
commit
e23f5c8e26
1 changed files with 2 additions and 7 deletions
|
@ -71,8 +71,7 @@ fn color_to_bits(color: color::Color) -> u16 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bits_to_color(bits: u16) -> color::Color {
|
fn bits_to_color(bits: u16) -> color::Color {
|
||||||
let bits = bits & 0x7;
|
let color = match bits & 0x7 {
|
||||||
let color = match bits {
|
|
||||||
0 => color::BLACK,
|
0 => color::BLACK,
|
||||||
0x1 => color::BLUE,
|
0x1 => color::BLUE,
|
||||||
0x2 => color::GREEN,
|
0x2 => color::GREEN,
|
||||||
|
@ -84,11 +83,7 @@ fn bits_to_color(bits: u16) -> color::Color {
|
||||||
_ => unreachable!()
|
_ => unreachable!()
|
||||||
};
|
};
|
||||||
|
|
||||||
if bits >= 8 {
|
color | (bits & 0x8) // copy the hi-intensity bit
|
||||||
color | 0x8
|
|
||||||
} else {
|
|
||||||
color
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Writer+Send> WinConsole<T> {
|
impl<T: Writer+Send> WinConsole<T> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue