2019-01-28 07:16:14 +11:00
|
|
|
use crossterm_winapi::ConsoleMode;
|
|
|
|
|
2019-09-16 04:42:12 +10:00
|
|
|
fn change_console_mode() {
|
2019-01-28 07:16:14 +11:00
|
|
|
let console_mode = ConsoleMode::new().unwrap();
|
|
|
|
|
|
|
|
// get the current console mode:
|
2019-09-16 04:42:12 +10:00
|
|
|
let _mode: u32 = console_mode.mode().unwrap();
|
2019-01-28 07:16:14 +11:00
|
|
|
|
|
|
|
// set the console mode (not sure if this is an actual value xp)
|
2019-09-16 04:42:12 +10:00
|
|
|
console_mode
|
|
|
|
.set_mode(10)
|
|
|
|
.expect("Unable to set console mode");
|
2019-01-28 07:16:14 +11:00
|
|
|
}
|
|
|
|
|
2019-09-16 04:42:12 +10:00
|
|
|
fn main() {
|
|
|
|
change_console_mode();
|
|
|
|
}
|