mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-18 01:51:15 +00:00
OpenXR attach actions to session just once
This commit is contained in:
parent
709c0abdcf
commit
314e8b0288
1 changed files with 10 additions and 6 deletions
|
@ -40,6 +40,7 @@ XrAction vibrateRightFeedback;
|
||||||
XrActionSet runningActionSet;
|
XrActionSet runningActionSet;
|
||||||
XrSpace leftControllerAimSpace = XR_NULL_HANDLE;
|
XrSpace leftControllerAimSpace = XR_NULL_HANDLE;
|
||||||
XrSpace rightControllerAimSpace = XR_NULL_HANDLE;
|
XrSpace rightControllerAimSpace = XR_NULL_HANDLE;
|
||||||
|
qboolean actionsAttached = qfalse;
|
||||||
qboolean inputInitialized = qfalse;
|
qboolean inputInitialized = qfalse;
|
||||||
qboolean useSimpleProfile = qfalse;
|
qboolean useSimpleProfile = qfalse;
|
||||||
|
|
||||||
|
@ -1364,12 +1365,15 @@ void IN_VRSyncActions( void )
|
||||||
engine_t* engine = VR_GetEngine();
|
engine_t* engine = VR_GetEngine();
|
||||||
|
|
||||||
// Attach to session
|
// Attach to session
|
||||||
|
if (!actionsAttached) {
|
||||||
XrSessionActionSetsAttachInfo attachInfo = {};
|
XrSessionActionSetsAttachInfo attachInfo = {};
|
||||||
attachInfo.type = XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO;
|
attachInfo.type = XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO;
|
||||||
attachInfo.next = NULL;
|
attachInfo.next = NULL;
|
||||||
attachInfo.countActionSets = 1;
|
attachInfo.countActionSets = 1;
|
||||||
attachInfo.actionSets = &runningActionSet;
|
attachInfo.actionSets = &runningActionSet;
|
||||||
OXR(xrAttachSessionActionSets(engine->appState.Session, &attachInfo));
|
OXR(xrAttachSessionActionSets(engine->appState.Session, &attachInfo));
|
||||||
|
actionsAttached = qtrue;
|
||||||
|
}
|
||||||
|
|
||||||
// sync action data
|
// sync action data
|
||||||
XrActiveActionSet activeActionSet = {};
|
XrActiveActionSet activeActionSet = {};
|
||||||
|
|
Loading…
Reference in a new issue