mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +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, "");
|
std::string picture = getIconPath(filename, "");
|
||||||
bool ret = false;
|
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)
|
if (videoDecoder)
|
||||||
{
|
{
|
||||||
@@ -1585,16 +1585,28 @@ bool CFrameBuffer::showFrame(const std::string & filename, int fallback_mode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str());
|
if (!(fallback_mode & SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED))
|
||||||
picture = "";
|
{
|
||||||
|
dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str());
|
||||||
|
picture = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
if (fallback_mode)
|
if (fallback_mode)
|
||||||
{
|
{
|
||||||
if ((fallback_mode & SHOW_FRAME_FALLBACK_MODE_IMAGE) && !picture.empty())
|
if (fallback_mode & (SHOW_FRAME_FALLBACK_MODE_IMAGE | SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED) && !picture.empty())
|
||||||
ret = g_PicViewer->DisplayImage(picture, 0, 0, getScreenWidth(true), getScreenHeight(true), TM_NONE);
|
{
|
||||||
|
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
|
else
|
||||||
ret = false;
|
ret = false;
|
||||||
|
|
||||||
|
@@ -271,8 +271,9 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
{
|
{
|
||||||
SHOW_FRAME_FALLBACK_MODE_OFF = 0,
|
SHOW_FRAME_FALLBACK_MODE_OFF = 0,
|
||||||
SHOW_FRAME_FALLBACK_MODE_IMAGE = 1,
|
SHOW_FRAME_FALLBACK_MODE_IMAGE = 1,
|
||||||
SHOW_FRAME_FALLBACK_MODE_BLACKSCREEN = 2,
|
SHOW_FRAME_FALLBACK_MODE_IMAGE_UNSCALED = 2,
|
||||||
SHOW_FRAME_FALLBACK_MODE_CALLBACK = 4
|
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);
|
bool showFrame(const std::string & filename, int fallback_mode = SHOW_FRAME_FALLBACK_MODE_OFF);
|
||||||
void stopFrame();
|
void stopFrame();
|
||||||
|
Reference in New Issue
Block a user