Skip to content

Commit

Permalink
Update qopenhd.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Nov 23, 2023
1 parent 77c8663 commit ecf6050
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/util/qopenhd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QTimer>

#include<iostream>
#include <sys/stat.h>
#include<fstream>
#include<string>

Expand Down Expand Up @@ -305,11 +306,16 @@ bool QOpenHD::is_platform_rpi()

bool QOpenHD::is_platform_rock()
{
#ifdef IS_PLATFORM_Rock
return true;
#else
return false;
#endif
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;
}
}

void QOpenHD::keep_screen_on(bool on)
Expand Down

0 comments on commit ecf6050

Please sign in to comment.