POSIX.1-2008 deprecated gettimeofday, which we used as a fallback if the
monotonic clock was unavailable.
This replaces that fallback with the non-monotonic real-time clock.
Because of the Gordian knot of feature test macros across Unices, this
also includes the shift from some platform source files defining
_POSIX_C_SOURCE to various values to _DEFAULT_SOURCE being defined for
all source files on Linux. This is because -std=c99 on Linux disables
_DEFAULT_SOURCE (POSIX 2008 and extensions).
Once runtime platform selection comes in, this kind of platform-specific
preprocessor logic can be moved into the platform glue files and won't
need to be replicated by third-party build setups, but for now, sorry.
The outer glfwUpdateGamepadMappings function is now bypassed when
parsing the default gamepad mappings. The data in mappings.h does not
contain any comments or line breaks. Also this is done before joystick
support has been initialized, so there is no need to look for matching
devices.
Finally, the array of default mappings is pre-allocated. This has no
measurable performance impact but does generate a lot of calls, which
won't be nice for a user provided custom allocator to deal with.
This avoids generating a macro redefinition warning when the
GL_SILENCE_DEPRECATION macro has been defined for the whole of a larger
project.
Closes#1840.
The contents scale of the hosted CAMetalLayer created for MoltenVK was
updated only after the GLFW content scale and framebuffer size events
were emitted, causing the layer to get out of sync with the monitor the
window was on.
Because there are controllers in the wild using the same hardware ID
despite having different numbers of buttons and axes, an error message
was triggered that was only expected for a corrupted mapping database.
This removes the error for now, in preparation for better error handling
for gamepad mappings overall.
Fixes#1763.
In the compile guide, the "Dependencies for Linux and OSMesa" section
looks to be one level too high in the hierarchy. I've moved it to be in
line with the similarly-named sub-sub-sections.
Closes#1923.
With 3.4, the tip of the 'latest' branch will be a merge commit for
3.3-stable and the main branch, and not simply a fast-foward to an
already tested commit.
This sets up a tiny additional safety net before that merge.
GitHub runners unfortunately do not come with MinGW or VS 2010
pre-installed, so moving those builds will be more involved. MinGW-w64
is not a good replacement for MinGW as it is far more complete.
This gives at least some feedback for all supported platforms via the
GitHub Actions system.
The old Travis CI .org service has been throttled for a while now and is
said to be shutting down completely next week.
This migrates the Travis CI build jobs to GitHub Actions, with minor
changes.
- The trailing whitespace detection has been removed for now.
- The libegl1-mesa-dev dependency for Wayland has been removed as it
appears to no longer be necessary for building.
The EGL backend ignored the state of GLFW_DOUBLEBUFFER and always
created a double-buffered EGL window.
This sets the EGL_RENDER_BUFFER attribute at EGL window creation
appropriately.
Fixes#1843.
This skips the buffer swap after the initial glClear performed during
window creation, if the window is single-buffered. This call confused
apitrace into thinking the window was double-buffered.
Fixes#1873.
The /clang: suffix passed to Clang-CL was accidentally also passed to
the regular standalone Clang, which caused compilation to fail. We now
pass /W3 to Clang-CL, which it interprets as -Wall.
The _CRT_SECURE_NO_WARNINGS macro is now defined for both Clang and
Clang-CL.
The /entry: flag passed to link.exe is now also passed to lld-link,
letting the windows subsystem tests and examples link.
Fixes#1807.
Closes#1824.
Closes#1874.