SystemComponent::SystemComponent(QObject* parent) : ComponentBase(parent), m_platformType(platformTypeUnknown), m_platformArch(platformArchUnknown), m_doLogMessages(false) { m_mouseOutTimer = new QTimer(this); m_mouseOutTimer->setSingleShot(true); connect(m_mouseOutTimer, &QTimer::timeout, [&] () { setCursorVisibility(false); }); m_mouseOutTimer->start(MOUSE_TIMEOUT); // define OS Type #if defined(Q_OS_MAC) m_platformType = platformTypeOsx; #elif defined(Q_OS_WIN) m_platformType = platformTypeWindows; #elif defined(KONVERGO_OPENELEC) m_platformType = platformTypeOpenELEC; #elif defined(Q_OS_LINUX) m_platformType = platformTypeLinux; #endif // define target type #if TARGET_RPI m_platformArch = platformArchRpi2; #elif defined(Q_PROCESSOR_X86_32) m_platformArch = platformArchX86_32; #elif defined(Q_PROCESSOR_X86_64) m_platformArch = platformArchX86_64; #endif }
bool SystemComponent::componentInitialize() { QDir().mkpath(Paths::dataDir("scripts")); QDir().mkpath(Paths::dataDir("sounds")); // Hide mouse pointer on any keyboard input connect(&InputComponent::Get(), &InputComponent::receivedInput, [=]() { setCursorVisibility(false); }); return true; }