show one display when privacy mode is on
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
14eed0bb31
commit
507472e87e
@ -509,7 +509,9 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (stateGlobal.displaysCount.value < 2) return Offstage();
|
if (PrivacyModeState.find(id).isTrue || stateGlobal.displaysCount.value < 2) {
|
||||||
|
return Offstage();
|
||||||
|
}
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
icon: icon(),
|
icon: icon(),
|
||||||
ffi: ffi,
|
ffi: ffi,
|
||||||
|
@ -127,15 +127,6 @@ impl MagInterface {
|
|||||||
};
|
};
|
||||||
s.init_succeeded = false;
|
s.init_succeeded = false;
|
||||||
unsafe {
|
unsafe {
|
||||||
if GetSystemMetrics(SM_CMONITORS) != 1 {
|
|
||||||
// Do not try to use the magnifier in multi-screen setup (where the API
|
|
||||||
// crashes sometimes).
|
|
||||||
return Err(Error::new(
|
|
||||||
ErrorKind::Other,
|
|
||||||
"Magnifier capturer cannot work on multi-screen system.",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
// load lib
|
// load lib
|
||||||
let lib_file_name = "Magnification.dll";
|
let lib_file_name = "Magnification.dll";
|
||||||
let lib_file_name_c = CString::new(lib_file_name).unwrap();
|
let lib_file_name_c = CString::new(lib_file_name).unwrap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user