port: sanitize controller names

because apparently some of them can't fucking resist putting a funny R or TM in there
This commit is contained in:
fgsfds committed 2024-11-20 13:00:41 +01:00
1 parent ba1b6c3232
commit d2d35263a4
1 file changed
+7
+7
View File
@@ -990,6 +990,13 @@ const char *inputGetConnectedControllerName(s32 id)
snprintf(fullName, sizeof(fullName), "%d: %s", jidx, name);
// replace non-ascii chars with spaces
for (char *p = fullName; *p; ++p) {
if ((u32)*p >= 0x7f) {
*p = ' ';
}
}
return fullName;
}