From b952a4739c801a2e7789b686e6b1a25126be0981 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 30 May 2014 10:32:56 +0200 Subject: [PATCH] Tell MacOS to not push us to nap --- src/main.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 76b278d..4b835a2 100644 --- a/src/main.cc +++ b/src/main.cc @@ -83,7 +83,12 @@ int WindowsCrtReportHook(int reportType, char* message, int* returnValue) int main(int argc, char *argv[]) { -// install the message handler + + // Prevent Apple's app nap from screwing us over + // tip: the domain can be cross-checked on the command line with + QProcess::execute("defaults write org.qgroundcontrol.qgroundcontrol NSAppSleepDisabled -bool YES"); + + // install the message handler #ifdef Q_OS_WIN qInstallMsgHandler( msgHandler ); #endif