From c14b34fe54c8e71024c11a79b7686f03e15c4250 Mon Sep 17 00:00:00 2001 From: GetAway Date: Tue, 22 Jan 2019 21:37:38 +0100 Subject: [PATCH] fb_generic.cpp: fix build for CST hardware... was broken with commit 8b7de5f --- src/driver/fb_generic.cpp | 9 +++++++++ src/gui/screensaver.cpp | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index c0f69d06c..0d5bacc81 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -1549,6 +1549,14 @@ void CFrameBuffer::Clear() bool CFrameBuffer::showFrame(const std::string & filename, bool fallback) { std::string picture = getIconPath(filename, ""); +#if HAVE_COOL_HARDWARE + (void)fallback; + if (access(picture.c_str(), F_OK) == 0) + { + videoDecoder->ShowPicture(picture.c_str()); + return true; + } +#else if (access(picture.c_str(), F_OK) == 0) { if (videoDecoder->ShowPicture(picture.c_str())) @@ -1562,6 +1570,7 @@ bool CFrameBuffer::showFrame(const std::string & filename, bool fallback) dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], fallback is disabled, paint of image was stopped: %s\n", __func__, __LINE__, picture.c_str()); } } +#endif else dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str()); diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index e27ec98fe..6851068e1 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -301,11 +301,7 @@ void CScreenSaver::paint() } dprintf(DEBUG_INFO, "[CScreenSaver] %s - %d : %s\n", __func__, __LINE__, v_bg_files.at(index).c_str()); -#if HAVE_ARM_HARDWARE m_frameBuffer->showFrame(v_bg_files.at(index), true); -#else - paintImage(v_bg_files.at(index), 0, 0, m_frameBuffer->getScreenWidth(true), m_frameBuffer->getScreenHeight(true)); -#endif if (!g_settings.screensaver_random) index++;