mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 20:11:58 +00:00
Improved X11 display opening failure.
This commit is contained in:
parent
0f3b69c79d
commit
2205bdd469
@ -719,7 +719,18 @@ int _glfwPlatformInit(void)
|
|||||||
_glfw.x11.display = XOpenDisplay(NULL);
|
_glfw.x11.display = XOpenDisplay(NULL);
|
||||||
if (!_glfw.x11.display)
|
if (!_glfw.x11.display)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to open X display");
|
const char* display = getenv("DISPLAY");
|
||||||
|
if (display)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
"X11: Failed to open display %s", display);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
"X11: The DISPLAY environment variable is missing");
|
||||||
|
}
|
||||||
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user