diff --git a/app/util/qopenhd.cpp b/app/util/qopenhd.cpp index c88902391..114dc60c9 100644 --- a/app/util/qopenhd.cpp +++ b/app/util/qopenhd.cpp @@ -306,16 +306,11 @@ bool QOpenHD::is_platform_rpi() bool QOpenHD::is_platform_rock() { -const char* rockPlatformPath = "/usr/local/share/openhd/platform/rock/"; - struct stat info; - if (stat(rockPlatformPath, &info) != 0) { - return false; - } - if (info.st_mode & S_IFDIR) { - return true; - } else { - return false; - } +#ifdef IS_PLATFORM_ROCK + return true; +#else + return false; +#endif } void QOpenHD::keep_screen_on(bool on) diff --git a/app/videostreaming/avcodec/avcodec_video.pri b/app/videostreaming/avcodec/avcodec_video.pri index a29142325..7de028bd7 100644 --- a/app/videostreaming/avcodec/avcodec_video.pri +++ b/app/videostreaming/avcodec/avcodec_video.pri @@ -32,6 +32,9 @@ CONFIG += link_pkgconfig packagesExist(mmal) { DEFINES += IS_PLATFORM_RPI } +packagesExist(mali) { + DEFINES += IS_PLATFORM_ROCK +} # can be used in c++, also set to be exposed in qml DEFINES += QOPENHD_ENABLE_VIDEO_VIA_AVCODEC