mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Added the gamepad hint SDL_GAMECONTROLLER_USE_GAMECUBE_LABELS
This is for internal use to signal that a mapping uses positional GameCube buttons. It's set so we know whether a mapping uses the older style labeled buttons or the newer style positional buttons. If a positional mapping is used with SDL2, then it will be ignored, since the hint is marked as defaulting true and the mapping conditional is that the hint is false.
This commit is contained in:
@@ -478,17 +478,6 @@ static void CommitBindingElement(const char *binding, bool force)
|
||||
mapping = NULL;
|
||||
}
|
||||
|
||||
if (mapping && SDL_GetGamepadType(controller->gamepad) == SDL_GAMEPAD_TYPE_GAMECUBE) {
|
||||
if (SDL_strstr(mapping, "face:") == NULL) {
|
||||
char *new_mapping = NULL;
|
||||
SDL_asprintf(&new_mapping, "%sface:axby,", mapping);
|
||||
if (new_mapping) {
|
||||
SDL_free(mapping);
|
||||
mapping = new_mapping;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If the controller generates multiple events for a single element, pick the best one */
|
||||
if (!force && binding_advance_time) {
|
||||
char *current = GetElementBinding(mapping, binding_element);
|
||||
|
||||
Reference in New Issue
Block a user