From a424a57036cd2c7356d863fae9445eee017e4fb9 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Tue, 16 Jun 2020 08:49:03 +0200 Subject: [PATCH] Mangle with C and C++ --- softhdcuvid.cpp | 7 ++++--- video.c | 6 +++--- video.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/softhdcuvid.cpp b/softhdcuvid.cpp index 9f3c670..1832c54 100644 --- a/softhdcuvid.cpp +++ b/softhdcuvid.cpp @@ -61,7 +61,7 @@ extern "C" /// vdr-plugin version number. /// Makefile extracts the version number for generating the file name /// for the distribution archive. -static const char *const VERSION = "3.2.1" +static const char *const VERSION = "3.2.2" #ifdef GIT_REV "-GIT" GIT_REV #endif @@ -112,7 +112,6 @@ static int ConfigScalerTest; /// Test for Scalers static int ConfigColorBlindness; static int ConfigColorBlindnessFaktor; - /// config deinterlace static int ConfigVideoDeinterlace[RESOLUTIONS]; @@ -3067,7 +3066,9 @@ bool cPluginSoftHdDevice::Initialize(void) { // dsyslog("[softhddev]%s:\n", __FUNCTION__); #if defined PLACEBO - MyConfigDir = cPlugin::ConfigDirectory("shaders"); + const char *d; + d = cPlugin::ConfigDirectory("shaders"); + strcpy(MyConfigDir,d); #endif MyDevice = new cSoftHdDevice(); diff --git a/video.c b/video.c index ac903c0..0605377 100644 --- a/video.c +++ b/video.c @@ -448,7 +448,7 @@ static int VideoColorBlindness = 0; static float VideoColorBlindnessFaktor = 1.0f; static char* shadersp[NUM_SHADERS]; -const char *MyConfigDir; +char MyConfigDir[200]; static int num_shaders = 0; static xcb_atom_t WmDeleteWindowAtom; ///< WM delete message atom @@ -3579,12 +3579,12 @@ parse_user_shader(char *shader) char *str = NULL; // Debug(3,"Parse user shader %s/%s\n",MyConfigDir,shader); - + sprintf(tmp,"%s/%s",MyConfigDir,shader); FILE *f = fopen(tmp, "rb"); if (!f) { - Debug(3, "Failed to open shader file %s: %s\n", shader, strerror(errno)); + Debug(3, "Failed to open shader file %s: %s\n", tmp, strerror(errno)); goto error; } diff --git a/video.h b/video.h index 0414fec..d87eeb7 100644 --- a/video.h +++ b/video.h @@ -44,7 +44,7 @@ extern signed char VideoHardwareDecoder; ///< flag use hardware decoder extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning extern int VideoAudioDelay; ///< audio/video delay extern char ConfigStartX11Server; ///< flag start the x11 server -extern const char* MyConfigDir; +extern char MyConfigDir[]; //---------------------------------------------------------------------------- // Prototypes //----------------------------------------------------------------------------