From 41bbb33f233759fc773f5bf120b5a06976d3c520 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 10 Dec 2020 21:44:19 +0100 Subject: [PATCH] - glcd: remove hardcoded paths Signed-off-by: Thilo Graf --- src/driver/glcd/glcd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/driver/glcd/glcd.cpp b/src/driver/glcd/glcd.cpp index a6156914c..dfbbce87f 100644 --- a/src/driver/glcd/glcd.cpp +++ b/src/driver/glcd/glcd.cpp @@ -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)