mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 19:42:00 +00:00
Replace comments with designated initializers
We can finally have the compiler verify that the values go to the correct struct member. With this commit GLFW no longer compiles with Visual Studio 2012 or earlier. If you must compile GLFW on Windows XP, check out MinGW-w64. Fixes #2465
This commit is contained in:
parent
d81fcb93f1
commit
bbf661ca38
19
src/init.c
19
src/init.c
@ -49,19 +49,22 @@ static GLFWerrorfun _glfwErrorCallback;
|
|||||||
static GLFWallocator _glfwInitAllocator;
|
static GLFWallocator _glfwInitAllocator;
|
||||||
static _GLFWinitconfig _glfwInitHints =
|
static _GLFWinitconfig _glfwInitHints =
|
||||||
{
|
{
|
||||||
GLFW_TRUE, // hat buttons
|
.hatButtons = GLFW_TRUE,
|
||||||
GLFW_ANGLE_PLATFORM_TYPE_NONE, // ANGLE backend
|
.angleType = GLFW_ANGLE_PLATFORM_TYPE_NONE,
|
||||||
GLFW_ANY_PLATFORM, // preferred platform
|
.platformID = GLFW_ANY_PLATFORM,
|
||||||
NULL, // vkGetInstanceProcAddr function
|
.vulkanLoader = NULL,
|
||||||
|
.ns =
|
||||||
{
|
{
|
||||||
GLFW_TRUE, // macOS menu bar
|
.menubar = GLFW_TRUE,
|
||||||
GLFW_TRUE // macOS bundle chdir
|
.chdir = GLFW_TRUE
|
||||||
},
|
},
|
||||||
|
.x11 =
|
||||||
{
|
{
|
||||||
GLFW_TRUE, // X11 XCB Vulkan surface
|
.xcbVulkanSurface = GLFW_TRUE,
|
||||||
},
|
},
|
||||||
|
.wl =
|
||||||
{
|
{
|
||||||
GLFW_WAYLAND_PREFER_LIBDECOR // Wayland libdecor mode
|
.libdecorMode = GLFW_WAYLAND_PREFER_LIBDECOR
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user