mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Fix source list for -Wdeclaration-after-statement
The context creation files were not included on platforms other than Win32.
This commit is contained in:
parent
dff6253ca7
commit
9486ec0c02
@ -83,12 +83,11 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
|
|||||||
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
|
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
|
||||||
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
|
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
|
||||||
|
|
||||||
if (WIN32)
|
set_source_files_properties(context.c init.c input.c monitor.c vulkan.c
|
||||||
set(windows_SOURCES ${glfw_SOURCES})
|
window.c win32_init.c win32_joystick.c
|
||||||
else()
|
win32_monitor.c win32_time.c win32_thread.c
|
||||||
set(windows_SOURCES ${common_SOURCES})
|
win32_window.c wgl_context.c egl_context.c
|
||||||
endif()
|
osmesa_context.c PROPERTIES
|
||||||
set_source_files_properties(${windows_SOURCES} PROPERTIES
|
|
||||||
COMPILE_FLAGS -Wdeclaration-after-statement)
|
COMPILE_FLAGS -Wdeclaration-after-statement)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -123,6 +123,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
#if defined(_GLFW_X11)
|
#if defined(_GLFW_X11)
|
||||||
|
{
|
||||||
XVisualInfo vi = {0};
|
XVisualInfo vi = {0};
|
||||||
|
|
||||||
// Only consider EGLConfigs with associated Visuals
|
// Only consider EGLConfigs with associated Visuals
|
||||||
@ -133,15 +134,15 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
|||||||
if (desired->transparent)
|
if (desired->transparent)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
XVisualInfo* vis = XGetVisualInfo(_glfw.x11.display,
|
XVisualInfo* vis =
|
||||||
VisualIDMask, &vi,
|
XGetVisualInfo(_glfw.x11.display, VisualIDMask, &vi, &count);
|
||||||
&count);
|
|
||||||
if (vis)
|
if (vis)
|
||||||
{
|
{
|
||||||
u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
|
u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
|
||||||
XFree(vis);
|
XFree(vis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // _GLFW_X11
|
#endif // _GLFW_X11
|
||||||
|
|
||||||
if (ctxconfig->client == GLFW_OPENGL_ES_API)
|
if (ctxconfig->client == GLFW_OPENGL_ES_API)
|
||||||
|
Loading…
Reference in New Issue
Block a user