From b952a4739c801a2e7789b686e6b1a25126be0981 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 30 May 2014 10:32:56 +0200 Subject: [PATCH 1/2] 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 From 6128464bc9621ba657892fd0a90bce92220db0c5 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 30 May 2014 10:47:56 +0200 Subject: [PATCH 2/2] Add missing OS-guard --- src/main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cc b/src/main.cc index 4b835a2..e425ba6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -84,9 +84,11 @@ int WindowsCrtReportHook(int reportType, char* message, int* returnValue) int main(int argc, char *argv[]) { +#ifdef Q_OS_MAC // 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"); +#endif // install the message handler #ifdef Q_OS_WIN