50 lines
2.4 KiB
Diff
50 lines
2.4 KiB
Diff
From ccd1bef8ef971f29bf521abd74b9ebc97cb689fb Mon Sep 17 00:00:00 2001
|
|
From: Sapphire <imsapphire0@gmail.com>
|
|
Date: Fri, 7 Nov 2025 20:41:16 -0600
|
|
Subject: [PATCH 07/11] st/oxr: push XrEventDataInteractionProfileChanged when
|
|
profile changes to NULL
|
|
|
|
---
|
|
src/xrt/state_trackers/oxr/oxr_input.c | 15 +++++----------
|
|
1 file changed, 5 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/src/xrt/state_trackers/oxr/oxr_input.c b/src/xrt/state_trackers/oxr/oxr_input.c
|
|
index 388a37d9d..8e3bd9513 100644
|
|
--- a/src/xrt/state_trackers/oxr/oxr_input.c
|
|
+++ b/src/xrt/state_trackers/oxr/oxr_input.c
|
|
@@ -1881,26 +1881,21 @@ oxr_session_update_action_bindings(struct oxr_logger *log, struct oxr_session *s
|
|
}
|
|
}
|
|
|
|
- /*
|
|
- * This code will only send events (and update the bindings) if there
|
|
- * is a profile mapped to the subaction path. Meaning it won't update
|
|
- * the cache or generate events when a controller goes away, basically
|
|
- * latching the interaction profile to the last active device.
|
|
- */
|
|
+ bool any_profile_changed = false;
|
|
#define POPULATE_PROFILE(X) \
|
|
do { \
|
|
XrPath path = profiles.X != NULL ? profiles.X->path : XR_NULL_PATH; \
|
|
- if (path == XR_NULL_PATH) { \
|
|
- break; /* Only update on "active" interaction profiles per sub-action path. */ \
|
|
- } \
|
|
if (sess->X != path) { \
|
|
sess->X = path; \
|
|
- oxr_event_push_XrEventDataInteractionProfileChanged(log, sess); \
|
|
+ any_profile_changed = true; \
|
|
} \
|
|
} while (false);
|
|
OXR_FOR_EACH_VALID_SUBACTION_PATH(POPULATE_PROFILE)
|
|
#undef POPULATE_PROFILE
|
|
|
|
+ if (any_profile_changed) {
|
|
+ oxr_event_push_XrEventDataInteractionProfileChanged(log, sess);
|
|
+ }
|
|
return oxr_session_success_result(sess);
|
|
}
|
|
|
|
--
|
|
2.53.0
|
|
|