mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
We'll just use the legacy names for face buttons in the mappings
This fixes being able to accidentally rebind the face buttons in testcontroller
This commit is contained in:
parent
051ed397d1
commit
57e5c7f6ee
2 changed files with 19 additions and 62 deletions
|
|
@ -2292,33 +2292,9 @@ static void ConvertBAXYMapping(MappingParts *parts)
|
|||
}
|
||||
}
|
||||
|
||||
static void UseLegacyButtonNames(MappingParts *parts)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < parts->num_elements; ++i) {
|
||||
char *key = parts->keys[i];
|
||||
|
||||
if (SDL_strcmp(key, "s") == 0) {
|
||||
parts->keys[i] = SDL_strdup("a");
|
||||
SDL_free(key);
|
||||
} else if (SDL_strcmp(key, "e") == 0) {
|
||||
parts->keys[i] = SDL_strdup("b");
|
||||
SDL_free(key);
|
||||
} else if (SDL_strcmp(key, "w") == 0) {
|
||||
parts->keys[i] = SDL_strdup("x");
|
||||
SDL_free(key);
|
||||
} else if (SDL_strcmp(key, "n") == 0) {
|
||||
parts->keys[i] = SDL_strdup("y");
|
||||
SDL_free(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateLegacyElements(MappingParts *parts)
|
||||
{
|
||||
ConvertBAXYMapping(parts);
|
||||
UseLegacyButtonNames(parts);
|
||||
}
|
||||
|
||||
static SDL_bool CombineMappingAxes(MappingParts *parts)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue