diff --git a/src/main.cc b/src/main.cc index 76b278d..e425ba6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -83,7 +83,14 @@ int WindowsCrtReportHook(int reportType, char* message, int* returnValue) int main(int argc, char *argv[]) { -// install the message handler + +#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 qInstallMsgHandler( msgHandler ); #endif