summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-12-13 13:23:04 +0100
committerDamiano Galassi <[email protected]>2018-12-13 13:23:04 +0100
commit8b2d50c0bf64db797c29e03f96bfffabcc2ba19b (patch)
tree55e503372954b6b5cfdb6897d52426a3333de388
parent840956dd38cd44daded18503755fa39fbf9a8637 (diff)
MacGui: write a log message when sleep is prevented/allowed.
-rw-r--r--macosx/HBCore.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m
index 81cc6c3e3..3dfdeb476 100644
--- a/macosx/HBCore.m
+++ b/macosx/HBCore.m
@@ -154,12 +154,14 @@ typedef void (^HBCoreCleanupHandler)(void);
{
NSAssert(!self.automaticallyPreventSleep, @"[HBCore preventSleep:] called with automaticallyPreventSleep enabled.");
hb_system_sleep_prevent(_hb_handle);
+ [HBUtilities writeToActivityLog:"%s prevented sleep", self.name.UTF8String];
}
- (void)allowSleep
{
NSAssert(!self.automaticallyPreventSleep, @"[HBCore allowSleep:] called with automaticallyPreventSleep enabled.");
hb_system_sleep_allow(_hb_handle);
+ [HBUtilities writeToActivityLog:"%s stopped preventing sleep", self.name.UTF8String];
}
- (void)preventAutoSleep