mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
xrt: Make it possible for the device set active status on inputs
This commit is contained in:
parent
998b198b44
commit
7082a599c7
|
@ -251,6 +251,11 @@ u_device_allocate(enum u_device_alloc_flags flags,
|
|||
if (num_inputs > 0) {
|
||||
xdev->num_inputs = num_inputs;
|
||||
xdev->inputs = (struct xrt_input *)(ptr + offset_inputs);
|
||||
|
||||
// Set inputs to active initially, easier for drivers.
|
||||
for (size_t i = 0; i < num_inputs; i++) {
|
||||
xdev->inputs[i].active = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_outputs > 0) {
|
||||
|
|
|
@ -180,6 +180,9 @@ struct xrt_hmd_parts
|
|||
*/
|
||||
struct xrt_input
|
||||
{
|
||||
//! Is this input active.
|
||||
bool active;
|
||||
|
||||
int64_t timestamp;
|
||||
|
||||
enum xrt_input_name name;
|
||||
|
|
Loading…
Reference in a new issue