mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00: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:
parent
bb5581690d
commit
6770ae0556
@ -163,6 +163,13 @@ if (_GLFW_WIN32)
|
|||||||
if (GLFW_USE_OPTIMUS_HPG)
|
if (GLFW_USE_OPTIMUS_HPG)
|
||||||
set(_GLFW_USE_OPTIMUS_HPG 1)
|
set(_GLFW_USE_OPTIMUS_HPG 1)
|
||||||
endif()
|
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()
|
endif()
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
@ -205,6 +205,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
- [Win32] Bugfix: `_WIN32_WINNT` was not set to Windows XP or later
|
- [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
|
- [X11] Bugfix: Events for mouse buttons 4 and above were not reported
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user