1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Added workaround for legacy MinGW.

When building on legacy MinGW, WINVER and UNICODE need to be defined
before the inclusion of stddef.h (by glfw3.h), which is itself included
before win32_platform.h.
This commit is contained in:
Camilla Berglund 2013-09-13 12:22:28 +02:00
parent bb5581690d
commit 6770ae0556
2 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,13 @@ if (_GLFW_WIN32)
if (GLFW_USE_OPTIMUS_HPG)
set(_GLFW_USE_OPTIMUS_HPG 1)
endif()
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before
# the inclusion of stddef.h (by glfw3.h), which is itself included before
# win32_platform.h. We define them here until a saner solution can be found
# NOTE: MinGW-w64 and Visual C++ do /not/ need this hack.
add_definitions(-DUNICODE)
add_definitions(-DWINVER=0x0501)
endif()
#--------------------------------------------------------------------

View File

@ -205,6 +205,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
## Changelog
- [Win32] Bugfix: `_WIN32_WINNT` was not set to Windows XP or later
- [Win32] Bugfix: Legacy MinGW needs `WINVER` and `UNICODE` before `stddef.h`
- [X11] Bugfix: Events for mouse buttons 4 and above were not reported