Commit Graph

13 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
afa78b4270 Update gamepad mappings from upstream 2021-08-01 20:17:21 +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
b69fb99031 Remove mappings for GUID used by different devices
The SDL2 2.0.5+ controller GUID 03000000790000000600000000000000 matches
many devices with different layouts and element counts but with the same
chipset.  This issue is still being resolved upstream.  In the meantime
this removes those mappings from GLFW to avoid confusion and errors.

SDL upstream issue: https://bugzilla.libsdl.org/show_bug.cgi?id=4545

Related to #1583.
2019-11-11 22:37:18 +01: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
Camilla Löwy
f4cd470bcb Move to modern mappings database with modifiers 2018-02-13 18:57:56 +01: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
fe9c7a01c5 Update gamepad mappings and source URL
This matches the recent upstream update.
2017-11-23 19:35:45 +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
Camilla Löwy
953106e74d Add support for SDL_GameControllerDB
This adds support for importing and applying mappings from the
SDL_GameControllerDB database.

Related to #900.
2017-07-07 15:52:33 +02:00