Commit 03b3a0ea authored by David Fuhrmann's avatar David Fuhrmann

macosx: Print warning if user activity declaration failed

parent ae0cd5b6
......@@ -294,10 +294,14 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
if ([o_main activeVideoPlayback] && &IOPMAssertionDeclareUserActivity && shouldDisableScreensaver)
{
CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8);
IOPMAssertionDeclareUserActivity(reasonForActivity,
IOReturn success = IOPMAssertionDeclareUserActivity(reasonForActivity,
kIOPMUserActiveLocal,
&userActivityAssertionID);
CFRelease(reasonForActivity);
if (success != kIOReturnSuccess)
msg_Warn(getIntf(), "failed to declare user activity");
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment