mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
wakelock not block system sleep (#8504)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
a18947eed2
commit
cfd27c8d87
@ -104,8 +104,11 @@ pub fn get_wakelock(_display: bool) -> WakeLock {
|
||||
hbb_common::log::info!("new wakelock, require display on: {_display}");
|
||||
#[cfg(target_os = "android")]
|
||||
return crate::platform::WakeLock::new("server");
|
||||
// display: keep screen on
|
||||
// idle: keep cpu on
|
||||
// sleep: prevent system from sleeping, even manually
|
||||
#[cfg(not(target_os = "android"))]
|
||||
return crate::platform::WakeLock::new(_display, true, true);
|
||||
return crate::platform::WakeLock::new(_display, true, false);
|
||||
}
|
||||
|
||||
pub(crate) struct InstallingService; // please use new
|
||||
|
Loading…
Reference in New Issue
Block a user