mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
fb_generic: add possibility to handle with unscaled images in showFrame()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 05cf31b3dd
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-02-06 (Thu, 06 Feb 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1568,7 +1568,7 @@ bool CFrameBuffer::showFrame(const std::string & filename, int fallback_mode)
|
||||
std::string picture = getIconPath(filename, "");
|
||||
bool ret = false;
|
||||
|
||||
if (access(picture.c_str(), F_OK) == 0)
|
||||
if (access(picture.c_str(), F_OK) == 0 && !(fallback_mode & SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED))
|
||||
{
|
||||
if (videoDecoder)
|
||||
{
|
||||
@@ -1585,16 +1585,28 @@ bool CFrameBuffer::showFrame(const std::string & filename, int fallback_mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str());
|
||||
picture = "";
|
||||
if (!(fallback_mode & SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED))
|
||||
{
|
||||
dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str());
|
||||
picture = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
if (fallback_mode)
|
||||
{
|
||||
if ((fallback_mode & SHOW_FRAME_FALLBACK_MODE_IMAGE) && !picture.empty())
|
||||
ret = g_PicViewer->DisplayImage(picture, 0, 0, getScreenWidth(true), getScreenHeight(true), TM_NONE);
|
||||
if (fallback_mode & (SHOW_FRAME_FALLBACK_MODE_IMAGE | SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED) && !picture.empty())
|
||||
{
|
||||
if (fallback_mode & SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED)
|
||||
{
|
||||
SetTransparent(TM_NONE);
|
||||
ret = g_PicViewer->ShowImage(picture.c_str(), false);
|
||||
SetTransparentDefault();
|
||||
}
|
||||
else
|
||||
ret = g_PicViewer->DisplayImage(picture, 0, 0, getScreenWidth(true), getScreenHeight(true), TM_NONE);
|
||||
}
|
||||
else
|
||||
ret = false;
|
||||
|
||||
|
@@ -271,8 +271,9 @@ class CFrameBuffer : public sigc::trackable
|
||||
{
|
||||
SHOW_FRAME_FALLBACK_MODE_OFF = 0,
|
||||
SHOW_FRAME_FALLBACK_MODE_IMAGE = 1,
|
||||
SHOW_FRAME_FALLBACK_MODE_BLACKSCREEN = 2,
|
||||
SHOW_FRAME_FALLBACK_MODE_CALLBACK = 4
|
||||
SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED = 2,
|
||||
SHOW_FRAME_FALLBACK_MODE_BLACKSCREEN = 4,
|
||||
SHOW_FRAME_FALLBACK_MODE_CALLBACK = 8
|
||||
};
|
||||
bool showFrame(const std::string & filename, int fallback_mode = SHOW_FRAME_FALLBACK_MODE_OFF);
|
||||
void stopFrame();
|
||||
|
Reference in New Issue
Block a user