mirror of
https://github.com/glfw/glfw.git
synced 2025-06-07 16:24:57 +00:00
Merge df4b12b4fa
into 3eaf1255b2
This commit is contained in:
commit
11a6a3a095
@ -263,6 +263,7 @@ video tutorials.
|
||||
- Jonas Ådahl
|
||||
- Lasse Öörni
|
||||
- Leonard König
|
||||
- comp500
|
||||
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
||||
reports, patches, feedback, testing and encouragement
|
||||
|
||||
|
@ -229,6 +229,7 @@ information on what to include when reporting a bug.
|
||||
- [Win32] Bugfix: Instance-local operations used executable instance (#469,#1296,#1395)
|
||||
- [Win32] Bugfix: The OSMesa library was not unloaded on termination
|
||||
- [Win32] Bugfix: Right shift emitted `GLFW_KEY_UNKNOWN` when using a CJK IME (#2050)
|
||||
- [Win32] Bugfix: GLFW refuses to go fullscreen with custom resolution refresh rate (#1904)
|
||||
- [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
|
||||
- [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
|
||||
- [Cocoa] Moved main menu creation to GLFW initialization time (#1649)
|
||||
|
@ -397,10 +397,13 @@ void _glfwGetMonitorWorkareaWin32(_GLFWmonitor* monitor,
|
||||
|
||||
GLFWvidmode* _glfwGetVideoModesWin32(_GLFWmonitor* monitor, int* count)
|
||||
{
|
||||
int modeIndex = 0, size = 0;
|
||||
int modeIndex = 0, size = 1;
|
||||
GLFWvidmode* result = NULL;
|
||||
|
||||
*count = 0;
|
||||
*count = 1;
|
||||
// HACK: Always return the current video mode
|
||||
result = _glfw_calloc(1, sizeof(GLFWvidmode));
|
||||
_glfwGetVideoModeWin32(monitor, result);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -461,14 +464,6 @@ GLFWvidmode* _glfwGetVideoModesWin32(_GLFWmonitor* monitor, int* count)
|
||||
result[*count - 1] = mode;
|
||||
}
|
||||
|
||||
if (!*count)
|
||||
{
|
||||
// HACK: Report the current mode if no valid modes were found
|
||||
result = _glfw_calloc(1, sizeof(GLFWvidmode));
|
||||
_glfwGetVideoModeWin32(monitor, result);
|
||||
*count = 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user