1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added Desktop::isHeadless() method

This commit is contained in:
ed 2020-10-27 11:54:12 +00:00
parent 1f2a7b759d
commit f05ae1c709
2 changed files with 9 additions and 0 deletions

View file

@ -331,4 +331,9 @@ void Desktop::setGlobalScaleFactor (float newScaleFactor) noexcept
}
}
bool Desktop::isHeadless() const noexcept
{
return displays->displays.isEmpty();
}
} // namespace juce

View file

@ -351,6 +351,10 @@ public:
static bool isOSXDarkModeActive();
#endif
//==============================================================================
/** Returns true on a headless system where there are no connected displays. */
bool isHeadless() const noexcept;
private:
//==============================================================================
static Desktop* instance;