From 8b2d50c0bf64db797c29e03f96bfffabcc2ba19b Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Thu, 13 Dec 2018 13:23:04 +0100 Subject: [PATCH] MacGui: write a log message when sleep is prevented/allowed. --- macosx/HBCore.m | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.40.0