Skip to content

Commit

Permalink
Merge pull request #12650 from fwcd/qosmacos-screensaver
Browse files Browse the repository at this point in the history
ScreenSaver: Check `Q_OS_MACOS` instead of `Q_OS_MAC`
  • Loading branch information
JoergAtGithub authored Jan 27, 2024
2 parents f87a5db + 33508c7 commit b8341a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/util/screensaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ With the help of the following source codes:

#include <QDebug>

#if defined(__APPLE__)
#include "util/assert.h"

#if defined(Q_OS_MACOS)
# include "util/mac.h"
#elif defined(_WIN32)
# include <windows.h>
Expand Down Expand Up @@ -56,8 +58,7 @@ void ScreenSaverHelper::uninhibit()
}
}


#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
IOPMAssertionID ScreenSaverHelper::s_systemSleepAssertionID=0;
IOPMAssertionID ScreenSaverHelper::s_userActivityAssertionID=0;

Expand Down Expand Up @@ -334,7 +335,6 @@ void ScreenSaverHelper::uninhibitInternal()
{
DEBUG_ASSERT(!"Screensaver suspending not implemented");
}
#endif // Q_OS_MAC

#endif // Q_OS_MACOS

} // namespace mixxx
14 changes: 7 additions & 7 deletions src/util/screensaver.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include <QtGlobal>

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <IOKit/pwr_mgt/IOPMLib.h>
#endif // Q_OS_MAC
#endif // Q_OS_MACOS

namespace mixxx {

Expand All @@ -25,14 +25,14 @@ class ScreenSaverHelper {

static bool s_enabled;
static bool s_sendActivity;
#if defined(Q_OS_MAC)
/* sleep management */
static IOPMAssertionID s_systemSleepAssertionID;
static IOPMAssertionID s_userActivityAssertionID;
#if defined(Q_OS_MACOS)
/* sleep management */
static IOPMAssertionID s_systemSleepAssertionID;
static IOPMAssertionID s_userActivityAssertionID;
#elif defined(Q_OS_LINUX)
static uint32_t s_cookie;
static int s_saverindex;
#endif // Q_OS_MAC
#endif // Q_OS_MACOS
};

}

0 comments on commit b8341a6

Please sign in to comment.