Skip to content

Commit

Permalink
Prefer positional mapping for controllers with a diamond button confi…
Browse files Browse the repository at this point in the history
…guration
  • Loading branch information
SuperSamus committed Jul 27, 2023
1 parent 4cffbc3 commit 76b6e91
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 234 deletions.
2 changes: 2 additions & 0 deletions docs/README-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ The functions SDL_GetGamepads(), SDL_GetGamepadInstanceName(), SDL_GetGamepadIns
The gamepad binding structure has been removed in favor of exchanging bindings in text format.
Controllers with a diamond button configuration by default will their buttons mapped according to position, instead of by label (affects for instance Nintendo controllers). As before, this can be adjusted using the SDL_GAMECONTROLLER_USE_BUTTON_LABELS hint.
SDL_GameControllerGetSensorDataWithTimestamp() has been removed. If you want timestamps for the sensor data, you should use the sensor_timestamp member of SDL_EVENT_GAMEPAD_SENSOR_UPDATE events.
SDL_CONTROLLER_TYPE_VIRTUAL has been removed, so virtual controllers can emulate other gamepad types. If you need to know whether a controller is virtual, you can use SDL_IsJoystickVirtual().
Expand Down
2 changes: 1 addition & 1 deletion include/SDL3/SDL_hints.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ extern "C" {
* "0" - Report the face buttons by position, as though they were on an Xbox controller.
* "1" - Report the face buttons by label instead of position
*
* The default value is "1". This hint may be set at any time.
* By default this is disabled for controllers that have a diamond button configuration, and enabled for the controllers that don't. This hint may be set at any time.
*/
#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"

Expand Down
Loading

0 comments on commit 76b6e91

Please sign in to comment.