2019-09-21 07:50:53 +10:00
|
|
|
use std::io::Result;
|
|
|
|
|
2019-01-28 07:16:14 +11:00
|
|
|
use crossterm_winapi::ConsoleMode;
|
|
|
|
|
2019-09-21 07:50:53 +10:00
|
|
|
fn change_console_mode() -> Result<()> {
|
|
|
|
let console_mode = ConsoleMode::new()?;
|
2019-01-28 07:16:14 +11:00
|
|
|
|
|
|
|
// get the current console mode:
|
2019-09-21 07:50:53 +10:00
|
|
|
let _mode: u32 = console_mode.mode()?;
|
2019-01-28 07:16:14 +11:00
|
|
|
|
|
|
|
// set the console mode (not sure if this is an actual value xp)
|
2019-09-21 07:50:53 +10:00
|
|
|
console_mode.set_mode(10)
|
2019-01-28 07:16:14 +11:00
|
|
|
}
|
|
|
|
|
2019-09-21 07:50:53 +10:00
|
|
|
fn main() -> Result<()> {
|
|
|
|
change_console_mode()
|
2019-09-16 04:42:12 +10:00
|
|
|
}
|