Add gamepad forwarding through OpenXR
Forward a gamepad paired to the headset to the server. Useful when the controller is in range of the headset but not the server, such as a DualSense paired to a Quest over Bluetooth. The headset reads the gamepad through the OpenXR microsoft/xbox_controller profile and forwards it on the existing input rails: gamepad device ids in the inputs packet, plus a gamepad entry in the interaction profile array that signals connection and disconnection from the tracking thread. The server exposes a native OpenXR gamepad at /user/gamepad, connected while the headset reports a gamepad interaction profile. This needs no permission and is always available. Rumble is sent back to the headset and applied through OpenXR haptics.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "wivrn_controller.h"
|
||||
#include "wivrn_eye_tracker.h"
|
||||
#include "wivrn_fb_face2_tracker.h"
|
||||
#include "wivrn_gamepad.h"
|
||||
#include "wivrn_generic_tracker.h"
|
||||
#include "wivrn_hmd.h"
|
||||
#include "wivrn_htc_face_tracker.h"
|
||||
@@ -95,6 +96,7 @@ class wivrn_session : public xrt_system_devices
|
||||
wivrn_controller right_hand_interaction;
|
||||
int32_t right_hand_interaction_index;
|
||||
std::optional<wivrn_eye_tracker> eye_tracker;
|
||||
std::optional<wivrn_gamepad> gamepad_device;
|
||||
std::optional<wivrn_android_face_tracker> android_face_tracker;
|
||||
std::optional<wivrn_fb_face2_tracker> fb_face2_tracker;
|
||||
std::optional<wivrn_htc_face_tracker> htc_face_tracker;
|
||||
|
||||
Reference in New Issue
Block a user