mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
- fade: fix flickering on HD2 hardware; ported from TangoCash's repo
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
#include <driver/fade.h>
|
#include <driver/fade.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef HAVE_COOL_HARDWARE
|
#if HAVE_COOL_HARDWARE
|
||||||
#include <cnxtfb.h>
|
#include <cnxtfb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -61,6 +61,9 @@ void COSDFader::StartFadeIn()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
frameBuffer->setBlendLevel(fadeValue);
|
frameBuffer->setBlendLevel(fadeValue);
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO))
|
||||||
|
usleep(60000);
|
||||||
|
#endif
|
||||||
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
|
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,10 +93,12 @@ void COSDFader::StopFade()
|
|||||||
if ( fadeIn || fadeOut ) {
|
if ( fadeIn || fadeOut ) {
|
||||||
g_RCInput->killTimer(fadeTimer);
|
g_RCInput->killTimer(fadeTimer);
|
||||||
#ifdef BOXMODEL_APOLLO
|
#ifdef BOXMODEL_APOLLO
|
||||||
usleep(40000);
|
|
||||||
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
||||||
#else
|
#else
|
||||||
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO))
|
||||||
|
usleep(60000);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
fadeIn = fadeOut = false;
|
fadeIn = fadeOut = false;
|
||||||
}
|
}
|
||||||
@@ -122,6 +127,9 @@ bool COSDFader::FadeDone()
|
|||||||
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
||||||
#else
|
#else
|
||||||
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO))
|
||||||
|
usleep(60000);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
} else
|
} else
|
||||||
frameBuffer->setBlendLevel(fadeValue);
|
frameBuffer->setBlendLevel(fadeValue);
|
||||||
|
Reference in New Issue
Block a user