fix windows wakelock, add set_display (#6623)

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-12-05 08:32:44 -05:00
committed by GitHub
parent 00fe3a76c8
commit 50b81c2356
5 changed files with 75 additions and 21 deletions

View File

@@ -733,4 +733,11 @@ impl WakeLock {
.ok(),
)
}
pub fn set_display(&mut self, display: bool) -> ResultType<()> {
self.0
.as_mut()
.map(|h| h.set_display(display))
.ok_or(anyhow!("no AwakeHandle"))?
}
}