mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Driver independent disconnection notification (#14600)
This commit is contained in:
parent
e3a25793b6
commit
954d1bf605
@ -658,9 +658,6 @@ static void xinput_joypad_destroy(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
/* Run poll one last time in order to detect disconnections */
|
||||
xinput_joypad_poll();
|
||||
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
g_xinput_states[i].xstate.dwPacketNumber = 0;
|
||||
@ -687,7 +684,6 @@ static void xinput_joypad_destroy(void)
|
||||
g_xinput_block_pads = false;
|
||||
}
|
||||
|
||||
|
||||
input_device_driver_t xinput_joypad = {
|
||||
xinput_joypad_init,
|
||||
xinput_joypad_query_pad,
|
||||
|
@ -362,9 +362,6 @@ static void xinput_joypad_destroy(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
/* Run poll one last time in order to detect disconnections */
|
||||
xinput_joypad_poll();
|
||||
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
g_xinput_states[i].xstate.dwPacketNumber = 0;
|
||||
|
@ -2708,6 +2708,8 @@ void joypad_driver_reinit(void *data, const char *joypad_driver_name)
|
||||
{
|
||||
const input_device_driver_t *tmp = input_driver_st.primary_joypad;
|
||||
input_driver_st.primary_joypad = NULL;
|
||||
/* Run poll one last time in order to detect disconnections */
|
||||
tmp->poll();
|
||||
tmp->destroy();
|
||||
}
|
||||
#ifdef HAVE_MFI
|
||||
@ -2715,6 +2717,7 @@ void joypad_driver_reinit(void *data, const char *joypad_driver_name)
|
||||
{
|
||||
const input_device_driver_t *tmp = input_driver_st.secondary_joypad;
|
||||
input_driver_st.secondary_joypad = NULL;
|
||||
tmp->poll();
|
||||
tmp->destroy();
|
||||
}
|
||||
#endif
|
||||
|
@ -819,14 +819,12 @@ static void input_autoconfigure_disconnect_handler(retro_task_t *task)
|
||||
autoconfig_handle->port + 1);
|
||||
if (!string_is_empty(autoconfig_handle->device_info.name))
|
||||
{
|
||||
task_title[_len ] = ' ';
|
||||
task_title[_len+1] = '(';
|
||||
task_title[_len ] = ':';
|
||||
task_title[_len+1] = ' ';
|
||||
task_title[_len+2] = '\0';
|
||||
_len = strlcat(task_title,
|
||||
autoconfig_handle->device_info.name,
|
||||
sizeof(task_title));
|
||||
task_title[_len ] = ')';
|
||||
task_title[_len+1] = '\0';
|
||||
}
|
||||
|
||||
task_free_title(task);
|
||||
|
Loading…
x
Reference in New Issue
Block a user