glcd: remove hardcoded paths

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6a5f2b4e19
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-12-10 (Thu, 10 Dec 2020)

Origin message was:
------------------
- glcd: remove hardcoded paths

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2020-12-10 21:44:19 +01:00
parent 2dba7a1ab7
commit 4983f82a86

View File

@@ -897,7 +897,9 @@ void cGLCD::Run(void)
char ws[10];
snprintf(ws, sizeof(ws), "%d", bitmap->Width());
const char *bmpShot = "/tmp/glcd-video.bmp";
my_system(4, "/bin/grab", "-vr", ws, bmpShot);
std::string grab = find_executable("grab");
if (!grab.empty())
my_system(4, grab.c_str(), "-vr", ws, bmpShot);
int bw = 0, bh = 0;
g_PicViewer->getSize(bmpShot, &bw, &bh);
if (bw > 0 && bh > 0)