mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-27 23:19:11 +00:00
Unified code to standardize joystick names
This commit is contained in:
parent
db3b3a1d84
commit
c44473ba73
11 changed files with 182 additions and 173 deletions
|
@ -60,7 +60,7 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa
|
|||
SDL_zerop(item);
|
||||
item->index = gamepadEvent->index;
|
||||
|
||||
item->name = SDL_strdup(gamepadEvent->id);
|
||||
item->name = SDL_CreateJoystickName(0, 0, NULL, gamepadEvent->id);
|
||||
if ( item->name == NULL ) {
|
||||
SDL_free(item);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue