mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 05:24:34 +00:00
X11: Clarify code flow for Clang static analysis
(cherry picked from commit ef5220d6b1
)
This commit is contained in:
parent
48bc089e9e
commit
0a7c24e48c
@ -1979,7 +1979,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
Visual* visual;
|
Visual* visual = NULL;
|
||||||
int depth;
|
int depth;
|
||||||
|
|
||||||
if (ctxconfig->client != GLFW_NO_API)
|
if (ctxconfig->client != GLFW_NO_API)
|
||||||
@ -2005,8 +2005,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctxconfig->client == GLFW_NO_API ||
|
if (!visual)
|
||||||
ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
|
|
||||||
{
|
{
|
||||||
visual = DefaultVisual(_glfw.x11.display, _glfw.x11.screen);
|
visual = DefaultVisual(_glfw.x11.display, _glfw.x11.screen);
|
||||||
depth = DefaultDepth(_glfw.x11.display, _glfw.x11.screen);
|
depth = DefaultDepth(_glfw.x11.display, _glfw.x11.screen);
|
||||||
|
Loading…
Reference in New Issue
Block a user