Created
December 6, 2025 10:02
-
-
Save Patola/227d2ae3185b9ffab95d807622871ee3 to your computer and use it in GitHub Desktop.
New Metro Awakening patch for WiVRn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 4e7c5eee25ec047697378e060f6ff5711d6efed3 Mon Sep 17 00:00:00 2001 | |
| From: Sapphire <[email protected]> | |
| Date: Fri, 7 Nov 2025 20:41:16 -0600 | |
| Subject: [PATCH] st/oxr: push XrEventDataInteractionProfileChanged when | |
| profile changes to NULL | |
| --- | |
| src/xrt/state_trackers/oxr/oxr_input.c | 15 +++++++++++---- | |
| 1 file changed, 11 insertions(+), 4 deletions(-) | |
| diff --git a/src/xrt/state_trackers/oxr/oxr_input.c b/src/xrt/state_trackers/oxr/oxr_input.c | |
| index a319e044d..cd1cd4bd9 100644 | |
| --- a/src/xrt/state_trackers/oxr/oxr_input.c | |
| +++ b/src/xrt/state_trackers/oxr/oxr_input.c | |
| @@ -1882,15 +1882,22 @@ oxr_session_update_action_bindings(struct oxr_logger *log, struct oxr_session *s | |
| } | |
| } | |
| + bool any_profile_changed = false; | |
| + | |
| #define POPULATE_PROFILE(X) \ | |
| - sess->X = XR_NULL_PATH; \ | |
| - if (profiles.X != NULL) { \ | |
| - sess->X = profiles.X->path; \ | |
| - oxr_event_push_XrEventDataInteractionProfileChanged(log, sess); \ | |
| + { \ | |
| + const XrPath new_path = profiles.X ? profiles.X->path : XR_NULL_PATH; \ | |
| + if (sess->X != new_path) { \ | |
| + sess->X = new_path; \ | |
| + any_profile_changed = true; \ | |
| + } \ | |
| } | |
| 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.52.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment