Commit Graph

8 Commits

Author SHA1 Message Date
Camilla Löwy
201400b974 Simplify parsing of default gamepad mappings
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.
2021-08-01 20:57:28 +02:00
Camilla Löwy
0c90e1a33f Add gamepad mapping filtering by backend
This fixes gamepad mappings being included in GLFW binaries that would
then never use them because they were for a different platform.
2021-08-01 20:17:21 +02:00
Camilla Löwy
01778329ec Add custom target for updating gamepad mappings 2021-08-01 20:16:17 +02:00
Camilla Löwy
a337c56848 Start 3.4 2019-04-16 23:08:39 +02:00
Camilla Löwy
ab118b2529 Fix copyright years (somewhat) 2019-04-15 20:50:00 +02:00
Emmanuel Gil Peyrot
c3cba58a71 Remove trailing whitespace 2017-12-14 15:36:55 +01:00
Camilla Löwy
3169179de1 Fix string literal exceeding max length
Fixes #1145.
2017-11-23 20:54:44 +01:00
Camilla Löwy
16ae02ab85 Add CMake target for updating gamepad mappings
This adds the 'mappings' build target that downloads the upstream
gamecontrollerdb.txt file and regenerates the mappings.h header.

Related to #900.
2017-09-15 15:50:39 +02:00