From 6c0f80979f0406ceceef2fc196a88a99f1e613a7 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Wed, 4 Mar 2020 16:34:40 +0100 Subject: [PATCH] Try Fix for tvguide --- openglosd.cpp | 9 +++------ video.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/openglosd.cpp b/openglosd.cpp index 341e6ed..b64fa31 100644 --- a/openglosd.cpp +++ b/openglosd.cpp @@ -2002,10 +2002,11 @@ cOglOsd::cOglOsd(int Left, int Top, uint Level, std::shared_ptr oglT dsyslog("[softhddev]cOglOsd osdLeft %d osdTop %d screenWidth %d screenHeight %d", Left, Top, osdWidth, osdHeight); +#if 0 if (posd) free(posd); posd = (unsigned char *)calloc( osdWidth * osdHeight * 4, 1 ); - +#endif // create output framebuffer if (!oFb) { @@ -2019,11 +2020,7 @@ cOglOsd::cOglOsd(int Left, int Top, uint Level, std::shared_ptr oglT cOglOsd::~cOglOsd() { OsdClose(); SetActive(false); -#if 0 - if (posd) - free(posd); - posd = 0; -#endif + oglThread->DoCmd(new cOglCmdDeleteFb(bFb)); } diff --git a/video.c b/video.c index 0b81540..9a337e7 100644 --- a/video.c +++ b/video.c @@ -392,7 +392,7 @@ static char VideoSurfaceModesChanged; ///< flag surface modes changed static const char VideoTransparentOsd = 1; static uint32_t VideoBackground; ///< video background color -static char VideoStudioLevels; ///< flag use studio levels +char VideoStudioLevels; ///< flag use studio levels /// Default deinterlace mode. static VideoDeinterlaceModes VideoDeinterlace[VideoResolutionMax]; @@ -3841,7 +3841,7 @@ void make_osd_overlay(int x, int y, int width, int height) { const struct pl_fmt *fmt; struct pl_overlay *pl; - const float black[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; + int offset = VideoWindowHeight - (VideoWindowHeight - height - y) - (VideoWindowHeight - y); @@ -4994,6 +4994,10 @@ void VideoOsdInit(void) OsdWidth = VideoWindowWidth; OsdHeight = VideoWindowHeight; } + + if (posd) + free(posd); + posd = (unsigned char *)calloc( OsdWidth * OsdHeight * 4, 1 ); VideoOsdClear(); } @@ -6627,6 +6631,10 @@ void VideoSetCutLeftRight(int pixels[VideoResolutionMax]) void VideoSetStudioLevels(int onoff) { VideoStudioLevels = onoff; +#ifdef GAMMA + Set_Gamma(2.4,6500); +#endif + } ///