Privacy mode, msgbox, add details

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-09-17 10:53:04 +08:00
parent eb5ea17610
commit db2e4f30a7
9 changed files with 112 additions and 41 deletions

View File

@@ -1269,9 +1269,15 @@ pub fn toggle_blank_screen(v: bool) {
}
}
pub fn block_input(v: bool) -> bool {
pub fn block_input(v: bool) -> (bool, String) {
let v = if v { TRUE } else { FALSE };
unsafe { BlockInput(v) == TRUE }
unsafe {
if BlockInput(v) == TRUE {
(true, "".to_owned())
} else {
(false, format!("Error code: {}", GetLastError()))
}
}
}
pub fn add_recent_document(path: &str) {