mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 13:52:55 +03:00
maybe fixup windows build
This commit is contained in:
parent
eae41c753e
commit
7554ef6570
@ -161,8 +161,8 @@ mod win {
|
||||
let mut saved_output = 0;
|
||||
let saved_cp;
|
||||
unsafe {
|
||||
GetConsoleMode(read.as_raw_file_descriptor(), &mut saved_input);
|
||||
GetConsoleMode(write.as_raw_file_descriptor(), &mut saved_output);
|
||||
GetConsoleMode(read.as_raw_file_descriptor() as *mut _, &mut saved_input);
|
||||
GetConsoleMode(write.as_raw_file_descriptor() as *mut _, &mut saved_output);
|
||||
saved_cp = GetConsoleOutputCP();
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
}
|
||||
@ -179,8 +179,8 @@ mod win {
|
||||
pub fn set_cooked(&mut self) -> anyhow::Result<()> {
|
||||
unsafe {
|
||||
SetConsoleOutputCP(self.saved_cp);
|
||||
SetConsoleMode(self.read.as_raw_handle(), self.saved_input);
|
||||
SetConsoleMode(self.write.as_raw_handle(), self.saved_output);
|
||||
SetConsoleMode(self.read.as_raw_handle() as *mut _, self.saved_input);
|
||||
SetConsoleMode(self.write.as_raw_handle() as *mut _, self.saved_output);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@ -188,11 +188,11 @@ mod win {
|
||||
pub fn set_raw(&mut self) -> anyhow::Result<()> {
|
||||
unsafe {
|
||||
SetConsoleMode(
|
||||
self.read.as_raw_file_descriptor(),
|
||||
self.read.as_raw_file_descriptor() as *mut _,
|
||||
ENABLE_VIRTUAL_TERMINAL_INPUT,
|
||||
);
|
||||
SetConsoleMode(
|
||||
self.write.as_raw_file_descriptor(),
|
||||
self.write.as_raw_file_descriptor() as *mut _,
|
||||
ENABLE_PROCESSED_OUTPUT
|
||||
| ENABLE_WRAP_AT_EOL_OUTPUT
|
||||
| ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
|
Loading…
Reference in New Issue
Block a user