Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In Linux you should be able to check the display availability by retrieving the environment variable DISPLAY

#if __linux__
    has_display = !(std::getenv("DISPLAY") == nullptr);
#endif