reset the ids when the driver is reinitialized
This commit is contained in:
parent
17aa00db1a
commit
e28450368f
|
@ -48,6 +48,9 @@ struct input_pointer
|
||||||
int16_t full_x, full_y;
|
int16_t full_x, full_y;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int primary_id = -1;
|
||||||
|
int secondary_id = -1;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
AXIS_X = 0,
|
AXIS_X = 0,
|
||||||
|
@ -425,6 +428,9 @@ static bool android_input_init_handle(void)
|
||||||
RARCH_LOG("Set engine_handle_dpad to 'Get Axis Value' (for reading extra analog sticks)");
|
RARCH_LOG("Set engine_handle_dpad to 'Get Axis Value' (for reading extra analog sticks)");
|
||||||
engine_handle_dpad = engine_handle_dpad_getaxisvalue;
|
engine_handle_dpad = engine_handle_dpad_getaxisvalue;
|
||||||
}
|
}
|
||||||
|
primary_id = -1;
|
||||||
|
secondary_id = -1;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -462,9 +468,6 @@ static void *android_input_init(void)
|
||||||
return android;
|
return android;
|
||||||
}
|
}
|
||||||
|
|
||||||
int primary_id = -1;
|
|
||||||
int secondary_id = -1;
|
|
||||||
|
|
||||||
static INLINE int android_input_poll_event_type_motion(
|
static INLINE int android_input_poll_event_type_motion(
|
||||||
android_input_data_t *android_data, AInputEvent *event,
|
android_input_data_t *android_data, AInputEvent *event,
|
||||||
int port, int source)
|
int port, int source)
|
||||||
|
@ -604,6 +607,7 @@ static void handle_hotplug(android_input_data_t *android_data,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RARCH_LOG("Device Name: %s\n IDS: %d, %d", name_buf, primary_id, secondary_id);
|
||||||
/* FIXME - per-device hacks for nVidia Shield, Xperia Play and others
|
/* FIXME - per-device hacks for nVidia Shield, Xperia Play and others
|
||||||
|
|
||||||
* Built-in controller is always user 1
|
* Built-in controller is always user 1
|
||||||
|
@ -638,7 +642,6 @@ static void handle_hotplug(android_input_data_t *android_data,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
strlcpy (name_buf, "NVIDIA SHIELD Portable", sizeof(name_buf));
|
strlcpy (name_buf, "NVIDIA SHIELD Portable", sizeof(name_buf));
|
||||||
RARCH_LOG("Device Name: %s\n", name_buf);
|
|
||||||
*port = 0;
|
*port = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -660,7 +663,6 @@ static void handle_hotplug(android_input_data_t *android_data,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
strlcpy (name_buf, "GPD XD", sizeof(name_buf));
|
strlcpy (name_buf, "GPD XD", sizeof(name_buf));
|
||||||
RARCH_LOG("Device Name: %s\n", name_buf);
|
|
||||||
*port = 0;
|
*port = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -681,7 +683,6 @@ static void handle_hotplug(android_input_data_t *android_data,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
strlcpy (name_buf, "XPERIA Play", sizeof(name_buf));
|
strlcpy (name_buf, "XPERIA Play", sizeof(name_buf));
|
||||||
RARCH_LOG("Device Name: %s\n", name_buf);
|
|
||||||
*port = 0;
|
*port = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue