Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer positional mapping for controllers with a diamond button configuration #8039

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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