mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(SDL*) Add joypad auto configuration support
This commit is contained in:
parent
12d0bdfc8a
commit
f854449d47
@ -120,6 +120,9 @@ static void pad_connect(unsigned id)
|
||||
return;
|
||||
}
|
||||
|
||||
strlcpy(g_settings.input.device_names[id], pad_name(id), sizeof(g_settings.input.device_names[id]));
|
||||
input_config_autoconfigure_joypad(id, pad_name(id), sdl_joypad.ident);
|
||||
|
||||
RARCH_LOG("[SDL]: Joypad #%u connected: %s.\n", id, pad_name(id));
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
@ -185,6 +188,8 @@ static void pad_disconnect(unsigned id)
|
||||
RARCH_LOG("[SDL]: Joypad #%u disconnected.\n", id);
|
||||
}
|
||||
|
||||
g_settings.input.device_names[id][0] = '\0';
|
||||
|
||||
memset(&g_pads[id], 0, sizeof(g_pads[id]));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user