mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
iohidmanager_hid: Remove name from adapters when they are disconnected
This commit is contained in:
parent
f7c6574b37
commit
cd5a5c5fd7
@ -237,6 +237,7 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result,
|
||||
static void iohidmanager_hid_device_remove(void *data,
|
||||
IOReturn result, void* sender)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct iohidmanager_hid_adapter *adapter =
|
||||
(struct iohidmanager_hid_adapter*)data;
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)
|
||||
@ -246,6 +247,8 @@ static void iohidmanager_hid_device_remove(void *data,
|
||||
{
|
||||
input_autoconfigure_disconnect(adapter->slot, adapter->name);
|
||||
|
||||
settings->input.device_names[adapter->slot][0] = '\0';
|
||||
|
||||
hid->buttons[adapter->slot] = 0;
|
||||
memset(hid->axes[adapter->slot], 0, sizeof(hid->axes));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user