mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2023-10-10 13:37:41 +02:00
Set DISPLAY if not already set.
This commit is contained in:
parent
ff16beb515
commit
115f3b1fce
@ -61,7 +61,7 @@ extern void ToggleLUT();
|
||||
/// vdr-plugin version number.
|
||||
/// Makefile extracts the version number for generating the file name
|
||||
/// for the distribution archive.
|
||||
static const char *const VERSION = "3.5.6"
|
||||
static const char *const VERSION = "3.6"
|
||||
#ifdef GIT_REV
|
||||
"-GIT" GIT_REV
|
||||
#endif
|
||||
|
10
video.c
10
video.c
@ -3124,7 +3124,7 @@ int get_RGB(CuvidDecoder *decoder) {
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
}
|
||||
glFlush();
|
||||
Debug(3, "Read pixels %d %d\n", width, height);
|
||||
//Debug(3, "Read pixels %d %d\n", width, height);
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
@ -7022,6 +7022,14 @@ void VideoInit(const char *display_name) {
|
||||
if (!display_name && !(display_name = getenv("DISPLAY"))) {
|
||||
// if no environment variable, use :0.0 as default display name
|
||||
display_name = ":0.0";
|
||||
|
||||
}
|
||||
if (!getenv("DISPLAY")) {
|
||||
//force set DISPLAY environment variable, otherwise nvidia driver
|
||||
//has problems at libplace-swapchain-init
|
||||
Debug(3, "video: setting ENV DISPLAY=%s\n",display_name);
|
||||
setenv("DISPLAY",display_name,0);
|
||||
//Debug(3, "video: ENV:(%s)\n",getenv("DISPLAY"));
|
||||
}
|
||||
|
||||
if (!(XlibDisplay = XOpenDisplay(display_name))) {
|
||||
|
Loading…
Reference in New Issue
Block a user