Commit 598c1a3b authored by Christoph Haag's avatar Christoph Haag
Browse files

d/ohmd: Only set output name if there is an output

This needs to be revisited after OpenHMD gets a proper API for haptic feedback.

closes #119
parent 5d605c7b
......@@ -1131,7 +1131,9 @@ create_controller(ohmd_context *ctx, int device_idx, int device_flags, enum xrt_
// in case the hardware is an analog trigger, change the input after a half pulled trigger.
ohd->make_trigger_digital = true;
ohd->base.outputs[0].name = XRT_OUTPUT_NAME_SIMPLE_VIBRATION;
if (num_outputs > 0) {
ohd->base.outputs[0].name = XRT_OUTPUT_NAME_SIMPLE_VIBRATION;
ohd->controls_mapping[OHMD_TRIGGER] = SIMPLE_SELECT_CLICK;
ohd->controls_mapping[OHMD_MENU] = SIMPLE_MENU_CLICK;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment