This commit is contained in:
comp500 2023-07-22 16:25:37 +08:00 committed by GitHub
commit 11a6a3a095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 10 deletions

View File

@ -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

View File

@ -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)

View File

@ -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;
}