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:
parent
1f2a7b759d
commit
f05ae1c709
2 changed files with 9 additions and 0 deletions
|
|
@ -331,4 +331,9 @@ void Desktop::setGlobalScaleFactor (float newScaleFactor) noexcept
|
|||
}
|
||||
}
|
||||
|
||||
bool Desktop::isHeadless() const noexcept
|
||||
{
|
||||
return displays->displays.isEmpty();
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue