Added the ability to rename your controller

This commit is contained in:
Sam Lantinga
2023-07-16 15:11:24 -07:00
parent 08db0e8f64
commit 57820071a4
2 changed files with 167 additions and 20 deletions

View File

@@ -2423,7 +2423,7 @@ char *SetMappingName(char *mapping, const char *name)
/* Remove any commas, which are field separators in the mapping */
length = SDL_strlen(new_name);
while ((spot = SDL_strchr(new_name, ',')) != NULL) {
SDL_memmove(spot, spot + 1, length - (spot - new_name) - 1);
SDL_memmove(spot, spot + 1, length - (spot - new_name) + 1);
--length;
}