From b54d0c5dd58912515c5177f9c40ae01293081399 Mon Sep 17 00:00:00 2001
From: Baplar
Date: Sat, 21 Jun 2025 16:57:00 +0200
Subject: [PATCH 001/135] Use shorter serial for generic trackers
---
server/driver/wivrn_generic_tracker.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/driver/wivrn_generic_tracker.cpp b/server/driver/wivrn_generic_tracker.cpp
index fde72969..208d0e65 100644
--- a/server/driver/wivrn_generic_tracker.cpp
+++ b/server/driver/wivrn_generic_tracker.cpp
@@ -126,7 +126,8 @@ wivrn_generic_tracker::wivrn_generic_tracker(int index, xrt_device * hmd, wivrn_
{
auto unique_name = std::format("WiVRn Generic Tracker #{}", index + 1);
strlcpy(str, unique_name.c_str(), std::size(str));
- strlcpy(serial, unique_name.c_str(), std::size(serial));
+ auto unique_serial = std::format("wivrn-{}", index + 1);
+ strlcpy(serial, unique_serial.c_str(), std::size(serial));
pose_input.name = XRT_INPUT_GENERIC_TRACKER_POSE;
pose_input.active = true;
From 0fba21addf5448c66d679901f3e872e5e175fb1a Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sat, 21 Jun 2025 11:39:16 +0200
Subject: [PATCH 002/135] Fix touch plus/pro controller bindings
---
client/application.cpp | 35 +++++++++--------
client/scene.h | 2 +-
client/scenes/lobby.cpp | 84 ++++++----------------------------------
client/scenes/stream.cpp | 32 ++++++---------
4 files changed, 43 insertions(+), 110 deletions(-)
diff --git a/client/application.cpp b/client/application.cpp
index 026aa151..6da77f71 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -131,7 +131,7 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbrest/touch",
}},
interaction_profile{
- " /interaction_profiles/facebook/touch_controller_pro",
+ "/interaction_profiles/facebook/touch_controller_pro",
{"XR_FB_touch_controller_pro"},
{
"/user/hand/left/output/haptic",
@@ -185,7 +185,7 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumb_fb/proximity_fb",
}},
interaction_profile{
- " /interaction_profiles/meta/touch_pro_controller",
+ "/interaction_profiles/meta/touch_pro_controller",
{"XR_VERSION_1_1"},
{
"/user/hand/left/output/haptic",
@@ -241,7 +241,7 @@ static std::vector interaction_profiles{
}},
interaction_profile{
- " /interaction_profiles/meta/touch_controller_plus",
+ "/interaction_profiles/meta/touch_controller_plus",
{"XR_META_touch_controller_plus"},
{
"/user/hand/left/output/haptic",
@@ -289,7 +289,7 @@ static std::vector interaction_profiles{
}},
interaction_profile{
- " /interaction_profiles/meta/touch_plus_controller",
+ "/interaction_profiles/meta/touch_plus_controller",
{"XR_VERSION_1_1"},
{
"/user/hand/left/output/haptic",
@@ -999,20 +999,23 @@ void application::initialize_actions()
for (const scene::suggested_binding & j: i->bindings)
{
- // Skip unsupported profiles
- if (!suggested_bindings.contains(j.profile_name))
- continue;
-
- std::vector & xr_bindings = suggested_bindings[j.profile_name];
-
- for (const scene::action_binding & k: j.paths)
+ for (const auto & profile: j.profile_names)
{
- XrAction a = i->actions_by_name[k.action_name].first;
- assert(a != XR_NULL_HANDLE);
+ // Skip unsupported profiles
+ if (!suggested_bindings.contains(profile))
+ continue;
- xr_bindings.push_back(XrActionSuggestedBinding{
- .action = a,
- .binding = string_to_path(k.input_source)});
+ std::vector & xr_bindings = suggested_bindings[profile];
+
+ for (const scene::action_binding & k: j.paths)
+ {
+ XrAction a = i->actions_by_name[k.action_name].first;
+ assert(a != XR_NULL_HANDLE);
+
+ xr_bindings.push_back(XrActionSuggestedBinding{
+ .action = a,
+ .binding = string_to_path(k.input_source)});
+ }
}
}
}
diff --git a/client/scene.h b/client/scene.h
index 7d2533cb..d7412a14 100644
--- a/client/scene.h
+++ b/client/scene.h
@@ -43,7 +43,7 @@ public:
struct suggested_binding
{
- std::string profile_name;
+ std::vector profile_names;
std::vector paths;
};
diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp
index 44533091..f60e8cd2 100644
--- a/client/scenes/lobby.cpp
+++ b/client/scenes/lobby.cpp
@@ -1256,7 +1256,17 @@ scene::meta & scenes::lobby::get_meta_scene()
},
.bindings = {
suggested_binding{
- "/interaction_profiles/oculus/touch_controller",
+ {
+ "/interaction_profiles/oculus/touch_controller",
+ "/interaction_profiles/facebook/touch_controller_pro",
+ "/interaction_profiles/meta/touch_pro_controller",
+ "/interaction_profiles/meta/touch_controller_plus",
+ "/interaction_profiles/meta/touch_plus_controller",
+ "/interaction_profiles/bytedance/pico_neo3_controller",
+ "/interaction_profiles/bytedance/pico4_controller",
+ "/interaction_profiles/bytedance/pico4s_controller",
+ "/interaction_profiles/htc/vive_focus3_controller",
+ },
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/trigger/value"},
@@ -1274,79 +1284,9 @@ scene::meta & scenes::lobby::get_meta_scene()
},
},
suggested_binding{
- "/interaction_profiles/bytedance/pico_neo3_controller",
{
- {"left_aim", "/user/hand/left/input/aim/pose"},
- {"left_trigger", "/user/hand/left/input/trigger/value"},
- {"left_squeeze", "/user/hand/left/input/squeeze/value"},
- {"left_scroll", "/user/hand/left/input/thumbstick"},
- {"left_haptic", "/user/hand/left/output/haptic"},
- {"right_aim", "/user/hand/right/input/aim/pose"},
- {"right_trigger", "/user/hand/right/input/trigger/value"},
- {"right_squeeze", "/user/hand/right/input/squeeze/value"},
- {"right_scroll", "/user/hand/right/input/thumbstick"},
- {"right_haptic", "/user/hand/right/output/haptic"},
-
- {"recenter_left", "/user/hand/left/input/x/click"},
- {"recenter_right", "/user/hand/right/input/a/click"},
+ "/interaction_profiles/khr/simple_controller",
},
- },
- suggested_binding{
- "/interaction_profiles/bytedance/pico4_controller",
- {
- {"left_aim", "/user/hand/left/input/aim/pose"},
- {"left_trigger", "/user/hand/left/input/trigger/value"},
- {"left_squeeze", "/user/hand/left/input/squeeze/value"},
- {"left_scroll", "/user/hand/left/input/thumbstick"},
- {"left_haptic", "/user/hand/left/output/haptic"},
- {"right_aim", "/user/hand/right/input/aim/pose"},
- {"right_trigger", "/user/hand/right/input/trigger/value"},
- {"right_squeeze", "/user/hand/right/input/squeeze/value"},
- {"right_scroll", "/user/hand/right/input/thumbstick"},
- {"right_haptic", "/user/hand/right/output/haptic"},
-
- {"recenter_left", "/user/hand/left/input/x/click"},
- {"recenter_right", "/user/hand/right/input/a/click"},
- },
- },
- suggested_binding{
- "/interaction_profiles/bytedance/pico4s_controller",
- {
- {"left_aim", "/user/hand/left/input/aim/pose"},
- {"left_trigger", "/user/hand/left/input/trigger/value"},
- {"left_squeeze", "/user/hand/left/input/squeeze/value"},
- {"left_scroll", "/user/hand/left/input/thumbstick"},
- {"left_haptic", "/user/hand/left/output/haptic"},
- {"right_aim", "/user/hand/right/input/aim/pose"},
- {"right_trigger", "/user/hand/right/input/trigger/value"},
- {"right_squeeze", "/user/hand/right/input/squeeze/value"},
- {"right_scroll", "/user/hand/right/input/thumbstick"},
- {"right_haptic", "/user/hand/right/output/haptic"},
-
- {"recenter_left", "/user/hand/left/input/x/click"},
- {"recenter_right", "/user/hand/right/input/a/click"},
- },
- },
- suggested_binding{
- "/interaction_profiles/htc/vive_focus3_controller",
- {
- {"left_aim", "/user/hand/left/input/aim/pose"},
- {"left_trigger", "/user/hand/left/input/trigger/value"},
- {"left_squeeze", "/user/hand/left/input/squeeze/value"},
- {"left_scroll", "/user/hand/left/input/thumbstick"},
- {"left_haptic", "/user/hand/left/output/haptic"},
- {"right_aim", "/user/hand/right/input/aim/pose"},
- {"right_trigger", "/user/hand/right/input/trigger/value"},
- {"right_squeeze", "/user/hand/right/input/squeeze/value"},
- {"right_scroll", "/user/hand/right/input/thumbstick"},
- {"right_haptic", "/user/hand/right/output/haptic"},
-
- {"recenter_left", "/user/hand/left/input/x/click"},
- {"recenter_right", "/user/hand/right/input/a/click"},
- },
- },
- suggested_binding{
- "/interaction_profiles/khr/simple_controller",
{
{"left_aim", "/user/hand/left/input/aim/pose"},
{"left_trigger", "/user/hand/left/input/select/click"},
diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp
index e74954d3..e38448fd 100644
--- a/client/scenes/stream.cpp
+++ b/client/scenes/stream.cpp
@@ -1230,35 +1230,25 @@ scene::meta & scenes::stream::get_meta_scene()
},
.bindings = {
suggested_binding{
- "/interaction_profiles/oculus/touch_controller",
+ {
+ "/interaction_profiles/oculus/touch_controller",
+ "/interaction_profiles/facebook/touch_controller_pro",
+ "/interaction_profiles/meta/touch_pro_controller",
+ "/interaction_profiles/meta/touch_controller_plus",
+ "/interaction_profiles/meta/touch_plus_controller",
+ "/interaction_profiles/bytedance/pico_neo3_controller",
+ "/interaction_profiles/bytedance/pico4_controller",
+ "/interaction_profiles/htc/vive_focus3_controller",
+ },
{
{"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
{"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
},
},
suggested_binding{
- "/interaction_profiles/bytedance/pico_neo3_controller",
{
- {"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
- {"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
+ "/interaction_profiles/khr/simple_controller",
},
- },
- suggested_binding{
- "/interaction_profiles/bytedance/pico4_controller",
- {
- {"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
- {"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
- },
- },
- suggested_binding{
- "/interaction_profiles/htc/vive_focus3_controller",
- {
- {"plots_toggle_1", "/user/hand/left/input/thumbstick/click"},
- {"plots_toggle_2", "/user/hand/right/input/thumbstick/click"},
- },
- },
- suggested_binding{
- "/interaction_profiles/khr/simple_controller",
{},
},
},
From 4ee47ab5d4da2c1c4050b9b555ac9983ef16b2ca Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sat, 21 Jun 2025 14:40:34 +0200
Subject: [PATCH 003/135] cleanup unused xr::passthrough
---
client/scenes/stream.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/client/scenes/stream.h b/client/scenes/stream.h
index 2f3bc860..d841dbe5 100644
--- a/client/scenes/stream.h
+++ b/client/scenes/stream.h
@@ -27,7 +27,6 @@
#include "wifi_lock.h"
#include "wivrn_client.h"
#include "wivrn_packets.h"
-#include "xr/passthrough.h"
#include
#include
#include
@@ -104,8 +103,6 @@ private:
std::optional reprojector;
- std::optional passthrough;
-
vk::raii::Fence fence = nullptr;
vk::raii::CommandBuffer command_buffer = nullptr;
From 081c45e7c614400bd464c458d9352f434fe79a15 Mon Sep 17 00:00:00 2001
From: Jayden
Date: Mon, 23 Jun 2025 03:08:09 +0800
Subject: [PATCH 004/135] Updated translation (#377)
* rephrase some sentence that doesnt really make sense in chinese
* updated translation
* added missing translation
---
locale/zh_TW/wivrn-dashboard.po | 126 ++++++++++++------
locale/zh_TW/wivrn.po | 224 +++++++++++++++++++-------------
2 files changed, 217 insertions(+), 133 deletions(-)
diff --git a/locale/zh_TW/wivrn-dashboard.po b/locale/zh_TW/wivrn-dashboard.po
index afef4e8d..cdabe4b6 100644
--- a/locale/zh_TW/wivrn-dashboard.po
+++ b/locale/zh_TW/wivrn-dashboard.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn-dashboard\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-05-11 16:16+0800\n"
+"POT-Creation-Date: 2025-06-22 20:32+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME \n"
+"Last-Translator: Jayden Ha \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
"MIME-Version: 1.0\n"
@@ -101,8 +101,8 @@ msgid ""
"master/docs/building.md#client-headset\">documentation to build your own "
"client."
msgstr ""
-"請按照 文件中的說明建置您自己的用戶端。"
+"請按照 文件中的說明建置您自己的用戶端。"
#: dashboard/qml/ApkInstallPage.qml:65 dashboard/qml/HeadsetsPage.qml:183
#: dashboard/qml/HeadsetStatsPage.qml:36 dashboard/qml/TroubleshootPage.qml:59
@@ -176,7 +176,7 @@ msgstr "重新命名"
#: dashboard/qml/HeadsetsPage.qml:55 dashboard/qml/WizardPage.qml:38
#: dashboard/qml/WizardPage.qml:88 dashboard/qml/WizardPage.qml:263
-#: dashboard/qml/WizardPage.qml:312 dashboard/qml/WizardPage.qml:396
+#: dashboard/qml/WizardPage.qml:326 dashboard/qml/WizardPage.qml:410
#, kde-format
msgid "Cancel"
msgstr "取消"
@@ -294,7 +294,7 @@ msgstr "配對中"
msgid "PIN: %1"
msgstr "PIN: %1"
-#: dashboard/qml/Main.qml:238 dashboard/qml/WizardPage.qml:359
+#: dashboard/qml/Main.qml:238 dashboard/qml/WizardPage.qml:373
#, kde-format
msgid "Connect by USB"
msgstr "透過 USB 連線"
@@ -523,54 +523,72 @@ msgstr "H.265"
msgid "AV1"
msgstr "AV1"
-#: dashboard/qml/SettingsPage.qml:323
+#: dashboard/qml/SettingsPage.qml:319
+#, kde-format
+msgid "Advanced options"
+msgstr "進階選項"
+
+#: dashboard/qml/SettingsPage.qml:325
+#, kde-format
+msgid "Enable debug window"
+msgstr "啟用偵錯視窗"
+
+#: dashboard/qml/SettingsPage.qml:332
+#, kde-format
+msgid "Enable SteamVR tracked devices support"
+msgstr "啟用 SteamVR 追蹤裝置支援"
+
+#: dashboard/qml/SettingsPage.qml:335
+#, kde-format
+msgid ""
+"Allows the use of lighthouse-based controllers and trackers.\n"
+"Requires SteamVR to be installed.\n"
+"Devices must be be powered on before connecting to WiVRn.\n"
+"An external tool such as motoc is needed for calibration."
+msgstr ""
+"允許使用 Lighthouse 基地台追蹤的控制器和追蹤器。\n"
+"需要安裝 SteamVR。\n"
+"裝置必須在連線到 WiVRn 之前開啟電源。\n"
+"校準需要額外工具,例如 motoc。"
+
+#: dashboard/qml/SettingsPage.qml:343
#, kde-format
msgid "Custom adb location"
msgstr "自訂 adb 位置"
-#: dashboard/qml/SettingsPage.qml:334
+#: dashboard/qml/SettingsPage.qml:354
#, kde-format
msgid "Adb location:"
msgstr "adb 位置:"
-#: dashboard/qml/SettingsPage.qml:343
+#: dashboard/qml/SettingsPage.qml:363
#, kde-format
msgctxt "browse a file to choose the adb binary"
msgid "Browse"
msgstr "瀏覽"
-#: dashboard/qml/SettingsPage.qml:353
+#: dashboard/qml/SettingsPage.qml:373
#, kde-format
msgid "Default"
msgstr "預設"
-#: dashboard/qml/SettingsPage.qml:360
-#, kde-format
-msgid "xrizer"
-msgstr "xrizer"
-
-#: dashboard/qml/SettingsPage.qml:365
-#, kde-format
-msgid "Open Composite"
-msgstr "Open Composite"
-
-#: dashboard/qml/SettingsPage.qml:372
+#: dashboard/qml/SettingsPage.qml:387
#, kde-format
msgctxt "set a custom OpenVR compatibility library"
msgid "Custom"
msgstr "自訂"
-#: dashboard/qml/SettingsPage.qml:377
+#: dashboard/qml/SettingsPage.qml:392
#, kde-format
msgid "Disabled"
msgstr "已停用"
-#: dashboard/qml/SettingsPage.qml:385
+#: dashboard/qml/SettingsPage.qml:400
#, kde-format
msgid "OpenVR compatibility library:"
msgstr "OpenVR 相容性函式庫:"
-#: dashboard/qml/SettingsPage.qml:411
+#: dashboard/qml/SettingsPage.qml:426
#, kde-format
msgid "Library path, excluding bin/linux64/vrclient.so"
msgstr "函式庫路徑,不包含 bin/linux64/vrclient.so"
@@ -605,7 +623,7 @@ msgstr "已複製 Steam 啟動命令"
msgid "I cannot find the WiVRn app on my headset"
msgstr "我在我的頭顯上找不到 WiVRn 應用程式。"
-#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:373
+#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:387
#, kde-format
msgid ""
"If you installed WiVRn over USB on a Meta headset, the app is in the "
@@ -619,7 +637,7 @@ msgstr ""
msgid "I cannot see my computer in the WiVRn app"
msgstr "我在 WiVRn 應用程式中看不到我的電腦。"
-#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:378
+#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:392
#, kde-format
msgid ""
"If the server is not visible or the connection fails, check that port 5353 "
@@ -672,7 +690,7 @@ msgstr "目前已停用配對"
msgid "I have no sound on my headset"
msgstr "我的頭戴式裝置沒有聲音"
-#: dashboard/qml/TroubleshootPage.qml:50 dashboard/qml/WizardPage.qml:426
+#: dashboard/qml/TroubleshootPage.qml:50 dashboard/qml/WizardPage.qml:440
#, kde-format
msgid ""
"When the headset is connected, select \"WiVRn\" as the default audio output "
@@ -695,9 +713,9 @@ msgid "Getting started"
msgstr "入門指南"
#: dashboard/qml/WizardPage.qml:29 dashboard/qml/WizardPage.qml:78
-#: dashboard/qml/WizardPage.qml:253 dashboard/qml/WizardPage.qml:302
-#: dashboard/qml/WizardPage.qml:386 dashboard/qml/WizardPage.qml:433
-#: dashboard/qml/WizardPage.qml:470
+#: dashboard/qml/WizardPage.qml:253 dashboard/qml/WizardPage.qml:316
+#: dashboard/qml/WizardPage.qml:400 dashboard/qml/WizardPage.qml:447
+#: dashboard/qml/WizardPage.qml:484
#, kde-format
msgid "Back"
msgstr "返回"
@@ -715,8 +733,8 @@ msgid ""
msgstr "此精靈將幫助您在頭戴式裝置上設定 WiVRn,並將其連接到您的電腦。"
#: dashboard/qml/WizardPage.qml:83 dashboard/qml/WizardPage.qml:258
-#: dashboard/qml/WizardPage.qml:307 dashboard/qml/WizardPage.qml:438
-#: dashboard/qml/WizardPage.qml:475
+#: dashboard/qml/WizardPage.qml:321 dashboard/qml/WizardPage.qml:452
+#: dashboard/qml/WizardPage.qml:489
#, kde-format
msgid "Next"
msgstr "下一步"
@@ -808,12 +826,24 @@ msgid ""
"your headset."
msgstr "當您連接頭戴式裝置時,您選擇的應用程式將會自動啟動。"
-#: dashboard/qml/WizardPage.qml:344
+#: dashboard/qml/WizardPage.qml:300
+#, kde-format
+msgid "Important information"
+msgstr "重要訊息"
+
+#: dashboard/qml/WizardPage.qml:307
+#, kde-format
+msgid ""
+"WiVRn entirely replaces SteamVR, you should not start SteamVR while WiVRn is "
+"running."
+msgstr "WiVRn完全取代了SteamVR,在WiVRn運行時,請勿啟動SteamVR"
+
+#: dashboard/qml/WizardPage.qml:358
#, kde-format
msgid "Start the WiVRn app on your headset"
msgstr "在您的頭戴式裝置上啟動 WiVRn 應用程式"
-#: dashboard/qml/WizardPage.qml:349
+#: dashboard/qml/WizardPage.qml:363
#, kde-format
msgid ""
"To connect over WiFi, start the WiVRn app on your headset, connect to \"%1\" "
@@ -822,44 +852,54 @@ msgstr ""
"要通過 WiFi 連線,請在您的頭戴式裝置上啟動 WiVRn 應用程式,連線至 \"%1\" 並輸"
"入 PIN 碼 \"%2\"。"
-#: dashboard/qml/WizardPage.qml:356
+#: dashboard/qml/WizardPage.qml:370
#, kde-format
msgid "To connect over USB, click on \"Connect by USB\"."
msgstr "要透過 USB 連線,請點擊 \"透過 USB 連線\"。"
-#: dashboard/qml/WizardPage.qml:369
+#: dashboard/qml/WizardPage.qml:383
#, kde-format
msgid "Troubleshooting"
msgstr "疑難排解"
-#: dashboard/qml/WizardPage.qml:391
+#: dashboard/qml/WizardPage.qml:405
#, kde-format
msgid "Skip"
msgstr "跳過"
-#: dashboard/qml/WizardPage.qml:411
+#: dashboard/qml/WizardPage.qml:425
#, kde-format
msgid "Connection established"
msgstr "連線已建立"
-#: dashboard/qml/WizardPage.qml:416
+#: dashboard/qml/WizardPage.qml:430
#, kde-format
msgid "Your headset is now connected."
msgstr "您的頭戴式裝置現在已連線。"
-#: dashboard/qml/WizardPage.qml:421 dashboard/qml/WizardPage.qml:463
+#: dashboard/qml/WizardPage.qml:435 dashboard/qml/WizardPage.qml:477
#, kde-format
msgid ""
"To connect another headset, make sure pairing is enabled in the dashboard "
"before connecting."
-msgstr "要連線其他頭戴式裝置,請確保在連線之前在儀表板中啟用配對。"
+msgstr "如要連接其他頭戴式裝置,請確保在連線之前在儀表板中啟用配對。"
-#: dashboard/qml/WizardPage.qml:443 dashboard/qml/WizardPage.qml:480
+#: dashboard/qml/WizardPage.qml:457 dashboard/qml/WizardPage.qml:494
#, kde-format
msgid "Finish"
msgstr "完成"
-#: dashboard/qml/WizardPage.qml:458
+#: dashboard/qml/WizardPage.qml:472
#, kde-format
msgid "Finished"
msgstr "已完成"
+
+#: dashboard/wivrn_server.cpp:584
+#, kde-format
+msgid "xrizer"
+msgstr "xrizer"
+
+#: dashboard/wivrn_server.cpp:585
+#, kde-format
+msgid "Open Composite"
+msgstr "Open Composite"
diff --git a/locale/zh_TW/wivrn.po b/locale/zh_TW/wivrn.po
index abd0a0c9..bad8d29d 100644
--- a/locale/zh_TW/wivrn.po
+++ b/locale/zh_TW/wivrn.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-05-11 16:16+0800\n"
+"POT-Creation-Date: 2025-06-22 20:32+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME \n"
+"Last-Translator: Jayden Ha \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
"MIME-Version: 1.0\n"
@@ -44,30 +44,30 @@ msgstr "無法連線至 {} ({}): {}"
msgid "Waiting for connection"
msgstr "等待連線"
-#: client/scenes/lobby_gui.cpp:131
+#: client/scenes/lobby_gui.cpp:132
msgctxt "openxr_post_processing"
msgid "Normal"
msgstr "正常"
-#: client/scenes/lobby_gui.cpp:134
+#: client/scenes/lobby_gui.cpp:135
msgctxt "openxr_post_processing"
msgid "Quality"
msgstr "畫質"
-#: client/scenes/lobby_gui.cpp:136
+#: client/scenes/lobby_gui.cpp:137
msgctxt "openxr_post_processing"
msgid "Disabled"
msgstr "已停用"
-#: client/scenes/lobby_gui.cpp:197
+#: client/scenes/lobby_gui.cpp:198
msgid "Disconnect"
msgstr "中斷連線"
-#: client/scenes/lobby_gui.cpp:203
+#: client/scenes/lobby_gui.cpp:204
msgid "Video stream interrupted"
msgstr "影片串流中斷"
-#: client/scenes/lobby_gui.cpp:205
+#: client/scenes/lobby_gui.cpp:206
msgid ""
"Connection ready\n"
"Start a VR application on your computer"
@@ -75,7 +75,7 @@ msgstr ""
"連線已就緒\n"
"請在您的電腦上啟動 VR 應用程式"
-#: client/scenes/lobby_gui.cpp:207
+#: client/scenes/lobby_gui.cpp:208
#, c++-format
msgid ""
"Connection ready\n"
@@ -84,52 +84,52 @@ msgstr ""
"連線已就緒\n"
"請在 {} 上啟動 VR 應用程式"
-#: client/scenes/lobby_gui.cpp:220
+#: client/scenes/lobby_gui.cpp:221
msgid "Close"
msgstr "關閉"
-#: client/scenes/lobby_gui.cpp:226
+#: client/scenes/lobby_gui.cpp:227
msgid "Connection"
msgstr "連線"
-#: client/scenes/lobby_gui.cpp:228
+#: client/scenes/lobby_gui.cpp:229
#, c++-format
msgid "Connection to {}"
msgstr "連線至 {}"
-#: client/scenes/lobby_gui.cpp:258
+#: client/scenes/lobby_gui.cpp:259
msgid "PIN"
msgstr "PIN"
-#: client/scenes/lobby_gui.cpp:280
+#: client/scenes/lobby_gui.cpp:281
msgid "Input the PIN displayed on the dashboard"
msgstr "請輸入控制面板上顯示的 PIN 碼"
-#: client/scenes/lobby_gui.cpp:355
+#: client/scenes/lobby_gui.cpp:356
msgid "Name"
msgstr "名"
-#: client/scenes/lobby_gui.cpp:366
+#: client/scenes/lobby_gui.cpp:367
msgid "Address"
-msgstr "位址"
+msgstr "伺服器位址"
-#: client/scenes/lobby_gui.cpp:375
+#: client/scenes/lobby_gui.cpp:376
msgid "Port"
msgstr "連接埠"
-#: client/scenes/lobby_gui.cpp:383
+#: client/scenes/lobby_gui.cpp:384
msgid "TCP only"
msgstr "僅限 TCP"
-#: client/scenes/lobby_gui.cpp:390
+#: client/scenes/lobby_gui.cpp:391
msgid "Cancel"
msgstr "取消"
-#: client/scenes/lobby_gui.cpp:404
+#: client/scenes/lobby_gui.cpp:405
msgid "Save"
msgstr "儲存"
-#: client/scenes/lobby_gui.cpp:457
+#: client/scenes/lobby_gui.cpp:458
msgid ""
"Start a WiVRn server on your\n"
"local network"
@@ -137,32 +137,32 @@ msgstr ""
"在您的區域網路中啟動\n"
"WiVRn 伺服器"
-#: client/scenes/lobby_gui.cpp:489
+#: client/scenes/lobby_gui.cpp:490
msgid "Autoconnect"
msgstr "自動連線"
-#: client/scenes/lobby_gui.cpp:515
+#: client/scenes/lobby_gui.cpp:516
msgid "Connect"
msgstr "連線"
-#: client/scenes/lobby_gui.cpp:525
+#: client/scenes/lobby_gui.cpp:526 client/wivrn_client.cpp:186
msgid "Incompatible server version"
msgstr "伺服器版本不相容"
-#: client/scenes/lobby_gui.cpp:527
+#: client/scenes/lobby_gui.cpp:528
msgid "Server not available"
msgstr "無法使用伺服器"
-#: client/scenes/lobby_gui.cpp:613
+#: client/scenes/lobby_gui.cpp:614
msgid "Refresh rate"
msgstr "刷新率"
-#: client/scenes/lobby_gui.cpp:613 client/scenes/lobby_gui.cpp:615
+#: client/scenes/lobby_gui.cpp:614 client/scenes/lobby_gui.cpp:616
msgctxt "automatic refresh rate"
msgid "Automatic"
msgstr "自動"
-#: client/scenes/lobby_gui.cpp:622
+#: client/scenes/lobby_gui.cpp:623
msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
@@ -170,92 +170,131 @@ msgstr ""
"根據測量的應用程式效能選擇刷新率。\n"
"變更時可能會造成閃爍。"
-#: client/scenes/lobby_gui.cpp:639
+#: client/scenes/lobby_gui.cpp:640
msgid "Minimum refresh rate"
msgstr "最低刷新率"
-#: client/scenes/lobby_gui.cpp:662
+#: client/scenes/lobby_gui.cpp:663
msgid "Resolution scale"
msgstr "解析度縮放比例"
-#: client/scenes/lobby_gui.cpp:666 client/scenes/lobby_gui.cpp:915
+#: client/scenes/lobby_gui.cpp:667 client/scenes/lobby_gui.cpp:971
#, c-format, c++-format
msgid "%d%% - {}x{} per eye"
-msgstr "%d%% - 每眼 {}x{}"
+msgstr "%d%% - 單眼 {}x{}"
-#: client/scenes/lobby_gui.cpp:677 client/scenes/lobby_gui.cpp:926
+#: client/scenes/lobby_gui.cpp:678 client/scenes/lobby_gui.cpp:982
#, c++-format
msgid "Resolution larger than {}x{} may not be supported by the headset"
msgstr "解析度高於 {}x{} 可能不被頭戴式裝置支援"
-#: client/scenes/lobby_gui.cpp:683
+#: client/scenes/lobby_gui.cpp:684
msgid "Enable microphone"
msgstr "啟用麥克風"
-#: client/scenes/lobby_gui.cpp:693
+#: client/scenes/lobby_gui.cpp:694
msgid "Unprocessed Microphone Audio"
msgstr "未處理的麥克風音訊"
-#: client/scenes/lobby_gui.cpp:699
+#: client/scenes/lobby_gui.cpp:700
msgid "Force disable audio filters, such as noise cancellation"
msgstr "強制停用音訊濾波器,例如降噪"
-#: client/scenes/lobby_gui.cpp:706
+#: client/scenes/lobby_gui.cpp:707
msgid "Enable hand tracking"
msgstr "啟用手部追蹤"
-#: client/scenes/lobby_gui.cpp:713 client/scenes/lobby_gui.cpp:726
-#: client/scenes/lobby_gui.cpp:739 client/scenes/lobby_gui.cpp:751
+#: client/scenes/lobby_gui.cpp:714 client/scenes/lobby_gui.cpp:727
+#: client/scenes/lobby_gui.cpp:740 client/scenes/lobby_gui.cpp:757
+#: client/scenes/lobby_gui.cpp:807
msgid "This feature is not supported by your headset"
msgstr "您的頭戴式裝置不支援此功能"
-#: client/scenes/lobby_gui.cpp:719
+#: client/scenes/lobby_gui.cpp:720
msgid "Enable eye tracking"
msgstr "啟用眼球追蹤"
-#: client/scenes/lobby_gui.cpp:732
+#: client/scenes/lobby_gui.cpp:733
msgid "Enable face tracking"
msgstr "啟用臉部追蹤"
-#: client/scenes/lobby_gui.cpp:744
+#: client/scenes/lobby_gui.cpp:747
+msgid "Enable body tracking"
+msgstr "啟用身體追蹤"
+
+#: client/scenes/lobby_gui.cpp:764
+msgid ""
+"Requires 'Hand and body tracking' to be enabled in the Quest movement "
+"tracking settings,\n"
+"otherwise body data will be guessed from controller and headset positions"
+msgstr ""
+"需要在 Quest 移動追蹤設定中啟用「手部和身體追蹤」,\n"
+"否則身體資料將根據控制器和頭戴式裝置的位置進行猜測"
+
+#: client/scenes/lobby_gui.cpp:777
+msgid "Enable lower body tracking"
+msgstr "啟用下半身追蹤"
+
+#: client/scenes/lobby_gui.cpp:783
+msgid ""
+"Estimate lower body joint positions using Generative Legs\n"
+"Requires 'Hand and body tracking' to be enabled in the Quest movement "
+"tracking settings"
+msgstr ""
+"使用 Generative Legs 預估下半身關節位置\n"
+"需要在 Quest 移動追蹤設定中啟用「手部和身體追蹤」"
+
+#: client/scenes/lobby_gui.cpp:786
+msgid "Enable hip tracking"
+msgstr "啟用臀部追蹤"
+
+#: client/scenes/lobby_gui.cpp:792
+msgid ""
+"Only takes affect with lower body tracking enabled\n"
+"May be desired when using another source of hip tracking"
+msgstr ""
+"僅在啟用下半身追蹤時生效\n"
+"在使用其他臀部追蹤時可能需要此功能"
+
+#: client/scenes/lobby_gui.cpp:800
msgid "Enable video passthrough in lobby"
msgstr "在待機區啟用影像穿透 (Passthrough)"
-#: client/scenes/lobby_gui.cpp:754
+#: client/scenes/lobby_gui.cpp:810
msgid "Show performance metrics"
msgstr "顯示效能指標"
-#: client/scenes/lobby_gui.cpp:758
+#: client/scenes/lobby_gui.cpp:814
msgid "Overlay can be toggled by pressing both thumbsticks"
msgstr "同時按下兩個拇指搖桿可以切換覆蓋層"
-#: client/scenes/lobby_gui.cpp:788 client/scenes/lobby_gui.cpp:796
+#: client/scenes/lobby_gui.cpp:844 client/scenes/lobby_gui.cpp:852
#: client/scenes/stream_stats.cpp:159
msgid "CPU time"
msgstr "CPU 時間"
-#: client/scenes/lobby_gui.cpp:792
+#: client/scenes/lobby_gui.cpp:848
msgid "CPU time [ms]"
msgstr "CPU 時間 [ms]"
-#: client/scenes/lobby_gui.cpp:802 client/scenes/lobby_gui.cpp:810
+#: client/scenes/lobby_gui.cpp:858 client/scenes/lobby_gui.cpp:866
#: client/scenes/stream_stats.cpp:161
msgid "GPU time"
msgstr "GPU 時間"
-#: client/scenes/lobby_gui.cpp:806
+#: client/scenes/lobby_gui.cpp:862
msgid "GPU time [ms]"
msgstr "GPU 時間 [ms]"
-#: client/scenes/lobby_gui.cpp:825
+#: client/scenes/lobby_gui.cpp:881
msgid "OpenXR post-processing"
msgstr "OpenXR 後期處理"
-#: client/scenes/lobby_gui.cpp:829
+#: client/scenes/lobby_gui.cpp:885
msgid "Supersampling"
msgstr "超取樣"
-#: client/scenes/lobby_gui.cpp:849
+#: client/scenes/lobby_gui.cpp:905
msgid ""
"Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display"
@@ -263,11 +302,11 @@ msgstr ""
"減少高對比邊緣的閃爍。\n"
"當輸入解析度對於頭戴式顯示器來說很高時很有用"
-#: client/scenes/lobby_gui.cpp:854
+#: client/scenes/lobby_gui.cpp:910
msgid "Sharpening"
msgstr "銳利化"
-#: client/scenes/lobby_gui.cpp:874
+#: client/scenes/lobby_gui.cpp:930
msgid ""
"Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display"
@@ -275,11 +314,11 @@ msgstr ""
"改善高對比邊緣的清晰度並抵消模糊。\n"
"當輸入解析度對於頭戴式顯示器來說較低時很有用"
-#: client/scenes/lobby_gui.cpp:883
+#: client/scenes/lobby_gui.cpp:939
msgid "Enable Snapdragon Game Super Resolution"
msgstr "啟用 Snapdragon 遊戲超級解析度"
-#: client/scenes/lobby_gui.cpp:891
+#: client/scenes/lobby_gui.cpp:947
msgid ""
"On this headset, this setting has been fully superseded by the native "
"Sharpening setting above.\n"
@@ -288,101 +327,109 @@ msgstr ""
"在此頭戴式顯示器上,此設定已被上方的原生「銳利化」設定完全取代。\n"
"僅在您了解自己在做什麼時啟用。"
-#: client/scenes/lobby_gui.cpp:893
+#: client/scenes/lobby_gui.cpp:949
msgid ""
"Client-side upscaling and sharpening, adds a performance cost on the headset"
-msgstr "用戶端向上取樣和銳利化,會消耗頭戴式顯示器的效能"
+msgstr "用戶端向上取樣和銳利化,會增加頭戴式顯示器的效能負擔"
-#: client/scenes/lobby_gui.cpp:911
+#: client/scenes/lobby_gui.cpp:967
msgid "Upscaling factor"
msgstr "向上取樣係數"
-#: client/scenes/lobby_gui.cpp:930
+#: client/scenes/lobby_gui.cpp:986
msgid "Use edge direction"
msgstr "使用邊緣方向"
-#: client/scenes/lobby_gui.cpp:936
+#: client/scenes/lobby_gui.cpp:992
msgid "Adds an additional performance cost"
-msgstr "消耗額外的效能"
+msgstr "會增加額外的效能負擔"
-#: client/scenes/lobby_gui.cpp:941
+#: client/scenes/lobby_gui.cpp:997
msgid "Edge threshold"
msgstr "邊緣閾值"
-#: client/scenes/lobby_gui.cpp:948 client/scenes/lobby_gui.cpp:957
+#: client/scenes/lobby_gui.cpp:1004 client/scenes/lobby_gui.cpp:1013
#, c++-format
msgid "Recommended: {:.1f}"
msgstr "推薦:{:.1f}"
-#: client/scenes/lobby_gui.cpp:951
+#: client/scenes/lobby_gui.cpp:1007
msgid "Edge sharpness"
msgstr "邊緣銳利度"
-#: client/scenes/lobby_gui.cpp:1045 client/scenes/lobby_gui.cpp:1691
+#: client/scenes/lobby_gui.cpp:1101 client/scenes/lobby_gui.cpp:1757
msgid "Licenses"
msgstr "授權資訊"
-#: client/scenes/lobby_gui.cpp:1384
+#: client/scenes/lobby_gui.cpp:1440
msgid "Microphone is enabled"
msgstr "麥克風已啟用"
-#: client/scenes/lobby_gui.cpp:1385
+#: client/scenes/lobby_gui.cpp:1441
msgid "Microphone is disabled"
msgstr "麥克風已停用"
-#: client/scenes/lobby_gui.cpp:1394
+#: client/scenes/lobby_gui.cpp:1450
msgid "Hand tracking is enabled"
msgstr "手部追蹤已啟用"
-#: client/scenes/lobby_gui.cpp:1395
+#: client/scenes/lobby_gui.cpp:1451
msgid "Hand tracking is disabled"
msgstr "手部追蹤已停用"
-#: client/scenes/lobby_gui.cpp:1404
+#: client/scenes/lobby_gui.cpp:1460
msgid "Eye tracking is enabled"
msgstr "眼球追蹤已啟用"
-#: client/scenes/lobby_gui.cpp:1405
+#: client/scenes/lobby_gui.cpp:1461
msgid "Eye tracking is disabled"
msgstr "眼球追蹤已停用"
-#: client/scenes/lobby_gui.cpp:1415 client/scenes/lobby_gui.cpp:1426
+#: client/scenes/lobby_gui.cpp:1471 client/scenes/lobby_gui.cpp:1482
msgid "Face tracking is enabled"
msgstr "臉部追蹤已啟用"
-#: client/scenes/lobby_gui.cpp:1416 client/scenes/lobby_gui.cpp:1427
+#: client/scenes/lobby_gui.cpp:1472 client/scenes/lobby_gui.cpp:1483
msgid "Face tracking is disabled"
msgstr "臉部追蹤已停用"
-#: client/scenes/lobby_gui.cpp:1444
+#: client/scenes/lobby_gui.cpp:1493
+msgid "Body tracking is enabled"
+msgstr "身體追蹤已啟用"
+
+#: client/scenes/lobby_gui.cpp:1494
+msgid "Body tracking is disabled"
+msgstr "身體追蹤已停用"
+
+#: client/scenes/lobby_gui.cpp:1510
msgid "Add server"
msgstr "新增伺服器"
-#: client/scenes/lobby_gui.cpp:1673
+#: client/scenes/lobby_gui.cpp:1739
msgid "Server list"
msgstr "伺服器列表"
-#: client/scenes/lobby_gui.cpp:1676
+#: client/scenes/lobby_gui.cpp:1742
msgid "Settings"
msgstr "設定"
-#: client/scenes/lobby_gui.cpp:1679
+#: client/scenes/lobby_gui.cpp:1745
msgid "Post-processing"
msgstr "後期處理"
-#: client/scenes/lobby_gui.cpp:1683
+#: client/scenes/lobby_gui.cpp:1749
msgid "Debug"
msgstr "偵錯"
-#: client/scenes/lobby_gui.cpp:1688
+#: client/scenes/lobby_gui.cpp:1754
msgid "About"
msgstr "關於"
-#: client/scenes/lobby_gui.cpp:1694
+#: client/scenes/lobby_gui.cpp:1760
msgid "Exit"
msgstr "離開"
-#: client/scenes/lobby_gui.cpp:1708
+#: client/scenes/lobby_gui.cpp:1774
msgid ""
"Press A or X or put your palm up\n"
"to move the main window"
@@ -390,7 +437,7 @@ msgstr ""
"按下 A 或 X 鍵,或將手掌向上\n"
"即可移動主視窗"
-#: client/scenes/lobby_gui.cpp:1710
+#: client/scenes/lobby_gui.cpp:1776
msgid "Press A or X to move the main window"
msgstr "按下 A 或 X 鍵即可移動主視窗"
@@ -456,21 +503,18 @@ msgstr "已預測"
msgid "Estimated motion to photons latency: {}ms"
msgstr "估計運動到光子的延遲: {}毫秒"
-#: client/wivrn_client.cpp:97 client/wivrn_client.cpp:196
+#: client/wivrn_client.cpp:98 client/wivrn_client.cpp:202
msgid "Timeout"
msgstr "逾時"
-#: client/wivrn_client.cpp:147
+#: client/wivrn_client.cpp:149
msgid "Incorrect PIN"
msgstr "PIN 碼錯誤"
-#: client/wivrn_client.cpp:151
+#: client/wivrn_client.cpp:153
msgid "Unable to check PIN"
msgstr "無法驗證 PIN 碼"
-#: client/wivrn_client.cpp:180
+#: client/wivrn_client.cpp:182
msgid "Pairing is disabled on server"
msgstr "伺服器上已停用配對"
-
-#~ msgid "No preference"
-#~ msgstr "無偏好"
From 8ddc6355f2d7dfbcbb033febff44ce68e5d54cba Mon Sep 17 00:00:00 2001
From: mitsuami-megane <173323057+mitsuami-megane@users.noreply.github.com>
Date: Mon, 23 Jun 2025 18:06:54 +0900
Subject: [PATCH 005/135] Rephrase sentence in ja locale
---
locale/ja/wivrn-dashboard.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/locale/ja/wivrn-dashboard.po b/locale/ja/wivrn-dashboard.po
index d131cf46..c37d09e4 100644
--- a/locale/ja/wivrn-dashboard.po
+++ b/locale/ja/wivrn-dashboard.po
@@ -753,7 +753,7 @@ msgid ""
"You can either install it from the Meta store or directly over USB."
msgstr ""
"WiVRnを使用するには、HMDにアプリをインストール必要があります。\n"
-"Metaストアからインストールするとも、USBで直接インストールすることもできます。"
+"Metaストアからインストールや、USBで直接インストールすることもできます。"
#: dashboard/qml/WizardPage.qml:148
#, kde-format
From 95ab427517014e4d475ca065f47b5a794718268c Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Mon, 23 Jun 2025 12:59:36 +0200
Subject: [PATCH 006/135] Fix system bus -> session bus
---
server/start_application.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/start_application.cpp b/server/start_application.cpp
index e23f0c82..87e1c58b 100644
--- a/server/start_application.cpp
+++ b/server/start_application.cpp
@@ -39,7 +39,7 @@ static int get_service_pid(const std::string & service_name, pid_t & pid)
ret = sd_bus_open_user(&bus);
if (ret < 0)
{
- std::cerr << "Failed to connect to system bus: " << strerror(-ret) << std::endl;
+ std::cerr << "Failed to connect to session bus: " << strerror(-ret) << std::endl;
return ret;
}
@@ -88,11 +88,11 @@ int start_service(const std::string & service_name)
int ret = 0;
- // Connect to the system bus
+ // Connect to the session bus
ret = sd_bus_open_user(&bus);
if (ret < 0)
{
- std::cerr << "Failed to connect to system bus: " << strerror(-ret) << std::endl;
+ std::cerr << "Failed to connect to session bus: " << strerror(-ret) << std::endl;
return ret;
}
@@ -124,11 +124,11 @@ bool is_service_active(const std::string & service_name)
bool is_active = false;
int ret = 0;
- // Connect to the system bus
+ // Connect to the session bus
ret = sd_bus_open_user(&bus);
if (ret < 0)
{
- std::cerr << "Failed to connect to system bus: " << strerror(-ret) << std::endl;
+ std::cerr << "Failed to connect to session bus: " << strerror(-ret) << std::endl;
return false;
}
From b9752276b7585c16c80094b9a024ddb5b6be92f9 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Mon, 23 Jun 2025 18:19:46 +0200
Subject: [PATCH 007/135] read DBUS env variables for --systemd mode
---
server/main.cpp | 13 ++++-
server/start_application.cpp | 99 +++++++++++++++++++++---------------
2 files changed, 68 insertions(+), 44 deletions(-)
diff --git a/server/main.cpp b/server/main.cpp
index f48a9b0e..98108a81 100644
--- a/server/main.cpp
+++ b/server/main.cpp
@@ -246,7 +246,7 @@ void start_app()
assert(app_watch == 0);
assert(app_kill_watch == 0);
- if (app_pid)
+ if (app_pid > 0)
{
app_watch = g_child_watch_add(app_pid, [](pid_t, int status, void *) {
display_child_status(status, "Application");
@@ -262,6 +262,8 @@ void start_app()
else
{
app_watch = 0;
+ if (app_pid < 0)
+ throw std::system_error(-app_pid, std::system_category());
}
}
@@ -478,7 +480,14 @@ gboolean headset_connected_success(void *)
expose_known_keys_on_dbus();
start_server(configuration::read_user_configuration());
- start_app();
+ try
+ {
+ start_app();
+ }
+ catch (std::exception & e)
+ {
+ std::cerr << "Failed to start application: " << e.what();
+ }
delay_next_try = default_delay_next_try;
diff --git a/server/start_application.cpp b/server/start_application.cpp
index 87e1c58b..a2e4aebf 100644
--- a/server/start_application.cpp
+++ b/server/start_application.cpp
@@ -23,9 +23,56 @@
#include
#include
-static int get_service_pid(const std::string & service_name, pid_t & pid)
+namespace
+{
+
+struct deleter
+{
+ void operator()(sd_bus * p)
+ {
+ sd_bus_unref(p);
+ }
+ void operator()(sd_bus_message * p)
+ {
+ sd_bus_message_unref(p);
+ }
+};
+
+using sd_bus_ptr = std::unique_ptr;
+
+sd_bus_ptr get_user_bus()
{
sd_bus * bus = nullptr;
+ int ret;
+ // reimplement sd_bus_open_user to honor the env variable
+ if (const char * bus_address = getenv("DBUS_SESSION_BUS_ADDRESS"))
+ {
+ if (ret = sd_bus_new(&bus); ret < 0)
+ throw std::system_error(-ret, std::system_category(), "failed to create dbus object");
+ sd_bus_ptr res(bus);
+
+ if (ret = sd_bus_set_address(bus, bus_address); ret < 0)
+ throw std::system_error(-ret, std::system_category(), std::string("failed to connect to dbus at address ") + bus_address);
+
+ if (ret = sd_bus_set_bus_client(bus, 1); ret < 0)
+ throw std::system_error(-ret, std::system_category(), std::string("failed to configure dbus at address ") + bus_address);
+ if (ret = sd_bus_set_trusted(bus, 1); ret < 0)
+ throw std::system_error(-ret, std::system_category(), std::string("failed to trust dbus at address ") + bus_address);
+
+ if (ret = sd_bus_start(bus); ret < 0)
+ throw std::system_error(-ret, std::system_category(), std::string("failed to start dbus connection ") + bus_address);
+
+ return res;
+ }
+ if (ret = sd_bus_open_user(&bus); ret < 0)
+ throw std::system_error(-ret, std::system_category(), "failed to connect to dbus");
+
+ return sd_bus_ptr(bus);
+}
+} // namespace
+
+static int get_service_pid(sd_bus * bus, const std::string & service_name, pid_t & pid)
+{
sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus_message * msg = nullptr;
const char * destination = "org.freedesktop.systemd1";
@@ -35,14 +82,6 @@ static int get_service_pid(const std::string & service_name, pid_t & pid)
int ret = 0;
- // Connect to the session bus
- ret = sd_bus_open_user(&bus);
- if (ret < 0)
- {
- std::cerr << "Failed to connect to session bus: " << strerror(-ret) << std::endl;
- return ret;
- }
-
// Call the method
ret = sd_bus_call_method(bus, destination, path, interface, member, &error, &msg, "s", service_name.c_str());
if (ret < 0)
@@ -71,13 +110,11 @@ static int get_service_pid(const std::string & service_name, pid_t & pid)
finish:
sd_bus_error_free(&error);
sd_bus_message_unref(msg);
- sd_bus_unref(bus);
return ret;
}
-int start_service(const std::string & service_name)
+int start_service(sd_bus * bus, const std::string & service_name)
{
- sd_bus * bus = nullptr;
sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus_message * msg = nullptr;
const char * destination = "org.freedesktop.systemd1";
@@ -86,18 +123,8 @@ int start_service(const std::string & service_name)
const char * member = "StartUnit";
const char * mode = "replace";
- int ret = 0;
-
- // Connect to the session bus
- ret = sd_bus_open_user(&bus);
- if (ret < 0)
- {
- std::cerr << "Failed to connect to session bus: " << strerror(-ret) << std::endl;
- return ret;
- }
-
// Call the method to start the service
- ret = sd_bus_call_method(bus, destination, path, interface, member, &error, &msg, "ss", service_name.c_str(), mode);
+ int ret = sd_bus_call_method(bus, destination, path, interface, member, &error, &msg, "ss", service_name.c_str(), mode);
if (ret < 0)
{
std::cerr << "Failed to start service: " << error.message << std::endl;
@@ -107,13 +134,11 @@ int start_service(const std::string & service_name)
finish:
sd_bus_error_free(&error);
sd_bus_message_unref(msg);
- sd_bus_unref(bus);
return ret;
}
-bool is_service_active(const std::string & service_name)
+bool is_service_active(sd_bus * bus, const std::string & service_name)
{
- sd_bus * bus = nullptr;
sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus_message * msg = nullptr;
const char * destination = "org.freedesktop.systemd1";
@@ -122,19 +147,9 @@ bool is_service_active(const std::string & service_name)
const char * member = "GetUnit";
bool is_active = false;
- int ret = 0;
-
- // Connect to the session bus
- ret = sd_bus_open_user(&bus);
- if (ret < 0)
- {
- std::cerr << "Failed to connect to session bus: " << strerror(-ret) << std::endl;
- return false;
- }
-
const char * object_path;
// Call the method
- ret = sd_bus_call_method(bus, destination, path, interface, member, &error, &msg, "s", service_name.c_str());
+ int ret = sd_bus_call_method(bus, destination, path, interface, member, &error, &msg, "s", service_name.c_str());
if (ret < 0)
{
std::cerr << "Failed to issue method call: " << error.message << std::endl;
@@ -163,7 +178,6 @@ bool is_service_active(const std::string & service_name)
finish:
sd_bus_error_free(&error);
sd_bus_message_unref(msg);
- sd_bus_unref(bus);
return is_active;
}
@@ -171,11 +185,12 @@ pid_t wivrn::start_unit_file()
{
std::string service_name = "wivrn-application.service";
pid_t pid;
- int ret = get_service_pid(service_name, pid);
+ auto bus = get_user_bus();
+ int ret = get_service_pid(bus.get(), service_name, pid);
if (ret < 0 || pid == 0)
{
- ret = start_service(service_name);
+ ret = start_service(bus.get(), service_name);
if (ret < 0)
{
std::cerr << "Failed to start service " << service_name << std::endl;
@@ -183,13 +198,13 @@ pid_t wivrn::start_unit_file()
}
// Wait until the service is active
- while (!is_service_active(service_name))
+ while (!is_service_active(bus.get(), service_name))
{
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
// Try to get the PID again
- ret = get_service_pid(service_name, pid);
+ ret = get_service_pid(bus.get(), service_name, pid);
if (ret < 0)
{
std::cerr << "Failed to get PID for service " << service_name << std::endl;
From 6e8af7bb9a97d24bbb0ce7e0b238cc02d9da994f Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 24 Jun 2025 10:03:03 +0200
Subject: [PATCH 008/135] Fix absolute manifest build instructions
---
docs/building.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/building.md b/docs/building.md
index d5f0caf7..199ddbc6 100644
--- a/docs/building.md
+++ b/docs/building.md
@@ -41,7 +41,7 @@ Systemd service and pretty hostname support
-DWIVRN_USE_SYSTEMD=ON
```
-Additionally, if your environment requires absolute paths inside the OpenXR runtime manifest, you can add `-DWIVRN_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH=ON` to the build configuration.
+Additionally, if your environment requires absolute paths inside the OpenXR runtime manifest, you can add `-DWIVRN_OPENXR_MANIFEST_TYPE=absolute` to the build configuration.
# Dashboard
From 2ef30ce778185d58a6d0f2c8be0f5663dc8f8660 Mon Sep 17 00:00:00 2001
From: LuckShiba
Date: Fri, 20 Jun 2025 20:05:55 -0300
Subject: [PATCH 009/135] Update pt_BR locale
---
locale/pt_BR/wivrn-dashboard.po | 180 +++++++++++++---------
locale/pt_BR/wivrn.po | 262 +++++++++++++++++++-------------
2 files changed, 269 insertions(+), 173 deletions(-)
diff --git a/locale/pt_BR/wivrn-dashboard.po b/locale/pt_BR/wivrn-dashboard.po
index d2c21312..cde685ba 100644
--- a/locale/pt_BR/wivrn-dashboard.po
+++ b/locale/pt_BR/wivrn-dashboard.po
@@ -2,20 +2,22 @@
# This file is distributed under the same license as the WiVRn-dashboard package.
#
# SPDX-FileCopyrightText: 2025 Claudio Sampaio (Patola)
+# LuckShiba , 2025.
+#
msgid ""
msgstr ""
"Project-Id-Version: WiVRn-dashboard\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-04-29 19:40+0200\n"
-"PO-Revision-Date: 2025-05-05 21:15+0200\n"
-"Last-Translator: Claudio Sampaio (Patola) \n"
-"Language-Team: Portuguese <>\n"
+"POT-Creation-Date: 2025-06-20 19:23-0300\n"
+"PO-Revision-Date: 2025-06-20 19:59-0300\n"
+"Last-Translator: LuckShiba \n"
+"Language-Team: Brazilian Portuguese\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Lokalize 25.04.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Gtranslator 48.0\n"
#: dashboard/apk_installer.cpp:167
#, kde-format
@@ -35,7 +37,7 @@ msgstr "Download cancelado"
#: dashboard/apk_installer.cpp:194
#, kde-format
msgid "Cannot download APK: %1"
-msgstr "Incapaz de baixar o APK: %1"
+msgstr "Não é possível baixar o APK: %1"
#: dashboard/apk_installer.cpp:217
#, kde-format
@@ -45,7 +47,7 @@ msgstr "Instalando APK"
#: dashboard/apk_installer.cpp:221
#, kde-format
msgid "adb failed to start: %1"
-msgstr "adb incapaz de iniciar: %1"
+msgstr "O adb não conseguiu iniciar: %1"
#: dashboard/apk_installer.cpp:231
#, kde-format
@@ -60,7 +62,7 @@ msgstr "O comando 'adb install' falhou: código de saída %1"
#: dashboard/apk_installer.cpp:244
#, kde-format
msgid "Installation successful"
-msgstr "Instalação com sucesso"
+msgstr "Instalação bem-sucedida"
#: dashboard/main.cpp:27 dashboard/qml/Main.qml:12
#, kde-format
@@ -106,8 +108,8 @@ msgstr ""
"docs/building.md#client-headset\">documentação para construir seu "
"próprio cliente."
-#: dashboard/qml/ApkInstallPage.qml:65 dashboard/qml/HeadsetStatsPage.qml:36
-#: dashboard/qml/HeadsetsPage.qml:183 dashboard/qml/TroubleshootPage.qml:59
+#: dashboard/qml/ApkInstallPage.qml:65 dashboard/qml/HeadsetsPage.qml:183
+#: dashboard/qml/HeadsetStatsPage.qml:36 dashboard/qml/TroubleshootPage.qml:59
#, kde-format
msgctxt "go back to the home page"
msgid "Back"
@@ -133,11 +135,6 @@ msgstr "Reinstalar WiVRn"
msgid "Install WiVRn"
msgstr "Instalar WiVRn"
-#: dashboard/qml/HeadsetStatsPage.qml:12
-#, kde-format
-msgid "Headset statistics"
-msgstr "Estatísticas do headset"
-
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:342
#, kde-format
msgid "Headsets"
@@ -183,7 +180,7 @@ msgstr "Renomear"
#: dashboard/qml/HeadsetsPage.qml:55 dashboard/qml/WizardPage.qml:38
#: dashboard/qml/WizardPage.qml:88 dashboard/qml/WizardPage.qml:263
-#: dashboard/qml/WizardPage.qml:312 dashboard/qml/WizardPage.qml:396
+#: dashboard/qml/WizardPage.qml:326 dashboard/qml/WizardPage.qml:410
#, kde-format
msgid "Cancel"
msgstr "Cancelar"
@@ -201,12 +198,12 @@ msgstr "Remover"
#: dashboard/qml/HeadsetsPage.qml:143
#, kde-format
msgid "Pairing enabled, PIN: %1"
-msgstr "Pareamento habilitado, PIN: %1"
+msgstr "Pareamento ativado, PIN: %1"
#: dashboard/qml/HeadsetsPage.qml:148 dashboard/qml/TroubleshootPage.qml:42
#, kde-format
msgid "Disable pairing"
-msgstr "Desabilitar pareamento"
+msgstr "Desativar pareamento"
#: dashboard/qml/HeadsetsPage.qml:166
#, kde-format
@@ -217,18 +214,23 @@ msgstr "Inicie a aplicação WiVRn no seu headset e use o PIN: %1"
#, kde-format
msgid "Enable pairing to allow your headset to connect to this computer"
msgstr ""
-"Habilite pareamento para permitir ao seu headset conectar a esse computador"
+"Ative o pareamento para permitir que seu headset conecte-se a esse computador"
#: dashboard/qml/HeadsetsPage.qml:171 dashboard/qml/TroubleshootPage.qml:37
#, kde-format
msgid "Enable pairing"
-msgstr "Habilitar pareamento"
+msgstr "Ativar pareamento"
#: dashboard/qml/HeadsetsPage.qml:191
#, kde-format
msgid "Pair a new headset"
msgstr "Parear um novo headset"
+#: dashboard/qml/HeadsetStatsPage.qml:12
+#, kde-format
+msgid "Headset statistics"
+msgstr "Estatísticas do headset"
+
#: dashboard/qml/Main.qml:103
#, kde-format
msgid "The server does not have CAP_SYS_NICE capabilities."
@@ -298,7 +300,7 @@ msgstr "Pareando"
msgid "PIN: %1"
msgstr "PIN: %1"
-#: dashboard/qml/Main.qml:238 dashboard/qml/WizardPage.qml:359
+#: dashboard/qml/Main.qml:238 dashboard/qml/WizardPage.qml:373
#, kde-format
msgid "Connect by USB"
msgstr "Conectar pela USB"
@@ -444,19 +446,19 @@ msgstr "Manual"
#, kde-format
msgctxt "encoder preset"
msgid "Default preset"
-msgstr "Pré-ajuste default"
+msgstr "Predefinição padrão"
#: dashboard/qml/SettingsPage.qml:145
#, kde-format
msgctxt "encoder preset"
msgid "Low latency preset"
-msgstr "Pré-ajuste de baixa latência"
+msgstr "Predefinição de baixa latência"
#: dashboard/qml/SettingsPage.qml:170
#, kde-format
msgctxt "encoder preset"
msgid "Safe preset"
-msgstr "Pré-ajuste seguro"
+msgstr "Predefinição segura"
#: dashboard/qml/SettingsPage.qml:193
#, kde-format
@@ -530,54 +532,72 @@ msgstr "H.265"
msgid "AV1"
msgstr "AV1"
-#: dashboard/qml/SettingsPage.qml:323
+#: dashboard/qml/SettingsPage.qml:319
+#, kde-format
+msgid "Advanced options"
+msgstr "Opções avançadas"
+
+#: dashboard/qml/SettingsPage.qml:325
+#, kde-format
+msgid "Enable debug window"
+msgstr "Ativar janela de depuração"
+
+#: dashboard/qml/SettingsPage.qml:332
+#, kde-format
+msgid "Enable SteamVR tracked devices support"
+msgstr "Ativar suporte a dispositivos rastreados pelo SteamVR"
+
+#: dashboard/qml/SettingsPage.qml:335
+#, kde-format
+msgid ""
+"Allows the use of lighthouse-based controllers and trackers.\n"
+"Requires SteamVR to be installed.\n"
+"Devices must be be powered on before connecting to WiVRn.\n"
+"An external tool such as motoc is needed for calibration."
+msgstr ""
+"Permite o uso de controladores e rastreadores baseados em Lighthouse.\n"
+"Requer que o SteamVR esteja instalado.\n"
+"Os dispositivos precisam estar ligados antes de se conectar ao WiVRn.\n"
+"Uma ferramenta externa como o motoc é necessária para calibração."
+
+#: dashboard/qml/SettingsPage.qml:343
#, kde-format
msgid "Custom adb location"
msgstr "Caminho personalizado do adb"
-#: dashboard/qml/SettingsPage.qml:334
+#: dashboard/qml/SettingsPage.qml:354
#, kde-format
msgid "Adb location:"
msgstr "Caminho do adb:"
-#: dashboard/qml/SettingsPage.qml:343
+#: dashboard/qml/SettingsPage.qml:363
#, kde-format
msgctxt "browse a file to choose the adb binary"
msgid "Browse"
msgstr "Navegar"
-#: dashboard/qml/SettingsPage.qml:353
+#: dashboard/qml/SettingsPage.qml:373
#, kde-format
msgid "Default"
msgstr "Default"
-#: dashboard/qml/SettingsPage.qml:360
-#, kde-format
-msgid "xrizer"
-msgstr "xrizer"
-
-#: dashboard/qml/SettingsPage.qml:365
-#, kde-format
-msgid "Open Composite"
-msgstr "Open Composite"
-
-#: dashboard/qml/SettingsPage.qml:372
+#: dashboard/qml/SettingsPage.qml:387
#, kde-format
msgctxt "set a custom OpenVR compatibility library"
msgid "Custom"
msgstr "Personalizado"
-#: dashboard/qml/SettingsPage.qml:377
+#: dashboard/qml/SettingsPage.qml:392
#, kde-format
msgid "Disabled"
-msgstr "Desabilitado"
+msgstr "Desativado"
-#: dashboard/qml/SettingsPage.qml:385
+#: dashboard/qml/SettingsPage.qml:400
#, kde-format
msgid "OpenVR compatibility library:"
msgstr "Biblioteca de compatibilidade OpenVR:"
-#: dashboard/qml/SettingsPage.qml:411
+#: dashboard/qml/SettingsPage.qml:426
#, kde-format
msgid "Library path, excluding bin/linux64/vrclient.so"
msgstr "Caminho da biblioteca, excluindo bin/linux64/vrclient.so"
@@ -614,7 +634,7 @@ msgstr "Comando de lançamento da Steam copiado"
msgid "I cannot find the WiVRn app on my headset"
msgstr "Não consigo encontrar a aplicação WiVRn no meu headset"
-#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:373
+#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:387
#, kde-format
msgid ""
"If you installed WiVRn over USB on a Meta headset, the app is in the "
@@ -628,7 +648,7 @@ msgstr ""
msgid "I cannot see my computer in the WiVRn app"
msgstr "Não consigo ver meu computador na aplicação WiVRn"
-#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:378
+#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:392
#, kde-format
msgid ""
"If the server is not visible or the connection fails, check that port 5353 "
@@ -665,24 +685,24 @@ msgid ""
"another headset, you must enable pairing before connecting."
msgstr ""
"Se você reinstalou o servidor ou o cliente ou se você quer conectar outro "
-"headset, você deve habilitar o pareamento antes de conectar."
+"headset, você deve atviar o pareamento antes de conectar."
#: dashboard/qml/TroubleshootPage.qml:33
#, kde-format
msgid "Pairing is currently enabled with PIN %1."
-msgstr "Pareamento está atualmente habilitado com o PIN %1."
+msgstr "Pareamento está atualmente ativado com o PIN %1."
#: dashboard/qml/TroubleshootPage.qml:33
#, kde-format
msgid "Pairing is currently disabled."
-msgstr "Pareamento está atualmente desabilitado."
+msgstr "Pareamento está atualmente desativado."
#: dashboard/qml/TroubleshootPage.qml:49
#, kde-format
msgid "I have no sound on my headset"
msgstr "Eu não tenho som no meu headset"
-#: dashboard/qml/TroubleshootPage.qml:50 dashboard/qml/WizardPage.qml:426
+#: dashboard/qml/TroubleshootPage.qml:50 dashboard/qml/WizardPage.qml:440
#, kde-format
msgid ""
"When the headset is connected, select \"WiVRn\" as the default audio output "
@@ -707,9 +727,9 @@ msgid "Getting started"
msgstr "Começando"
#: dashboard/qml/WizardPage.qml:29 dashboard/qml/WizardPage.qml:78
-#: dashboard/qml/WizardPage.qml:253 dashboard/qml/WizardPage.qml:302
-#: dashboard/qml/WizardPage.qml:386 dashboard/qml/WizardPage.qml:433
-#: dashboard/qml/WizardPage.qml:470
+#: dashboard/qml/WizardPage.qml:253 dashboard/qml/WizardPage.qml:316
+#: dashboard/qml/WizardPage.qml:400 dashboard/qml/WizardPage.qml:447
+#: dashboard/qml/WizardPage.qml:484
#, kde-format
msgid "Back"
msgstr "Voltar"
@@ -729,8 +749,8 @@ msgstr ""
"ao seu computador."
#: dashboard/qml/WizardPage.qml:83 dashboard/qml/WizardPage.qml:258
-#: dashboard/qml/WizardPage.qml:307 dashboard/qml/WizardPage.qml:438
-#: dashboard/qml/WizardPage.qml:475
+#: dashboard/qml/WizardPage.qml:321 dashboard/qml/WizardPage.qml:452
+#: dashboard/qml/WizardPage.qml:489
#, kde-format
msgid "Next"
msgstr "Próximo"
@@ -738,7 +758,7 @@ msgstr "Próximo"
#: dashboard/qml/WizardPage.qml:112
#, kde-format
msgid "How to enable developper mode"
-msgstr "Como habilitar modo desenvolvedor"
+msgstr "Como habilitar o modo de desenvolvedor"
#: dashboard/qml/WizardPage.qml:119
#, kde-format
@@ -811,9 +831,9 @@ msgid ""
"
"
msgstr ""
-"Nenhum headset detectado. Se assegure que:\n"
+"
Nenhum headset detectado. Tenha certeza que:\n"
"
"
+"modo de desenvolvedor"
#: dashboard/qml/WizardPage.qml:280
#, kde-format
@@ -829,12 +849,26 @@ msgstr ""
"A aplicação que você escolher será iniciada automaticamente quando você "
"conectar seu headset."
-#: dashboard/qml/WizardPage.qml:344
+#: dashboard/qml/WizardPage.qml:300
+#, kde-format
+msgid "Important information"
+msgstr "Informação importante"
+
+#: dashboard/qml/WizardPage.qml:307
+#, kde-format
+msgid ""
+"WiVRn entirely replaces SteamVR, you should not start SteamVR while WiVRn is "
+"running."
+msgstr ""
+"O WiVRn substitui o SteamVR completamente, você não deve iniciar o SteamVR "
+"enquanto o WiVRn estiver rodando."
+
+#: dashboard/qml/WizardPage.qml:358
#, kde-format
msgid "Start the WiVRn app on your headset"
msgstr "Iniciar a aplicação WiVRn no seu headset"
-#: dashboard/qml/WizardPage.qml:349
+#: dashboard/qml/WizardPage.qml:363
#, kde-format
msgid ""
"To connect over WiFi, start the WiVRn app on your headset, connect to \"%1\" "
@@ -843,32 +877,32 @@ msgstr ""
"Para conectar pela WiFi, inicie a aplicação WiVRn no seu headset, conecte a "
"\"%1\" e entre o PIN \"%2\"."
-#: dashboard/qml/WizardPage.qml:356
+#: dashboard/qml/WizardPage.qml:370
#, kde-format
msgid "To connect over USB, click on \"Connect by USB\"."
msgstr "Para conectar pela USB, clique em \"Conectar pela USB\"."
-#: dashboard/qml/WizardPage.qml:369
+#: dashboard/qml/WizardPage.qml:383
#, kde-format
msgid "Troubleshooting"
msgstr "Resolver problemas"
-#: dashboard/qml/WizardPage.qml:391
+#: dashboard/qml/WizardPage.qml:405
#, kde-format
msgid "Skip"
msgstr "Pular"
-#: dashboard/qml/WizardPage.qml:411
+#: dashboard/qml/WizardPage.qml:425
#, kde-format
msgid "Connection established"
msgstr "Conexão estabelecida"
-#: dashboard/qml/WizardPage.qml:416
+#: dashboard/qml/WizardPage.qml:430
#, kde-format
msgid "Your headset is now connected."
msgstr "Seu headset está conectado agora."
-#: dashboard/qml/WizardPage.qml:421 dashboard/qml/WizardPage.qml:463
+#: dashboard/qml/WizardPage.qml:435 dashboard/qml/WizardPage.qml:477
#, kde-format
msgid ""
"To connect another headset, make sure pairing is enabled in the dashboard "
@@ -877,12 +911,22 @@ msgstr ""
"Para conectar outro headset, se assegure que o pareamento esteja habilitado "
"no painel antes de conectar."
-#: dashboard/qml/WizardPage.qml:443 dashboard/qml/WizardPage.qml:480
+#: dashboard/qml/WizardPage.qml:457 dashboard/qml/WizardPage.qml:494
#, kde-format
msgid "Finish"
msgstr "Terminar"
-#: dashboard/qml/WizardPage.qml:458
+#: dashboard/qml/WizardPage.qml:472
#, kde-format
msgid "Finished"
msgstr "Terminado"
+
+#: dashboard/wivrn_server.cpp:584
+#, kde-format
+msgid "xrizer"
+msgstr "xrizer"
+
+#: dashboard/wivrn_server.cpp:585
+#, kde-format
+msgid "Open Composite"
+msgstr "Open Composite"
diff --git a/locale/pt_BR/wivrn.po b/locale/pt_BR/wivrn.po
index 5f176a06..86b8ebe3 100644
--- a/locale/pt_BR/wivrn.po
+++ b/locale/pt_BR/wivrn.po
@@ -2,20 +2,22 @@
# This file is distributed under the same license as the WiVRn package.
#
# SPDX-FileCopyrightText: 2025 Claudio Sampaio (Patola)
+# LuckShiba , 2025.
+#
msgid ""
msgstr ""
"Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-04-15 12:06+0200\n"
-"PO-Revision-Date: 2025-04-19 20:27+0200\n"
-"Last-Translator: Claudio Sampaio (Patola) \n"
-"Language-Team: Portuguese <>\n"
+"POT-Creation-Date: 2025-06-20 19:23-0300\n"
+"PO-Revision-Date: 2025-06-20 19:44-0300\n"
+"Last-Translator: LuckShiba \n"
+"Language-Team: Brazilian Portuguese\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 24.12.3\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Gtranslator 48.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: client/scenes/lobby.cpp:148
msgid "No supported swapchain format"
@@ -44,30 +46,30 @@ msgstr "Incapaz de conectar a {} ({}): {}"
msgid "Waiting for connection"
msgstr "Aguardando conexão"
-#: client/scenes/lobby_gui.cpp:131
+#: client/scenes/lobby_gui.cpp:132
msgctxt "openxr_post_processing"
msgid "Normal"
msgstr "Normal"
-#: client/scenes/lobby_gui.cpp:134
+#: client/scenes/lobby_gui.cpp:135
msgctxt "openxr_post_processing"
msgid "Quality"
msgstr "Qualidade"
-#: client/scenes/lobby_gui.cpp:136
+#: client/scenes/lobby_gui.cpp:137
msgctxt "openxr_post_processing"
msgid "Disabled"
msgstr "Desabilitado"
-#: client/scenes/lobby_gui.cpp:197
+#: client/scenes/lobby_gui.cpp:198
msgid "Disconnect"
msgstr "Desconectar"
-#: client/scenes/lobby_gui.cpp:203
+#: client/scenes/lobby_gui.cpp:204
msgid "Video stream interrupted"
msgstr "Fluxo de vídeo interrompido"
-#: client/scenes/lobby_gui.cpp:205
+#: client/scenes/lobby_gui.cpp:206
msgid ""
"Connection ready\n"
"Start a VR application on your computer"
@@ -75,7 +77,7 @@ msgstr ""
"Conexão pronta\n"
"Inicie uma aplicação VR no seu computador"
-#: client/scenes/lobby_gui.cpp:207
+#: client/scenes/lobby_gui.cpp:208
#, c++-format
msgid ""
"Connection ready\n"
@@ -84,52 +86,52 @@ msgstr ""
"Conexão pronta\n"
"Inicie uma aplicação VR em {}"
-#: client/scenes/lobby_gui.cpp:220
+#: client/scenes/lobby_gui.cpp:221
msgid "Close"
msgstr "Fechar"
-#: client/scenes/lobby_gui.cpp:226
+#: client/scenes/lobby_gui.cpp:227
msgid "Connection"
msgstr "Conexão"
-#: client/scenes/lobby_gui.cpp:228
+#: client/scenes/lobby_gui.cpp:229
#, c++-format
msgid "Connection to {}"
msgstr "Conexão a {}"
-#: client/scenes/lobby_gui.cpp:258
+#: client/scenes/lobby_gui.cpp:259
msgid "PIN"
msgstr "PIN"
-#: client/scenes/lobby_gui.cpp:280
+#: client/scenes/lobby_gui.cpp:281
msgid "Input the PIN displayed on the dashboard"
msgstr "Entre o PIN mostrado no painel"
-#: client/scenes/lobby_gui.cpp:355
+#: client/scenes/lobby_gui.cpp:356
msgid "Name"
msgstr "Nome"
-#: client/scenes/lobby_gui.cpp:366
+#: client/scenes/lobby_gui.cpp:367
msgid "Address"
msgstr "Endereço"
-#: client/scenes/lobby_gui.cpp:375
+#: client/scenes/lobby_gui.cpp:376
msgid "Port"
msgstr "Porta"
-#: client/scenes/lobby_gui.cpp:383
+#: client/scenes/lobby_gui.cpp:384
msgid "TCP only"
msgstr "TCP somente"
-#: client/scenes/lobby_gui.cpp:390
+#: client/scenes/lobby_gui.cpp:391
msgid "Cancel"
msgstr "Cancelar"
-#: client/scenes/lobby_gui.cpp:404
+#: client/scenes/lobby_gui.cpp:405
msgid "Save"
msgstr "Salvar"
-#: client/scenes/lobby_gui.cpp:457
+#: client/scenes/lobby_gui.cpp:458
msgid ""
"Start a WiVRn server on your\n"
"local network"
@@ -137,32 +139,32 @@ msgstr ""
"Inicie um servidor WiVRn em sua\n"
"rede local"
-#: client/scenes/lobby_gui.cpp:489
+#: client/scenes/lobby_gui.cpp:490
msgid "Autoconnect"
msgstr "Autoconectar"
-#: client/scenes/lobby_gui.cpp:515
+#: client/scenes/lobby_gui.cpp:516
msgid "Connect"
msgstr "Conectar"
-#: client/scenes/lobby_gui.cpp:525
+#: client/scenes/lobby_gui.cpp:526 client/wivrn_client.cpp:186
msgid "Incompatible server version"
msgstr "Versão de servidor incompatível"
-#: client/scenes/lobby_gui.cpp:527
+#: client/scenes/lobby_gui.cpp:528
msgid "Server not available"
msgstr "Servidor não disponível"
-#: client/scenes/lobby_gui.cpp:613
+#: client/scenes/lobby_gui.cpp:614
msgid "Refresh rate"
msgstr "Taxa de atualização"
-#: client/scenes/lobby_gui.cpp:613 client/scenes/lobby_gui.cpp:615
+#: client/scenes/lobby_gui.cpp:614 client/scenes/lobby_gui.cpp:616
msgctxt "automatic refresh rate"
msgid "Automatic"
msgstr "Automático"
-#: client/scenes/lobby_gui.cpp:622
+#: client/scenes/lobby_gui.cpp:623
msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
@@ -170,93 +172,135 @@ msgstr ""
"Seleciona a taxa de atualização baseada no desempenho medido da aplicação.\n"
"Pode causar oscilações quando uma alteração ocorrer."
-#: client/scenes/lobby_gui.cpp:639
+#: client/scenes/lobby_gui.cpp:640
msgid "Minimum refresh rate"
msgstr "Taxa de atualização mínima"
-#: client/scenes/lobby_gui.cpp:662
+#: client/scenes/lobby_gui.cpp:663
msgid "Resolution scale"
msgstr "Escala de resolução"
-#: client/scenes/lobby_gui.cpp:666 client/scenes/lobby_gui.cpp:915
+#: client/scenes/lobby_gui.cpp:667 client/scenes/lobby_gui.cpp:971
#, c-format, c++-format
msgid "%d%% - {}x{} per eye"
msgstr "%d%% - {}x{} por olho"
-#: client/scenes/lobby_gui.cpp:677 client/scenes/lobby_gui.cpp:926
+#: client/scenes/lobby_gui.cpp:678 client/scenes/lobby_gui.cpp:982
#, c++-format
msgid "Resolution larger than {}x{} may not be supported by the headset"
msgstr "Resolução maior que {}x{} pode não ser suportada pelo headset"
-#: client/scenes/lobby_gui.cpp:683
+#: client/scenes/lobby_gui.cpp:684
msgid "Enable microphone"
-msgstr "Habilitar microfone"
+msgstr "Ativar microfone"
-#: client/scenes/lobby_gui.cpp:693
+#: client/scenes/lobby_gui.cpp:694
msgid "Unprocessed Microphone Audio"
msgstr "Áudio Não-processado de Microfone"
-#: client/scenes/lobby_gui.cpp:699
+#: client/scenes/lobby_gui.cpp:700
msgid "Force disable audio filters, such as noise cancellation"
msgstr ""
-"Força a desabilitação de filtros de áudio tais como cancelamento de ruído"
+"Força a desativação de filtros de áudio tais como cancelamento de ruído"
-#: client/scenes/lobby_gui.cpp:706
+#: client/scenes/lobby_gui.cpp:707
msgid "Enable hand tracking"
-msgstr "Habilitar rastreamento de mãos"
+msgstr "Ativar rastreamento de mãos"
-#: client/scenes/lobby_gui.cpp:713 client/scenes/lobby_gui.cpp:726
-#: client/scenes/lobby_gui.cpp:739 client/scenes/lobby_gui.cpp:751
+#: client/scenes/lobby_gui.cpp:714 client/scenes/lobby_gui.cpp:727
+#: client/scenes/lobby_gui.cpp:740 client/scenes/lobby_gui.cpp:757
+#: client/scenes/lobby_gui.cpp:807
msgid "This feature is not supported by your headset"
msgstr "Este recurso não é suportado pelo seu headset"
-#: client/scenes/lobby_gui.cpp:719
+#: client/scenes/lobby_gui.cpp:720
msgid "Enable eye tracking"
-msgstr "Habilitar rastreamento ocular"
+msgstr "Ativar rastreamento ocular"
-#: client/scenes/lobby_gui.cpp:732
+#: client/scenes/lobby_gui.cpp:733
msgid "Enable face tracking"
-msgstr "Habilitar rastreamento de face"
+msgstr "Ativar rastreamento facial"
-#: client/scenes/lobby_gui.cpp:744
+#: client/scenes/lobby_gui.cpp:747
+msgid "Enable body tracking"
+msgstr "Ativar rastreamento corporal"
+
+#: client/scenes/lobby_gui.cpp:764
+msgid ""
+"Requires 'Hand and body tracking' to be enabled in the Quest movement "
+"tracking settings,\n"
+"otherwise body data will be guessed from controller and headset positions"
+msgstr ""
+"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas "
+"configurações de Rastreamento de Movimento do Quest, caso contrário dados "
+"corporais serão estimados com base nas posições do controle e do headset."
+
+#: client/scenes/lobby_gui.cpp:777
+msgid "Enable lower body tracking"
+msgstr "Ativar rastreamento corporal inferior"
+
+#: client/scenes/lobby_gui.cpp:783
+msgid ""
+"Estimate lower body joint positions using Generative Legs\n"
+"Requires 'Hand and body tracking' to be enabled in the Quest movement "
+"tracking settings"
+msgstr ""
+"Estima as posições das articulações da parte inferior do corpo usando Pernas "
+"Gerativas\n"
+"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas "
+"configurações de Rastreamento de Movimento do Quest"
+
+#: client/scenes/lobby_gui.cpp:786
+msgid "Enable hip tracking"
+msgstr "Ativar rastreamento de quadril"
+
+#: client/scenes/lobby_gui.cpp:792
+msgid ""
+"Only takes affect with lower body tracking enabled\n"
+"May be desired when using another source of hip tracking"
+msgstr ""
+"Só tem efeito com o rastreamento corporal inferior ativado\n"
+"Pode ser desejado ao usar outra fonte de rastreamento de quadril"
+
+#: client/scenes/lobby_gui.cpp:800
msgid "Enable video passthrough in lobby"
msgstr "Habilitar repassagem de vídeo no lobby"
-#: client/scenes/lobby_gui.cpp:754
+#: client/scenes/lobby_gui.cpp:810
msgid "Show performance metrics"
msgstr "Mostrar métricas de desempenho"
-#: client/scenes/lobby_gui.cpp:758
+#: client/scenes/lobby_gui.cpp:814
msgid "Overlay can be toggled by pressing both thumbsticks"
msgstr "A sobreposição pode ser alternada pressionando ambos os joysticks"
-#: client/scenes/lobby_gui.cpp:788 client/scenes/lobby_gui.cpp:796
+#: client/scenes/lobby_gui.cpp:844 client/scenes/lobby_gui.cpp:852
#: client/scenes/stream_stats.cpp:159
msgid "CPU time"
msgstr "Tempo de CPU"
-#: client/scenes/lobby_gui.cpp:792
+#: client/scenes/lobby_gui.cpp:848
msgid "CPU time [ms]"
msgstr "Tempo de CPU [ms]"
-#: client/scenes/lobby_gui.cpp:802 client/scenes/lobby_gui.cpp:810
+#: client/scenes/lobby_gui.cpp:858 client/scenes/lobby_gui.cpp:866
#: client/scenes/stream_stats.cpp:161
msgid "GPU time"
msgstr "Tempo de GPU"
-#: client/scenes/lobby_gui.cpp:806
+#: client/scenes/lobby_gui.cpp:862
msgid "GPU time [ms]"
msgstr "Tempo de GPU [ms]"
-#: client/scenes/lobby_gui.cpp:825
+#: client/scenes/lobby_gui.cpp:881
msgid "OpenXR post-processing"
msgstr "Pós-processamento OpenXR"
-#: client/scenes/lobby_gui.cpp:829
+#: client/scenes/lobby_gui.cpp:885
msgid "Supersampling"
msgstr "Supersampling"
-#: client/scenes/lobby_gui.cpp:849
+#: client/scenes/lobby_gui.cpp:905
msgid ""
"Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display"
@@ -264,11 +308,11 @@ msgstr ""
"Reduz flicker para arestas de alto contraste.\n"
"Útil quando a resolução de entrada é alta comparada ao display do headset"
-#: client/scenes/lobby_gui.cpp:854
+#: client/scenes/lobby_gui.cpp:910
msgid "Sharpening"
msgstr "Aumento de nitidez"
-#: client/scenes/lobby_gui.cpp:874
+#: client/scenes/lobby_gui.cpp:930
msgid ""
"Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display"
@@ -276,117 +320,125 @@ msgstr ""
"Melhora a clareza de arestas de alto contraste e minimiza o desfoque.\n"
"Útil quando a resolução de entrada é baixa comparada ao display do headset"
-#: client/scenes/lobby_gui.cpp:883
+#: client/scenes/lobby_gui.cpp:939
msgid "Enable Snapdragon Game Super Resolution"
msgstr "Habilitar Snapdragon Game Super Resolution"
-#: client/scenes/lobby_gui.cpp:891
+#: client/scenes/lobby_gui.cpp:947
msgid ""
"On this headset, this setting has been fully superseded by the native "
"Sharpening setting above.\n"
"Only enable if you know what you're doing."
msgstr ""
-"Neste headset, este ajuste foi completamente supersedido pelo ajuste "
-"de aumento de nitidez acima.\n"
+"Neste headset, este ajuste foi completamente supersedido pelo ajuste de "
+"aumento de nitidez acima.\n"
"Somente habilite se souber o que está fazendo."
-#: client/scenes/lobby_gui.cpp:893
+#: client/scenes/lobby_gui.cpp:949
msgid ""
"Client-side upscaling and sharpening, adds a performance cost on the headset"
msgstr ""
-"Upscaling e aumento de nitidez do lado do cliente, acrescenta um custo de dese"
-"mpenho no headset"
+"Upscaling e aumento de nitidez do lado do cliente, acrescenta um custo de "
+"desempenho no headset"
-#: client/scenes/lobby_gui.cpp:911
+#: client/scenes/lobby_gui.cpp:967
msgid "Upscaling factor"
msgstr "Fator de upscaling"
-#: client/scenes/lobby_gui.cpp:930
+#: client/scenes/lobby_gui.cpp:986
msgid "Use edge direction"
msgstr "Usar direção da aresta"
-#: client/scenes/lobby_gui.cpp:936
+#: client/scenes/lobby_gui.cpp:992
msgid "Adds an additional performance cost"
msgstr "Acrescenta um custo de desempenho"
-#: client/scenes/lobby_gui.cpp:941
+#: client/scenes/lobby_gui.cpp:997
msgid "Edge threshold"
msgstr "Limite da aresta"
-#: client/scenes/lobby_gui.cpp:948 client/scenes/lobby_gui.cpp:957
+#: client/scenes/lobby_gui.cpp:1004 client/scenes/lobby_gui.cpp:1013
#, c++-format
msgid "Recommended: {:.1f}"
msgstr "Recomenadado: {:.1f}"
-#: client/scenes/lobby_gui.cpp:951
+#: client/scenes/lobby_gui.cpp:1007
msgid "Edge sharpness"
msgstr "Nitidez da aresta"
-#: client/scenes/lobby_gui.cpp:1045 client/scenes/lobby_gui.cpp:1691
+#: client/scenes/lobby_gui.cpp:1101 client/scenes/lobby_gui.cpp:1757
msgid "Licenses"
msgstr "Licenças"
-#: client/scenes/lobby_gui.cpp:1384
+#: client/scenes/lobby_gui.cpp:1440
msgid "Microphone is enabled"
-msgstr "O microfone está habilitado"
+msgstr "O microfone está ativado"
-#: client/scenes/lobby_gui.cpp:1385
+#: client/scenes/lobby_gui.cpp:1441
msgid "Microphone is disabled"
-msgstr "O microfone está desabilitado"
+msgstr "O microfone está desativado"
-#: client/scenes/lobby_gui.cpp:1394
+#: client/scenes/lobby_gui.cpp:1450
msgid "Hand tracking is enabled"
-msgstr "O rastreamento de mãos está habilitado"
+msgstr "O rastreamento de mãos está ativado"
-#: client/scenes/lobby_gui.cpp:1395
+#: client/scenes/lobby_gui.cpp:1451
msgid "Hand tracking is disabled"
-msgstr "O rastreamento de mãos está desabilitado"
+msgstr "O rastreamento de mãos está desativado"
-#: client/scenes/lobby_gui.cpp:1404
+#: client/scenes/lobby_gui.cpp:1460
msgid "Eye tracking is enabled"
-msgstr "O rastreamento ocular está habilitado"
+msgstr "O rastreamento ocular está ativado"
-#: client/scenes/lobby_gui.cpp:1405
+#: client/scenes/lobby_gui.cpp:1461
msgid "Eye tracking is disabled"
-msgstr "O rastreamento ocular está desabilitado"
+msgstr "O rastreamento ocular está desativado"
-#: client/scenes/lobby_gui.cpp:1415 client/scenes/lobby_gui.cpp:1426
+#: client/scenes/lobby_gui.cpp:1471 client/scenes/lobby_gui.cpp:1482
msgid "Face tracking is enabled"
-msgstr "O rastreamento de face está habilitado"
+msgstr "O rastreamento facial está ativado"
-#: client/scenes/lobby_gui.cpp:1416 client/scenes/lobby_gui.cpp:1427
+#: client/scenes/lobby_gui.cpp:1472 client/scenes/lobby_gui.cpp:1483
msgid "Face tracking is disabled"
-msgstr "O rastreamento de face está desabilitado"
+msgstr "O rastreamento facial está desativado"
-#: client/scenes/lobby_gui.cpp:1444
+#: client/scenes/lobby_gui.cpp:1493
+msgid "Body tracking is enabled"
+msgstr "O rastreamento corporal está ativado"
+
+#: client/scenes/lobby_gui.cpp:1494
+msgid "Body tracking is disabled"
+msgstr "O rastreamento corporal está desativado"
+
+#: client/scenes/lobby_gui.cpp:1510
msgid "Add server"
msgstr "Adicionar servidor"
-#: client/scenes/lobby_gui.cpp:1673
+#: client/scenes/lobby_gui.cpp:1739
msgid "Server list"
msgstr "Lista de servidores"
-#: client/scenes/lobby_gui.cpp:1676
+#: client/scenes/lobby_gui.cpp:1742
msgid "Settings"
msgstr "Ajustes"
-#: client/scenes/lobby_gui.cpp:1679
+#: client/scenes/lobby_gui.cpp:1745
msgid "Post-processing"
msgstr "Pós-processamento"
-#: client/scenes/lobby_gui.cpp:1683
+#: client/scenes/lobby_gui.cpp:1749
msgid "Debug"
msgstr "Depurar"
-#: client/scenes/lobby_gui.cpp:1688
+#: client/scenes/lobby_gui.cpp:1754
msgid "About"
msgstr "Sobre"
-#: client/scenes/lobby_gui.cpp:1694
+#: client/scenes/lobby_gui.cpp:1760
msgid "Exit"
msgstr "Sair"
-#: client/scenes/lobby_gui.cpp:1708
+#: client/scenes/lobby_gui.cpp:1774
msgid ""
"Press A or X or put your palm up\n"
"to move the main window"
@@ -394,7 +446,7 @@ msgstr ""
"Pressione A ou X ou coloque a palma da mão pra cima\n"
"para mover a janela principal"
-#: client/scenes/lobby_gui.cpp:1710
+#: client/scenes/lobby_gui.cpp:1776
msgid "Press A or X to move the main window"
msgstr "Pressione A ou X para mover a janela principal"
@@ -416,7 +468,7 @@ msgstr "Baixar"
#: client/scenes/stream_stats.cpp:165
msgid "Upload"
-msgstr "Subir"
+msgstr "Enviar"
#: client/scenes/stream_stats.cpp:234
#, c++-format
@@ -460,18 +512,18 @@ msgstr "Previsto"
msgid "Estimated motion to photons latency: {}ms"
msgstr "Movimento estimado para a latência de fótons: {}ms"
-#: client/wivrn_client.cpp:97 client/wivrn_client.cpp:196
+#: client/wivrn_client.cpp:98 client/wivrn_client.cpp:202
msgid "Timeout"
msgstr "Tempo esgotado"
-#: client/wivrn_client.cpp:147
+#: client/wivrn_client.cpp:149
msgid "Incorrect PIN"
msgstr "PIN incorreto"
-#: client/wivrn_client.cpp:151
+#: client/wivrn_client.cpp:153
msgid "Unable to check PIN"
msgstr "Incapaz de verificar PIN"
-#: client/wivrn_client.cpp:180
+#: client/wivrn_client.cpp:182
msgid "Pairing is disabled on server"
msgstr "Pareamento está desabilitado no servidor"
From 4b0d53fa58a6a7cfee459cc07b0b3c90898c2313 Mon Sep 17 00:00:00 2001
From: LuckShiba
Date: Sat, 21 Jun 2025 21:50:42 -0300
Subject: [PATCH 010/135] Fix pt_BR locale tooltip length
---
locale/pt_BR/wivrn.po | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/locale/pt_BR/wivrn.po b/locale/pt_BR/wivrn.po
index 86b8ebe3..778bbf32 100644
--- a/locale/pt_BR/wivrn.po
+++ b/locale/pt_BR/wivrn.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-20 19:23-0300\n"
-"PO-Revision-Date: 2025-06-20 19:44-0300\n"
+"PO-Revision-Date: 2025-06-21 21:48-0300\n"
"Last-Translator: LuckShiba \n"
"Language-Team: Brazilian Portuguese\n"
"Language: pt_BR\n"
@@ -232,8 +232,9 @@ msgid ""
"otherwise body data will be guessed from controller and headset positions"
msgstr ""
"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas "
-"configurações de Rastreamento de Movimento do Quest, caso contrário dados "
-"corporais serão estimados com base nas posições do controle e do headset."
+"configurações de Rastreamento de Movimento do Quest,\n"
+"caso contrário dados corporais serão estimados com base nas posições do "
+"controle e do headset."
#: client/scenes/lobby_gui.cpp:777
msgid "Enable lower body tracking"
@@ -247,7 +248,7 @@ msgid ""
msgstr ""
"Estima as posições das articulações da parte inferior do corpo usando Pernas "
"Gerativas\n"
-"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas "
+"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas\n"
"configurações de Rastreamento de Movimento do Quest"
#: client/scenes/lobby_gui.cpp:786
From d6cc209e7663dec4824f8fc488bec1137dc6f104 Mon Sep 17 00:00:00 2001
From: LuckShiba
Date: Sat, 21 Jun 2025 21:56:37 -0300
Subject: [PATCH 011/135] Update pt_BR locale
---
locale/pt_BR/wivrn-dashboard.po | 48 ++++++++++++++++-----------------
locale/pt_BR/wivrn.po | 8 +++---
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/locale/pt_BR/wivrn-dashboard.po b/locale/pt_BR/wivrn-dashboard.po
index cde685ba..c651f303 100644
--- a/locale/pt_BR/wivrn-dashboard.po
+++ b/locale/pt_BR/wivrn-dashboard.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: WiVRn-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-20 19:23-0300\n"
-"PO-Revision-Date: 2025-06-20 19:59-0300\n"
+"PO-Revision-Date: 2025-06-21 21:55-0300\n"
"Last-Translator: LuckShiba \n"
"Language-Team: Brazilian Portuguese\n"
"Language: pt_BR\n"
@@ -72,7 +72,7 @@ msgstr "Painel do WiVRn"
#: dashboard/qml/ApkInstallPage.qml:12 dashboard/qml/WizardPage.qml:137
#, kde-format
msgid "Install the WiVRn app on your headset"
-msgstr "Instalar a aplicação WiVRn no seu headset"
+msgstr "Instalar o aplicativo do WiVRn no seu headset"
#: dashboard/qml/ApkInstallPage.qml:41 dashboard/qml/WizardPage.qml:157
#: dashboard/qml/WizardPage.qml:192
@@ -208,7 +208,7 @@ msgstr "Desativar pareamento"
#: dashboard/qml/HeadsetsPage.qml:166
#, kde-format
msgid "Start the WiVRn app on your headset and use the PIN: %1"
-msgstr "Inicie a aplicação WiVRn no seu headset e use o PIN: %1"
+msgstr "Inicie o aplicativo do WiVRn no seu headset e use o PIN: %1"
#: dashboard/qml/HeadsetsPage.qml:166
#, kde-format
@@ -320,7 +320,7 @@ msgstr "Desconectar"
#, kde-format
msgctxt "automatically started application"
msgid "Application"
-msgstr "Aplicação"
+msgstr "Aplicativo"
#: dashboard/qml/Main.qml:295
#, kde-format
@@ -335,7 +335,7 @@ msgstr "Assistente"
#: dashboard/qml/Main.qml:320
#, kde-format
msgid "Install the app"
-msgstr "Instalar a aplicação"
+msgstr "Instalar o aplicativo"
#: dashboard/qml/Main.qml:349 dashboard/qml/SettingsPage.qml:14
#, kde-format
@@ -615,8 +615,8 @@ msgstr ""
#, kde-format
msgid "Paste this in the Steam launch options for the app you want to start"
msgstr ""
-"Cole isso nas opções de lançamento da Steam para a aplicação que você deseja "
-"iniciar"
+"Cole isso nas opções de lançamento da Steam para o aplicativo que você "
+"deseja iniciar"
#: dashboard/qml/SteamLaunchOptions.qml:26
#, kde-format
@@ -632,7 +632,7 @@ msgstr "Comando de lançamento da Steam copiado"
#: dashboard/qml/TroubleshootPage.qml:20
#, kde-format
msgid "I cannot find the WiVRn app on my headset"
-msgstr "Não consigo encontrar a aplicação WiVRn no meu headset"
+msgstr "Não consigo encontrar o aplicativo do WiVRn no meu headset"
#: dashboard/qml/TroubleshootPage.qml:21 dashboard/qml/WizardPage.qml:387
#, kde-format
@@ -640,13 +640,13 @@ msgid ""
"If you installed WiVRn over USB on a Meta headset, the app is in the "
"\"unknown sources\" section."
msgstr ""
-"Se você instalou o WiVRn pela USB em um headset Meta, a aplicação está na "
+"Se você instalou o WiVRn pelo USB em um headset Meta, o aplicativo está na "
"seção \"fontes desconhecidas\"."
#: dashboard/qml/TroubleshootPage.qml:24
#, kde-format
msgid "I cannot see my computer in the WiVRn app"
-msgstr "Não consigo ver meu computador na aplicação WiVRn"
+msgstr "Não consigo ver meu computador no aplicativo do WiVRn"
#: dashboard/qml/TroubleshootPage.qml:25 dashboard/qml/WizardPage.qml:392
#, kde-format
@@ -669,9 +669,9 @@ msgid ""
"- The headset app version is in the \"About\" page
- The "
"server version is %1
"
msgstr ""
-"A versão da aplicação do headset e o servidor no seu computador devem "
-"casar.
- A versão da aplicação do headset está na página \"Sobre\""
-"li>
- A versão do servidor é %1
"
+"A versão do aplicativo do headset e o servidor no seu computador devem "
+"ser a mesma.
- A versão do aplicativo do headset está na página "
+"\"Sobre\"
- A versão do servidor é %1
"
#: dashboard/qml/TroubleshootPage.qml:32
#, kde-format
@@ -772,9 +772,9 @@ msgid ""
"headset.\n"
"You can either install it from the Meta store or directly over USB."
msgstr ""
-"Para usar o WiVRn, você precisa instalar a aplicação cliente em seu "
+"Para usar o WiVRn, você precisa instalar o aplicativo do cliente em seu "
"headset.\n"
-"Você pode instalá-la pela loja Meta ou diretamente pela USB."
+"Você pode instalá-lo pela loja Meta ou diretamente pela USB."
#: dashboard/qml/WizardPage.qml:148
#, kde-format
@@ -787,7 +787,7 @@ msgid ""
"For the Quest 2, 3, 3S, and Pro, you can get the app from the Meta store."
msgstr ""
-"Para os Quest 2, 3, 3S, e Pro, você pode obter a aplicação pela loja Meta."
#: dashboard/qml/WizardPage.qml:164
@@ -796,8 +796,8 @@ msgid ""
"A newer release is available: %1 → %2, the client app on the Meta store may "
"not be compatible."
msgstr ""
-"Uma versão mais nova está disponível: %1 → %2, a aplicação cliente na loja "
-"Meta pode não ser compatível."
+"Uma versão mais nova está disponível: %1 → %2, o aplicativo do cliente na "
+"loja Meta pode não ser compatível."
#: dashboard/qml/WizardPage.qml:171
#, kde-format
@@ -805,7 +805,7 @@ msgid ""
"This is a nightly build, the client app on the Meta store may not be "
"compatible."
msgstr ""
-"Esta é uma compilação noturna, a aplicação cliente na loja Meta pode não ser "
+"Esta é uma build nightly, o aplicativo do cliente na loja Meta pode não ser "
"compativel."
#: dashboard/qml/WizardPage.qml:181
@@ -838,7 +838,7 @@ msgstr ""
#: dashboard/qml/WizardPage.qml:280
#, kde-format
msgid "Select the application you want to start"
-msgstr "Selecione a aplicação que você quer iniciar"
+msgstr "Selecione o aplicativo que você quer iniciar"
#: dashboard/qml/WizardPage.qml:286
#, kde-format
@@ -846,7 +846,7 @@ msgid ""
"The application you choose will be started automatically when you connect "
"your headset."
msgstr ""
-"A aplicação que você escolher será iniciada automaticamente quando você "
+"O aplicativo que você escolher será iniciado automaticamente quando você "
"conectar seu headset."
#: dashboard/qml/WizardPage.qml:300
@@ -866,7 +866,7 @@ msgstr ""
#: dashboard/qml/WizardPage.qml:358
#, kde-format
msgid "Start the WiVRn app on your headset"
-msgstr "Iniciar a aplicação WiVRn no seu headset"
+msgstr "Iniciar o aplicativo do WiVRn no seu headset"
#: dashboard/qml/WizardPage.qml:363
#, kde-format
@@ -874,8 +874,8 @@ msgid ""
"To connect over WiFi, start the WiVRn app on your headset, connect to \"%1\" "
"and enter PIN \"%2\"."
msgstr ""
-"Para conectar pela WiFi, inicie a aplicação WiVRn no seu headset, conecte a "
-"\"%1\" e entre o PIN \"%2\"."
+"Para conectar pelo WiFi, inicie o aplicativo do WiVRn no seu headset, "
+"conecte a \"%1\" e entre o PIN \"%2\"."
#: dashboard/qml/WizardPage.qml:370
#, kde-format
diff --git a/locale/pt_BR/wivrn.po b/locale/pt_BR/wivrn.po
index 778bbf32..b89a5f87 100644
--- a/locale/pt_BR/wivrn.po
+++ b/locale/pt_BR/wivrn.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-20 19:23-0300\n"
-"PO-Revision-Date: 2025-06-21 21:48-0300\n"
+"PO-Revision-Date: 2025-06-21 21:52-0300\n"
"Last-Translator: LuckShiba \n"
"Language-Team: Brazilian Portuguese\n"
"Language: pt_BR\n"
@@ -75,7 +75,7 @@ msgid ""
"Start a VR application on your computer"
msgstr ""
"Conexão pronta\n"
-"Inicie uma aplicação VR no seu computador"
+"Inicie um aplicativo VR no seu computador"
#: client/scenes/lobby_gui.cpp:208
#, c++-format
@@ -84,7 +84,7 @@ msgid ""
"Start a VR application on {}"
msgstr ""
"Conexão pronta\n"
-"Inicie uma aplicação VR em {}"
+"Inicie um aplicativo VR em {}"
#: client/scenes/lobby_gui.cpp:221
msgid "Close"
@@ -169,7 +169,7 @@ msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
msgstr ""
-"Seleciona a taxa de atualização baseada no desempenho medido da aplicação.\n"
+"Seleciona a taxa de atualização baseada no desempenho medido do aplicativo.\n"
"Pode causar oscilações quando uma alteração ocorrer."
#: client/scenes/lobby_gui.cpp:640
From 9e3951da7820be31e231d75c3fa13c70c944c02c Mon Sep 17 00:00:00 2001
From: LuckShiba
Date: Mon, 23 Jun 2025 05:43:28 -0300
Subject: [PATCH 012/135] Fix pt_BR locale tooltip width
---
locale/pt_BR/wivrn.po | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/locale/pt_BR/wivrn.po b/locale/pt_BR/wivrn.po
index b89a5f87..a7960230 100644
--- a/locale/pt_BR/wivrn.po
+++ b/locale/pt_BR/wivrn.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-20 19:23-0300\n"
-"PO-Revision-Date: 2025-06-21 21:52-0300\n"
+"PO-Revision-Date: 2025-06-23 05:42-0300\n"
"Last-Translator: LuckShiba \n"
"Language-Team: Brazilian Portuguese\n"
"Language: pt_BR\n"
@@ -232,9 +232,10 @@ msgid ""
"otherwise body data will be guessed from controller and headset positions"
msgstr ""
"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas "
-"configurações de Rastreamento de Movimento do Quest,\n"
-"caso contrário dados corporais serão estimados com base nas posições do "
-"controle e do headset."
+"configurações de \n"
+"Rastreamento de Movimento do Quest, caso contrário dados corporais serão "
+"estimados\n"
+"com base nas posições do controle e do headset."
#: client/scenes/lobby_gui.cpp:777
msgid "Enable lower body tracking"
From b75714c93665872a225cfcbaf495cf1008b69cce Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 24 Jun 2025 15:25:26 +0200
Subject: [PATCH 013/135] Unify tracked and non tracked foveation
---
server/driver/wivrn_foveation.cpp | 62 ++++++++++++++++++-------------
server/driver/wivrn_foveation.h | 2 +
2 files changed, 38 insertions(+), 26 deletions(-)
diff --git a/server/driver/wivrn_foveation.cpp b/server/driver/wivrn_foveation.cpp
index c8676d49..21cbc287 100644
--- a/server/driver/wivrn_foveation.cpp
+++ b/server/driver/wivrn_foveation.cpp
@@ -139,6 +139,9 @@ static std::tuple solve_foveation(float λ, float c)
static xrt_vec2 yaw_pitch(xrt_quat q)
{
+ if (q.x == 0 and q.y == 0 and q.z == 0 and q.w == 0)
+ return xrt_vec2{};
+
float sine_theta = std::clamp(-2.0f * (q.y * q.z - q.w * q.x), -1.0f, 1.0f);
float pitch = std::asin(sine_theta);
@@ -216,30 +219,20 @@ void wivrn_foveation::compute_params(
xrt_rect src[2],
const xrt_fov fovs[2])
{
- std::lock_guard lock(mutex);
-
xrt_vec2 tan_center[2]{};
- if (gaze.x != 0 or gaze.y != 0 or gaze.z != 0 or gaze.w != 0)
+ auto e = yaw_pitch(gaze);
+ for (size_t i = 0; i < 2; ++i)
{
- auto e = yaw_pitch(gaze);
- for (size_t i = 0; i < 2; ++i)
- {
- xrt_quat view_quat{
- .x = views[i].pose.orientation.x,
- .y = views[i].pose.orientation.y,
- .z = views[i].pose.orientation.z,
- .w = views[i].pose.orientation.w};
- auto view = yaw_pitch(view_quat);
+ xrt_quat view_quat{
+ .x = views[i].pose.orientation.x,
+ .y = views[i].pose.orientation.y,
+ .z = views[i].pose.orientation.z,
+ .w = views[i].pose.orientation.w};
+ auto view = yaw_pitch(view_quat);
- auto angle_x = convergence_angle(views[i].pose.position.x, e.x);
- tan_center[i].x = angles_to_center(view.x + angle_x, views[i].fov.angleLeft, views[i].fov.angleRight);
- tan_center[i].y = angles_to_center(-view.y - e.y, views[i].fov.angleUp, views[i].fov.angleDown);
- }
- }
- else
- {
- for (size_t i = 0; i < 2; ++i)
- tan_center[i].x = angles_to_center(0, fovs[i].angle_left, fovs[i].angle_right);
+ auto angle_x = convergence_angle(views[i].pose.position.x, e.x);
+ tan_center[i].x = angles_to_center(view.x + angle_x, views[i].fov.angleLeft, views[i].fov.angleRight);
+ tan_center[i].y = angles_to_center(-view.y - e.y, views[i].fov.angleUp, views[i].fov.angleDown);
}
for (int i = 0; i < 2; ++i)
@@ -368,10 +361,26 @@ bool operator==(const xrt_quat & a, const xrt_quat & b)
{
return a.x == b.x and a.y == b.y and a.z == b.z and a.w == b.w;
}
+bool operator==(const XrQuaternionf & a, const XrQuaternionf & b)
+{
+ return a.x == b.x and a.y == b.y and a.z == b.z and a.w == b.w;
+}
bool operator==(const xrt_fov & a, const xrt_fov & b)
{
return a.angle_left == b.angle_left and a.angle_right == b.angle_right and a.angle_up == b.angle_up and a.angle_down == b.angle_down;
}
+bool operator==(const XrFovf & a, const XrFovf & b)
+{
+ return a.angleLeft == b.angleLeft and a.angleRight == b.angleRight and a.angleUp == b.angleUp and a.angleDown == b.angleDown;
+}
+bool operator==(const XrVector3f & a, const XrVector3f & b)
+{
+ return a.x == b.x and a.y == b.y and a.z == b.z;
+}
+bool operator==(const wivrn::from_headset::tracking::view & a, const wivrn::from_headset::tracking::view & b)
+{
+ return a.fov == b.fov and a.pose.position == b.pose.position and a.pose.orientation == b.pose.orientation;
+}
vk::CommandBuffer wivrn_foveation::update_foveation_buffer(
vk::Buffer target,
@@ -392,17 +401,18 @@ vk::CommandBuffer wivrn_foveation::update_foveation_buffer(
// Check if the last value is still valid
if (last.flip_y == flip_y and last.src[0] == source[0] and last.src[1] == source[1] and last.fovs[0] == fovs[0] and last.fovs[1] == fovs[1])
- {
- std::lock_guard lock(mutex);
- if (last.gaze == gaze)
- return nullptr;
- }
+ return nullptr;
+
+ std::lock_guard lock(mutex);
+ if (last.gaze == gaze and last.views[0] == views[0] and last.views[1] == views[1])
+ return nullptr;
last = {
.gaze = gaze,
.flip_y = flip_y,
.src = {source[0], source[1]},
.fovs = {fovs[0], fovs[1]},
+ .views = views,
};
compute_params(source, fovs);
diff --git a/server/driver/wivrn_foveation.h b/server/driver/wivrn_foveation.h
index a638a102..efd1c97e 100644
--- a/server/driver/wivrn_foveation.h
+++ b/server/driver/wivrn_foveation.h
@@ -57,9 +57,11 @@ class wivrn_foveation
bool flip_y = false;
xrt_rect src[2] = {};
xrt_fov fovs[2] = {};
+ std::array views = {};
};
P last;
+ // must hold lock on mutex to call it
void compute_params(
xrt_rect src[2],
const xrt_fov fovs[2]);
From d459c9489e2fc5b9ee24feb028a8df3ec615c95c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E1=83=BC?=
Date: Tue, 24 Jun 2025 17:41:18 +0000
Subject: [PATCH 014/135] Update hardware.cpp
---
client/hardware.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/hardware.cpp b/client/hardware.cpp
index c12960de..c558deff 100644
--- a/client/hardware.cpp
+++ b/client/hardware.cpp
@@ -367,7 +367,7 @@ std::pair controller_offset(std::string_view profile, xr::
{
case xr::spaces::grip_left:
case xr::spaces::grip_right:
- return {{0, -0.030, -0.040}, glm::angleAxis(glm::radians(-35.f), glm::vec3{1, 0, 0})};
+ return {{0, -0.014, -0.048}, glm::angleAxis(glm::radians(-35.060f), glm::vec3{1, 0, 0})};
default:
break;
From 6ad4e8ae513a919398d0f58c67f014e2073081ee Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 24 Jun 2025 17:04:48 +0200
Subject: [PATCH 015/135] Multiple foveation fixes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
fix math for center and convergence calculation
add WIVRN_FOVEATION_OFFSET variable to change the vertical center offset
set default vertical center offset to 10° below horizontal
add WIVRN_FOVEATION_DISTANCE variable to set convergence distance
set default convergence distance to 1m
fix cache invalidation condition
Co-authored-by: Baplar
---
server/driver/wivrn_foveation.cpp | 138 +++++++++++++++++++-----------
server/driver/wivrn_foveation.h | 9 +-
2 files changed, 95 insertions(+), 52 deletions(-)
diff --git a/server/driver/wivrn_foveation.cpp b/server/driver/wivrn_foveation.cpp
index 21cbc287..717aaacc 100644
--- a/server/driver/wivrn_foveation.cpp
+++ b/server/driver/wivrn_foveation.cpp
@@ -62,7 +62,12 @@ void render_distortion_images_fini(struct render_resources * r)
DF(Memory, r->distortion.device_memory);
}
-static double foveate(double a, double b, double λ, double c, double x)
+// a, b: parameters computed by solve_foveation
+// λ: pixel ratio between full size and foveated image (in range ]0,1[)
+// c: coordinates in -1,1 range of the full size image where pixel ratio must be 1:1
+// x: coordinates in -1,1 range of the foveated image
+// result: full size image coordinates in -1,1 range
+static double defoveate(double a, double b, double λ, double c, double x)
{
// In order to save encoding, transmit and decoding time, only a portion of the image is encoded in full resolution.
// on each axis, foveated coordinates are defined by the following formula.
@@ -137,9 +142,14 @@ static std::tuple solve_foveation(float λ, float c)
return {a, b(a)};
}
+static bool is_zero_quat(xrt_quat q)
+{
+ return q.x == 0 and q.y == 0 and q.z == 0 and q.w == 0;
+}
+
static xrt_vec2 yaw_pitch(xrt_quat q)
{
- if (q.x == 0 and q.y == 0 and q.z == 0 and q.w == 0)
+ if (is_zero_quat(q))
return xrt_vec2{};
float sine_theta = std::clamp(-2.0f * (q.y * q.z - q.w * q.x), -1.0f, 1.0f);
@@ -160,17 +170,19 @@ static xrt_vec2 yaw_pitch(xrt_quat q)
static float angles_to_center(float e, float l, float r)
{
+ e = tan(e);
+ l = tan(l);
+ r = tan(r);
return (e - l) / (r - l) * 2 - 1;
}
-static float convergence_angle(float eye_x, float gaze_yaw)
+static float convergence_angle(float distance, float eye_x, float gaze_yaw)
{
- const float c = 0.5; // simutaled convergence distance
- auto b = c * std::sin(gaze_yaw) - eye_x;
- return std::asin(b / c);
+ auto b = distance * std::sin(gaze_yaw) - eye_x;
+ return std::asin(b / distance);
}
-void fill_param_2d(
+static void fill_param_2d(
float c,
size_t foveated_dim,
size_t source_dim,
@@ -185,7 +197,7 @@ void fill_param_2d(
for (size_t i = 1; i < foveated_dim; ++i)
{
double u = (i * 2.) / foveated_dim - 1;
- auto f = foveate(a, b, scale, c, u);
+ auto f = defoveate(a, b, scale, c, u);
uint16_t n = std::clamp((f * 0.5 + 0.5) * source_dim + 0.5, 0, source_dim);
assert(n > last);
size_t count = n - last;
@@ -212,6 +224,44 @@ void fill_param_2d(
out.resize(count * 2 - 1);
}
+static float get_angle_offset()
+{
+ if (const char * cvar = std::getenv("WIVRN_FOVEATION_OFFSET"))
+ {
+ std::string_view var(cvar);
+ float res;
+ auto e = std::from_chars(var.begin(), var.end(), res);
+ if (e.ec == std::errc())
+ {
+ // No clamping, we don’t know the range
+ // of actual values for all headsets for sure.
+ return -res * M_PI / 180;
+ }
+ else
+ U_LOG_W("Malformed WIVRN_FOVEATION_OFFSET, must be a number (angle in °)");
+ }
+ // normal sight line is between 10° and 15° below horizontal
+ // https://apps.dtic.mil/sti/tr/pdf/AD0758339.pdf pages 393-394
+ // testing shows 10° looks better
+ return 10 * M_PI / 180;
+}
+
+static float get_convergence_distance()
+{
+ if (const char * cvar = std::getenv("WIVRN_FOVEATION_DISTANCE"))
+ {
+ std::string_view var(cvar);
+ float res;
+ auto e = std::from_chars(var.begin(), var.end(), res);
+ if (e.ec == std::errc())
+ return std::max(res, 0.05f);
+ else
+ U_LOG_W("Malformed WIVRN_FOVEATION_DISTANCE, must be a number (distance in meters)");
+ }
+ // 1m by default
+ return 1;
+}
+
namespace wivrn
{
@@ -219,33 +269,29 @@ void wivrn_foveation::compute_params(
xrt_rect src[2],
const xrt_fov fovs[2])
{
- xrt_vec2 tan_center[2]{};
auto e = yaw_pitch(gaze);
for (size_t i = 0; i < 2; ++i)
- {
- xrt_quat view_quat{
- .x = views[i].pose.orientation.x,
- .y = views[i].pose.orientation.y,
- .z = views[i].pose.orientation.z,
- .w = views[i].pose.orientation.w};
- auto view = yaw_pitch(view_quat);
-
- auto angle_x = convergence_angle(views[i].pose.position.x, e.x);
- tan_center[i].x = angles_to_center(view.x + angle_x, views[i].fov.angleLeft, views[i].fov.angleRight);
- tan_center[i].y = angles_to_center(-view.y - e.y, views[i].fov.angleUp, views[i].fov.angleDown);
- }
-
- for (int i = 0; i < 2; ++i)
{
const auto & fov = fovs[i];
+
if (foveated_width < src[i].extent.w)
- fill_param_2d(tan_center[i].x, foveated_width, src[i].extent.w, params[i].x);
+ {
+ auto angle_x = convergence_angle(convergence_distance, eye_x[i], e.x);
+ auto center = angles_to_center(angle_x, fov.angle_left, fov.angle_right);
+ fill_param_2d(center, foveated_width, src[i].extent.w, params[i].x);
+ }
else
params[i].x = {uint16_t(src[i].extent.w)};
if (foveated_height < src[i].extent.h)
{
- auto offset_y = (views[i].fov.angleDown + views[i].fov.angleUp) / 2;
- fill_param_2d(tan_center[i].y + offset_y, foveated_height, src[i].extent.h, params[i].y);
+ auto angle_y = e.y;
+ if (is_zero_quat(gaze))
+ {
+ // Natural gaze is not straight forward, adjust the angle
+ angle_y += angle_offset;
+ }
+ auto center = angles_to_center(-angle_y, fov.angle_up, fov.angle_down);
+ fill_param_2d(center, foveated_height, src[i].extent.h, params[i].y);
}
else
params[i].y = {uint16_t(src[i].extent.h)};
@@ -255,6 +301,8 @@ void wivrn_foveation::compute_params(
wivrn_foveation::wivrn_foveation(wivrn_vk_bundle & bundle, const xrt_hmd_parts & hmd) :
foveated_width(hmd.screens[0].w_pixels / 2),
foveated_height(hmd.screens[0].h_pixels),
+ angle_offset(get_angle_offset()),
+ convergence_distance(get_convergence_distance()),
command_pool(bundle.device, vk::CommandPoolCreateInfo{.queueFamilyIndex = bundle.queue_family_index}),
cmd(std::move(bundle.device.allocateCommandBuffers({
.commandPool = *command_pool,
@@ -282,7 +330,8 @@ void wivrn_foveation::update_tracking(const from_headset::tracking & tracking, c
const uint8_t orientation_ok = from_headset::tracking::orientation_valid | from_headset::tracking::orientation_tracked;
- views = tracking.views;
+ eye_x[0] = tracking.views[0].pose.position.x;
+ eye_x[1] = tracking.views[1].pose.position.x;
std::optional head;
@@ -357,30 +406,14 @@ static bool operator==(const T & a, const T & b)
static_assert(std::has_unique_object_representations_v);
return std::memcmp(&a, &b, sizeof(T)) == 0;
}
-bool operator==(const xrt_quat & a, const xrt_quat & b)
+static bool operator==(const xrt_quat & a, const xrt_quat & b)
{
return a.x == b.x and a.y == b.y and a.z == b.z and a.w == b.w;
}
-bool operator==(const XrQuaternionf & a, const XrQuaternionf & b)
-{
- return a.x == b.x and a.y == b.y and a.z == b.z and a.w == b.w;
-}
-bool operator==(const xrt_fov & a, const xrt_fov & b)
+static bool operator==(const xrt_fov & a, const xrt_fov & b)
{
return a.angle_left == b.angle_left and a.angle_right == b.angle_right and a.angle_up == b.angle_up and a.angle_down == b.angle_down;
}
-bool operator==(const XrFovf & a, const XrFovf & b)
-{
- return a.angleLeft == b.angleLeft and a.angleRight == b.angleRight and a.angleUp == b.angleUp and a.angleDown == b.angleDown;
-}
-bool operator==(const XrVector3f & a, const XrVector3f & b)
-{
- return a.x == b.x and a.y == b.y and a.z == b.z;
-}
-bool operator==(const wivrn::from_headset::tracking::view & a, const wivrn::from_headset::tracking::view & b)
-{
- return a.fov == b.fov and a.pose.position == b.pose.position and a.pose.orientation == b.pose.orientation;
-}
vk::CommandBuffer wivrn_foveation::update_foveation_buffer(
vk::Buffer target,
@@ -400,11 +433,16 @@ vk::CommandBuffer wivrn_foveation::update_foveation_buffer(
}
// Check if the last value is still valid
- if (last.flip_y == flip_y and last.src[0] == source[0] and last.src[1] == source[1] and last.fovs[0] == fovs[0] and last.fovs[1] == fovs[1])
- return nullptr;
-
std::lock_guard lock(mutex);
- if (last.gaze == gaze and last.views[0] == views[0] and last.views[1] == views[1])
+ if (last.flip_y == flip_y //
+ and last.src[0] == source[0] //
+ and last.src[1] == source[1] //
+ and last.fovs[0] == fovs[0] //
+ and last.fovs[1] == fovs[1] //
+ and last.gaze == gaze //
+ and std::abs(last.eye_x[0] - eye_x[0]) < 0.0005 //
+ and std::abs(last.eye_x[1] - eye_x[1]) < 0.0005 //
+ )
return nullptr;
last = {
@@ -412,7 +450,7 @@ vk::CommandBuffer wivrn_foveation::update_foveation_buffer(
.flip_y = flip_y,
.src = {source[0], source[1]},
.fovs = {fovs[0], fovs[1]},
- .views = views,
+ .eye_x = {eye_x[0], eye_x[1]},
};
compute_params(source, fovs);
diff --git a/server/driver/wivrn_foveation.h b/server/driver/wivrn_foveation.h
index efd1c97e..2ed0e86b 100644
--- a/server/driver/wivrn_foveation.h
+++ b/server/driver/wivrn_foveation.h
@@ -41,7 +41,12 @@ class wivrn_foveation
const size_t foveated_width; // per eye
const size_t foveated_height;
- std::array views = {};
+ // Natural vertical gaze angle
+ const float angle_offset;
+ // Optionally defined from environment variables
+ const float convergence_distance;
+
+ float eye_x[2] = {}; // eye x position
xrt_quat gaze = {};
std::array params;
@@ -57,7 +62,7 @@ class wivrn_foveation
bool flip_y = false;
xrt_rect src[2] = {};
xrt_fov fovs[2] = {};
- std::array views = {};
+ float eye_x[2] = {};
};
P last;
From dbcf4f99f786d2708a0f85900bebba0949a339d4 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Wed, 25 Jun 2025 19:20:30 +0200
Subject: [PATCH 016/135] Add missing right/squeeze for touch pro controller
---
client/application.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/client/application.cpp b/client/application.cpp
index 6da77f71..7dd09c1f 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -171,6 +171,7 @@ static std::vector interaction_profiles{
"/user/hand/right/input/b/click",
"/user/hand/right/input/b/touch",
"/user/hand/right/input/system/click",
+ "/user/hand/right/input/squeeze/value",
"/user/hand/right/input/trigger/value",
"/user/hand/right/input/trigger/touch",
"/user/hand/right/input/thumbstick",
From 4e53406ec5800b440b5cf1eb366c2875c9c727e0 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Thu, 26 Jun 2025 18:54:09 +0200
Subject: [PATCH 017/135] Failsafe in foveation for weird application FoV
---
server/driver/wivrn_foveation.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server/driver/wivrn_foveation.cpp b/server/driver/wivrn_foveation.cpp
index 717aaacc..3c6da424 100644
--- a/server/driver/wivrn_foveation.cpp
+++ b/server/driver/wivrn_foveation.cpp
@@ -173,7 +173,11 @@ static float angles_to_center(float e, float l, float r)
e = tan(e);
l = tan(l);
r = tan(r);
- return (e - l) / (r - l) * 2 - 1;
+ float res = (e - l) / (r - l) * 2 - 1;
+ // If the center isn't in the FoV, fallback to middle of image
+ if (res < -1 or res > 1 or std::isnan(res))
+ return 0;
+ return res;
}
static float convergence_angle(float distance, float eye_x, float gaze_yaw)
From 857e3af6cc7553655b950be930fbfcecf4c1c5ba Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Thu, 26 Jun 2025 16:43:49 +0200
Subject: [PATCH 018/135] Prepare 25.6 release
---
dashboard/io.github.wivrn.wivrn.metainfo.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dashboard/io.github.wivrn.wivrn.metainfo.xml b/dashboard/io.github.wivrn.wivrn.metainfo.xml
index c687b86c..8729b09b 100644
--- a/dashboard/io.github.wivrn.wivrn.metainfo.xml
+++ b/dashboard/io.github.wivrn.wivrn.metainfo.xml
@@ -69,6 +69,19 @@
+
+ https://github.com/WiVRn/WiVRn/releases/tag/v25.6
+
+
+ - Improved image clarity
+ - Support for body tracking on Quest
+ - Support for face tracking on Pico
+ - Support for Vive ultimate trackers
+ - Added some advanced configuration options on dashboard
+ - Changed versioning scheme to year.month
+
+
+
https://github.com/WiVRn/WiVRn/releases/tag/v0.25
From 8691be26774de2ceb85b1a8ef7672c0f2ea9f85d Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Thu, 26 Jun 2025 21:25:23 +0200
Subject: [PATCH 019/135] fix release python packages
---
.github/workflows/Build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml
index e61a4874..a5a8ad12 100644
--- a/.github/workflows/Build.yml
+++ b/.github/workflows/Build.yml
@@ -574,7 +574,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- sudo apt-get install python-toml python-aiohttp
+ sudo apt-get install python3-toml python3-aiohttp
cd flathub
git remote add upstream https://github.com/flathub/io.github.wivrn.wivrn.git
From 6377f21b9991043a1a0079aee740a4ef80cd93a1 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Thu, 26 Jun 2025 19:26:38 -0500
Subject: [PATCH 020/135] Return appropriate error and use logging helper when
unsupported input is requested
---
server/driver/wivrn_controller.cpp | 8 ++++----
server/driver/wivrn_eye_tracker.cpp | 2 +-
server/driver/wivrn_generic_tracker.cpp | 16 +---------------
server/driver/wivrn_hmd.cpp | 4 ++--
4 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/server/driver/wivrn_controller.cpp b/server/driver/wivrn_controller.cpp
index d6e088c5..524a7d7b 100644
--- a/server/driver/wivrn_controller.cpp
+++ b/server/driver/wivrn_controller.cpp
@@ -741,8 +741,8 @@ xrt_result_t wivrn_controller::get_tracked_pose(xrt_input_name name, int64_t at_
cnx->set_enabled(device, true);
break;
default:
- U_LOG_W("Unknown input name requested");
- return {};
+ U_LOG_XDEV_UNSUPPORTED_INPUT(this, u_log_get_global_level(), name);
+ return XRT_ERROR_INPUT_UNSUPPORTED;
}
cnx->add_predict_offset(extrapolation_time);
if (auto & out = tracking_dump())
@@ -784,9 +784,9 @@ xrt_result_t wivrn_controller::get_hand_tracking(xrt_input_name name, int64_t de
}
default:
- U_LOG_W("Unknown input name requested %d", int(name));
+ U_LOG_XDEV_UNSUPPORTED_INPUT(this, u_log_get_global_level(), name);
+ return XRT_ERROR_INPUT_UNSUPPORTED;
}
- return XRT_ERROR_INPUT_UNSUPPORTED;
}
void wivrn_controller::set_derived_pose(const from_headset::derived_pose & derived)
diff --git a/server/driver/wivrn_eye_tracker.cpp b/server/driver/wivrn_eye_tracker.cpp
index 03c330b3..86db2fc7 100644
--- a/server/driver/wivrn_eye_tracker.cpp
+++ b/server/driver/wivrn_eye_tracker.cpp
@@ -88,7 +88,7 @@ xrt_space_relation wivrn_eye_tracker::get_tracked_pose(xrt_input_name name, int6
return relation;
}
- U_LOG_E("Unknown input name");
+ U_LOG_XDEV_UNSUPPORTED_INPUT(this, u_log_get_global_level(), name);
return {};
}
diff --git a/server/driver/wivrn_generic_tracker.cpp b/server/driver/wivrn_generic_tracker.cpp
index 208d0e65..ed267c6c 100644
--- a/server/driver/wivrn_generic_tracker.cpp
+++ b/server/driver/wivrn_generic_tracker.cpp
@@ -136,20 +136,6 @@ wivrn_generic_tracker::wivrn_generic_tracker(int index, xrt_device * hmd, wivrn_
input_count = 1;
}
-#define XRT_INPUT_NAME_CASE(NAME, VALUE) \
- case VALUE: \
- return #NAME;
-
-const char * input_name_str(xrt_input_name name)
-{
- switch (name)
- {
- XRT_INPUT_LIST(XRT_INPUT_NAME_CASE)
- default:
- return "Unknown";
- }
-}
-
xrt_result_t wivrn_generic_tracker::update_inputs()
{
return XRT_SUCCESS;
@@ -167,7 +153,7 @@ xrt_result_t wivrn_generic_tracker::get_tracked_pose(xrt_input_name name, int64_
return XRT_SUCCESS;
}
- U_LOG_D("Unknown input name %s", input_name_str(name));
+ U_LOG_XDEV_UNSUPPORTED_INPUT(this, u_log_get_global_level(), name);
return XRT_ERROR_NOT_IMPLEMENTED;
}
diff --git a/server/driver/wivrn_hmd.cpp b/server/driver/wivrn_hmd.cpp
index b5378316..a07a42fd 100644
--- a/server/driver/wivrn_hmd.cpp
+++ b/server/driver/wivrn_hmd.cpp
@@ -124,8 +124,8 @@ xrt_result_t wivrn_hmd::get_tracked_pose(xrt_input_name name, int64_t at_timesta
{
if (name != XRT_INPUT_GENERIC_HEAD_POSE)
{
- U_LOG_E("Unknown input name");
- return {};
+ U_LOG_XDEV_UNSUPPORTED_INPUT(this, u_log_get_global_level(), name);
+ return XRT_ERROR_INPUT_UNSUPPORTED;
}
auto [extrapolation_time, view] = views.get_at(at_timestamp_ns);
From 795d88d9dc7ccddc0c2675e6c9fe30f1ccf0895d Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Thu, 26 Jun 2025 19:38:47 -0500
Subject: [PATCH 021/135] Use method_pointer for function pointer
initialisation in eye tracker
---
server/driver/wivrn_eye_tracker.cpp | 46 +++++++----------------------
server/driver/wivrn_eye_tracker.h | 6 ++--
2 files changed, 14 insertions(+), 38 deletions(-)
diff --git a/server/driver/wivrn_eye_tracker.cpp b/server/driver/wivrn_eye_tracker.cpp
index 86db2fc7..e148b867 100644
--- a/server/driver/wivrn_eye_tracker.cpp
+++ b/server/driver/wivrn_eye_tracker.cpp
@@ -25,6 +25,7 @@
#include "xrt/xrt_device.h"
#include "util/u_logging.h"
+#include "utils/method.h"
#include
#include
@@ -34,23 +35,6 @@
namespace wivrn
{
-static void wivrn_eye_tracker_destroy(xrt_device * xdev);
-
-static xrt_result_t wivrn_eye_tracker_update_inputs(xrt_device * xdev)
-{
- static_cast(xdev)->update_inputs();
- return XRT_SUCCESS;
-}
-
-static xrt_result_t wivrn_eye_tracker_get_tracked_pose(xrt_device * xdev,
- xrt_input_name name,
- int64_t at_timestamp_ns,
- xrt_space_relation * out_relation)
-{
- *out_relation = static_cast(xdev)->get_tracked_pose(name, at_timestamp_ns);
- return XRT_SUCCESS;
-}
-
wivrn_eye_tracker::wivrn_eye_tracker(xrt_device * hmd) :
xrt_device{
.name = XRT_DEVICE_EYE_GAZE_INTERACTION,
@@ -63,9 +47,9 @@ wivrn_eye_tracker::wivrn_eye_tracker(xrt_device * hmd) :
.supported = {
.eye_gaze = true,
},
- .update_inputs = wivrn_eye_tracker_update_inputs,
- .get_tracked_pose = wivrn_eye_tracker_get_tracked_pose,
- .destroy = wivrn_eye_tracker_destroy,
+ .update_inputs = method_pointer<&wivrn_eye_tracker::update_inputs>,
+ .get_tracked_pose = method_pointer<&wivrn_eye_tracker::get_tracked_pose>,
+ .destroy = [](xrt_device *) {},
},
gaze_input{
.active = true,
@@ -75,36 +59,26 @@ wivrn_eye_tracker::wivrn_eye_tracker(xrt_device * hmd) :
{
}
-void wivrn_eye_tracker::update_inputs()
+xrt_result_t wivrn_eye_tracker::update_inputs()
{
- // Empty
+ return XRT_SUCCESS;
}
-xrt_space_relation wivrn_eye_tracker::get_tracked_pose(xrt_input_name name, int64_t at_timestamp_ns)
+xrt_result_t wivrn_eye_tracker::get_tracked_pose(xrt_input_name name, int64_t at_timestamp_ns, xrt_space_relation * out_relation)
{
if (name == XRT_INPUT_GENERIC_EYE_GAZE_POSE)
{
auto [_, relation] = gaze.get_at(at_timestamp_ns);
- return relation;
+ *out_relation = relation;
+ return XRT_SUCCESS;
}
U_LOG_XDEV_UNSUPPORTED_INPUT(this, u_log_get_global_level(), name);
- return {};
+ return XRT_ERROR_INPUT_UNSUPPORTED;
}
void wivrn_eye_tracker::update_tracking(const from_headset::tracking & tracking, const clock_offset & offset)
{
gaze.update_tracking(tracking, offset);
}
-
-/*
- *
- * Functions
- *
- */
-
-static void wivrn_eye_tracker_destroy(xrt_device * xdev)
-{
-}
-
} // namespace wivrn
diff --git a/server/driver/wivrn_eye_tracker.h b/server/driver/wivrn_eye_tracker.h
index 3625b276..0cd539b5 100644
--- a/server/driver/wivrn_eye_tracker.h
+++ b/server/driver/wivrn_eye_tracker.h
@@ -38,10 +38,12 @@ class wivrn_eye_tracker : public xrt_device
pose_list gaze;
public:
+ using base = xrt_device;
wivrn_eye_tracker(xrt_device * hmd);
- void update_inputs();
+ xrt_result_t update_inputs();
void update_tracking(const from_headset::tracking &, const clock_offset &);
- xrt_space_relation get_tracked_pose(xrt_input_name name, int64_t at_timestamp_ns);
+
+ xrt_result_t get_tracked_pose(xrt_input_name name, int64_t at_timestamp_ns, xrt_space_relation * out_relation);
};
} // namespace wivrn
From 2250143f00dc2733a27b7848bdb332e2b952f1a6 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Thu, 26 Jun 2025 22:35:44 -0500
Subject: [PATCH 022/135] Don't send poses for khr/simple_controller on Quest
when hand tracking data is invalid
---
client/scenes/stream_tracking.cpp | 75 ++++++++++++++++++++++++++-----
client/xr/hand_tracker.cpp | 4 ++
2 files changed, 69 insertions(+), 10 deletions(-)
diff --git a/client/scenes/stream_tracking.cpp b/client/scenes/stream_tracking.cpp
index 434f6d93..8d471e69 100644
--- a/client/scenes/stream_tracking.cpp
+++ b/client/scenes/stream_tracking.cpp
@@ -238,6 +238,7 @@ void scenes::stream::tracking()
std::vector tracking;
std::vector tracking_pool; // pre-allocated objects
std::vector hands;
+ std::array should_skip_simple_controllers{};
std::vector body;
std::vector views;
@@ -245,8 +246,22 @@ void scenes::stream::tracking()
std::vector packets;
const bool hand_tracking = config.check_feature(feature::hand_tracking);
+ // Quest hand tracking creates a fake khr/simple_controller when hand tracking
+ // is enabled, let's not send it when hand tracking data is invalid
+ bool block_khr_simple_controller = false;
+ switch (guess_model())
+ {
+ case model::meta_quest_3:
+ case model::meta_quest_pro:
+ case model::meta_quest_3s:
+ case model::oculus_quest_2:
+ block_khr_simple_controller = hand_tracking;
+ break;
+ default:
+ break;
+ }
+
from_headset::face_type face_tracking = from_headset::face_type::none;
- const bool body_tracking = config.check_feature(feature::body_tracking);
if (config.check_feature(feature::face_tracking))
{
if (application::get_fb_face_tracking2_supported())
@@ -263,6 +278,7 @@ void scenes::stream::tracking()
}
}
+ const bool body_tracking = config.check_feature(feature::body_tracking);
auto & body_tracker = application::get_body_tracker();
if (body_tracking)
{
@@ -327,31 +343,70 @@ void scenes::stream::tracking()
if (recenter_requested.exchange(false))
packet.state_flags = wivrn::from_headset::tracking::recentered;
- packet.device_poses.clear();
- for (auto [device, space]: spaces)
- {
- if (enabled(control, device))
- packet.device_poses.emplace_back(locate_space(device, space, world_space, t0 + Δt));
- }
-
// Hand tracking data are very large, send fewer samples than other items
if (hand_tracking and t0 >= last_hand_sample + period and
(Δt == 0 or Δt >= prediction - 2 * period))
{
last_hand_sample = t0;
if (control.enabled[size_t(tid::left_hand)])
+ {
+ auto joints = locate_hands(application::get_left_hand(), world_space, t0 + Δt);
+ should_skip_simple_controllers[0] = !joints.has_value();
hands.emplace_back(
t0,
t0 + Δt,
from_headset::hand_tracking::left,
- locate_hands(application::get_left_hand(), world_space, t0 + Δt));
+ joints);
+ }
+ else
+ {
+ should_skip_simple_controllers[0] = false;
+ }
if (control.enabled[size_t(tid::right_hand)])
+ {
+ auto joints = locate_hands(application::get_right_hand(), world_space, t0 + Δt);
+ should_skip_simple_controllers[1] = !joints.has_value();
hands.emplace_back(
t0,
t0 + Δt,
from_headset::hand_tracking::right,
- locate_hands(application::get_right_hand(), world_space, t0 + Δt));
+ joints);
+ }
+ else
+ {
+ should_skip_simple_controllers[1] = false;
+ }
+ }
+
+ packet.device_poses.clear();
+ for (auto [device, space]: spaces)
+ {
+ if (enabled(control, device))
+ {
+ switch (device)
+ {
+ case device_id::LEFT_AIM:
+ case device_id::LEFT_GRIP:
+ case device_id::LEFT_PALM:
+ case device_id::RIGHT_AIM:
+ case device_id::RIGHT_GRIP:
+ case device_id::RIGHT_PALM: {
+ const bool right = device > device_id::LEFT_PALM;
+ if (block_khr_simple_controller and interaction_profiles[right].load() == interaction_profile::khr_simple_controller and should_skip_simple_controllers[right])
+ {
+ packet.device_poses.emplace_back(from_headset::tracking::pose{
+ .device = device,
+ });
+ continue;
+ }
+ [[fallthrough]];
+ }
+ default:
+ packet.device_poses.emplace_back(locate_space(device, space, world_space, t0 + Δt));
+ break;
+ }
+ }
}
if (body_tracking)
diff --git a/client/xr/hand_tracker.cpp b/client/xr/hand_tracker.cpp
index f8f5beed..261e5e05 100644
--- a/client/xr/hand_tracker.cpp
+++ b/client/xr/hand_tracker.cpp
@@ -77,6 +77,10 @@ std::optional> xr::
if (!locations.isActive)
return std::nullopt;
+ // bail if none of the joints are valid/tracked
+ if (!std::ranges::any_of(joints_pos, [](const auto & loc) { return loc.locationFlags != 0; }))
+ return std::nullopt;
+
float offset_angle = 0;
// check if we have a device that needs a thumb offset
From 55b7f0e6c75507e8927f2048aa32950429f942a4 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sat, 28 Jun 2025 14:49:56 +0200
Subject: [PATCH 023/135] Fix foveation with negative offsets
H3VR uses negative y extents so that y axis is flipped, previous code
assumed all extents would be positive.
---
server/driver/wivrn_foveation.cpp | 42 ++++++++++++++++++++++++++-----
1 file changed, 36 insertions(+), 6 deletions(-)
diff --git a/server/driver/wivrn_foveation.cpp b/server/driver/wivrn_foveation.cpp
index 3c6da424..be22b3be 100644
--- a/server/driver/wivrn_foveation.cpp
+++ b/server/driver/wivrn_foveation.cpp
@@ -278,15 +278,18 @@ void wivrn_foveation::compute_params(
{
const auto & fov = fovs[i];
- if (foveated_width < src[i].extent.w)
+ size_t extent_w = std::abs(src[i].extent.w);
+ if (foveated_width < extent_w)
{
auto angle_x = convergence_angle(convergence_distance, eye_x[i], e.x);
auto center = angles_to_center(angle_x, fov.angle_left, fov.angle_right);
- fill_param_2d(center, foveated_width, src[i].extent.w, params[i].x);
+ fill_param_2d(center, foveated_width, extent_w, params[i].x);
}
else
params[i].x = {uint16_t(src[i].extent.w)};
- if (foveated_height < src[i].extent.h)
+
+ size_t extent_h = std::abs(src[i].extent.h);
+ if (foveated_height < extent_h)
{
auto angle_y = e.y;
if (is_zero_quat(gaze))
@@ -295,7 +298,7 @@ void wivrn_foveation::compute_params(
angle_y += angle_offset;
}
auto center = angles_to_center(-angle_y, fov.angle_up, fov.angle_down);
- fill_param_2d(center, foveated_height, src[i].extent.h, params[i].y);
+ fill_param_2d(center, foveated_height, extent_h, params[i].y);
}
else
params[i].y = {uint16_t(src[i].extent.h)};
@@ -462,8 +465,35 @@ vk::CommandBuffer wivrn_foveation::update_foveation_buffer(
auto ubo = (render_compute_distortion_foveation_data *)host_buffer.map();
for (size_t view = 0; view < 2; ++view)
{
- fill_ubo(ubo->x + view * RENDER_FOVEATION_BUFFER_DIMENSIONS, params[view].x, false, source[view].offset.w, source[view].extent.w, foveated_width);
- fill_ubo(ubo->y + view * RENDER_FOVEATION_BUFFER_DIMENSIONS, params[view].y, flip_y, source[view].offset.h, source[view].extent.h, foveated_height);
+ bool flip = false;
+ size_t offset, extent;
+
+ if (source[view].extent.w < 0)
+ {
+ flip = true;
+ offset = source[view].offset.w + source[view].extent.w;
+ extent = -source[view].extent.w;
+ }
+ else
+ {
+ offset = source[view].offset.w;
+ extent = source[view].extent.w;
+ }
+ fill_ubo(ubo->x + view * RENDER_FOVEATION_BUFFER_DIMENSIONS, params[view].x, flip, offset, extent, foveated_width);
+
+ if (source[view].extent.h < 0)
+ {
+ flip = not flip_y;
+ offset = source[view].offset.h + source[view].extent.h;
+ extent = -source[view].extent.h;
+ }
+ else
+ {
+ flip = flip_y;
+ offset = source[view].offset.h;
+ extent = source[view].extent.h;
+ }
+ fill_ubo(ubo->y + view * RENDER_FOVEATION_BUFFER_DIMENSIONS, params[view].y, flip, offset, extent, foveated_height);
}
return *cmd;
}
From eacca0785735c2a5d11852f3c8bb51bc41f24eb6 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sun, 29 Jun 2025 10:36:36 +0200
Subject: [PATCH 024/135] 25.6.1 release notes
---
dashboard/io.github.wivrn.wivrn.metainfo.xml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dashboard/io.github.wivrn.wivrn.metainfo.xml b/dashboard/io.github.wivrn.wivrn.metainfo.xml
index 8729b09b..f7691a9f 100644
--- a/dashboard/io.github.wivrn.wivrn.metainfo.xml
+++ b/dashboard/io.github.wivrn.wivrn.metainfo.xml
@@ -69,6 +69,15 @@
+
+ https://github.com/WiVRn/WiVRn/releases/tag/v25.6.1
+
+
+ - Fix crash in H3VR
+ - Workaround controller positions on Meta headsets
+
+
+
https://github.com/WiVRn/WiVRn/releases/tag/v25.6
From dd4d442f438cb2b06d7eec1cd1fece3a6dcc87b9 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Fri, 27 Jun 2025 19:42:35 -0500
Subject: [PATCH 025/135] Fix set_mic_state typo
---
client/audio/android/audio.cpp | 2 +-
client/audio/android/audio.h | 2 +-
client/audio/audio.h | 2 +-
client/scenes/stream_tracking.cpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/client/audio/android/audio.cpp b/client/audio/android/audio.cpp
index 43afd64c..62f94799 100644
--- a/client/audio/android/audio.cpp
+++ b/client/audio/android/audio.cpp
@@ -291,7 +291,7 @@ void wivrn::android::audio::operator()(wivrn::audio_data && data)
buffer_size_bytes.fetch_add(size);
}
-void wivrn::android::audio::set_mic_sate(bool running)
+void wivrn::android::audio::set_mic_state(bool running)
{
if (not microphone)
return;
diff --git a/client/audio/android/audio.h b/client/audio/android/audio.h
index 11edda85..a3eab804 100644
--- a/client/audio/android/audio.h
+++ b/client/audio/android/audio.h
@@ -78,7 +78,7 @@ public:
void operator()(wivrn::audio_data &&);
- void set_mic_sate(bool running);
+ void set_mic_state(bool running);
static void get_audio_description(wivrn::from_headset::headset_info_packet & info);
};
diff --git a/client/audio/audio.h b/client/audio/audio.h
index 11189b2e..1564f065 100644
--- a/client/audio/audio.h
+++ b/client/audio/audio.h
@@ -42,7 +42,7 @@ public:
~audio() = default;
void operator()(wivrn::audio_data &&) {}
- void set_mic_sate(bool running) {}
+ void set_mic_state(bool running) {}
static void get_audio_description(wivrn::from_headset::headset_info_packet & info) {}
};
diff --git a/client/scenes/stream_tracking.cpp b/client/scenes/stream_tracking.cpp
index 8d471e69..e035601f 100644
--- a/client/scenes/stream_tracking.cpp
+++ b/client/scenes/stream_tracking.cpp
@@ -564,7 +564,7 @@ void scenes::stream::operator()(to_headset::tracking_control && packet)
std::lock_guard lock(tracking_control_mutex);
auto m = size_t(to_headset::tracking_control::id::microphone);
if (audio_handle)
- audio_handle->set_mic_sate(packet.enabled[m]);
+ audio_handle->set_mic_state(packet.enabled[m]);
tracking_control = packet;
tracking_control.min_offset = std::min(tracking_control.min_offset, tracking_control.max_offset);
From 8dc2b7a5e06c0eb975a8b232d729bf49f894d858 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Fri, 27 Jun 2025 21:10:06 -0500
Subject: [PATCH 026/135] Store face tracker in variant
---
client/application.cpp | 66 +++++++++-----------------
client/application.h | 50 ++------------------
client/configuration.cpp | 7 ++-
client/scenes/lobby_gui.cpp | 22 +++------
client/scenes/stream.cpp | 22 ++++++---
client/scenes/stream_tracking.cpp | 56 +++++++---------------
client/xr/fb_face_tracker2.h | 3 +-
client/xr/htc_face_tracker.cpp | 78 +++++++++++++++++++------------
client/xr/htc_face_tracker.h | 17 ++++---
client/xr/pico_face_tracker.h | 3 +-
client/xr/session.cpp | 16 +------
client/xr/session.h | 2 +-
common/wivrn_packets.h | 1 -
server/driver/wivrn_session.cpp | 2 +-
14 files changed, 137 insertions(+), 208 deletions(-)
diff --git a/client/application.cpp b/client/application.cpp
index 7dd09c1f..8cf3033d 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1136,40 +1136,6 @@ void application::initialize()
XrSystemEyeGazeInteractionPropertiesEXT eye_gaze_properties = xr_system_id.eye_gaze_interaction_properties();
spdlog::info(" Eye gaze support: {}", (bool)eye_gaze_properties.supportsEyeGazeInteraction);
eye_gaze_supported = eye_gaze_properties.supportsEyeGazeInteraction;
-
- if (eye_gaze_supported)
- {
- switch (guess_model())
- {
- case model::pico_4_pro:
- case model::pico_4_enterprise:
- pico_face_tracking_supported = true;
- break;
- default:
- pico_face_tracking_supported = false;
- break;
- }
- }
- else
- pico_face_tracking_supported = false;
-
- spdlog::info(" PICO face tracking support: {}", (bool)pico_face_tracking_supported);
- }
-
- if (utils::contains(xr_extensions, XR_FB_FACE_TRACKING2_EXTENSION_NAME))
- {
- XrSystemFaceTrackingProperties2FB fb_face2_properties = xr_system_id.fb_face_tracking2_properties();
- spdlog::info(" FB face tracking support: {}", (bool)fb_face2_properties.supportsVisualFaceTracking);
- fb_face_tracking2_supported = fb_face2_properties.supportsVisualFaceTracking;
- }
-
- if (utils::contains(xr_extensions, XR_HTC_FACIAL_TRACKING_EXTENSION_NAME))
- {
- XrSystemFacialTrackingPropertiesHTC htc_face_properties = xr_system_id.htc_face_tracking_properties();
- spdlog::info(" HTC eye tracking support: {}", (bool)htc_face_properties.supportEyeFacialTracking);
- spdlog::info(" HTC lip tracking support: {}", (bool)htc_face_properties.supportLipFacialTracking);
- htc_face_tracking_eye_supported = htc_face_properties.supportEyeFacialTracking;
- htc_face_tracking_lip_supported = htc_face_properties.supportLipFacialTracking;
}
if (utils::contains(xr_extensions, XR_FB_COMPOSITION_LAYER_SETTINGS_EXTENSION_NAME))
@@ -1216,24 +1182,34 @@ void application::initialize()
right_hand = xr_session.create_hand_tracker(XR_HAND_RIGHT_EXT);
}
- if (fb_face_tracking2_supported)
+ if (utils::contains(xr_extensions, XR_FB_FACE_TRACKING2_EXTENSION_NAME))
{
- fb_face_tracker2 = xr_session.create_fb_face_tracker2();
+ XrSystemFaceTrackingProperties2FB fb_face2_properties = xr_system_id.fb_face_tracking2_properties();
+ spdlog::info(" FB face tracking support: {}", (bool)fb_face2_properties.supportsVisualFaceTracking);
+ if (fb_face2_properties.supportsVisualFaceTracking)
+ face_tracker = xr_session.create_fb_face_tracker2();
}
- if (htc_face_tracking_eye_supported)
+ if (std::holds_alternative(face_tracker) && utils::contains(xr_extensions, XR_HTC_FACIAL_TRACKING_EXTENSION_NAME))
{
- htc_face_tracker_eye = xr_session.create_htc_face_tracker(XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC);
+ XrSystemFacialTrackingPropertiesHTC htc_face_properties = xr_system_id.htc_face_tracking_properties();
+ spdlog::info(" HTC eye tracking support: {}", (bool)htc_face_properties.supportEyeFacialTracking);
+ spdlog::info(" HTC lip tracking support: {}", (bool)htc_face_properties.supportLipFacialTracking);
+ face_tracker = xr_session.create_htc_face_tracker(htc_face_properties.supportEyeFacialTracking, htc_face_properties.supportLipFacialTracking);
}
- if (htc_face_tracking_lip_supported)
+ if (std::holds_alternative(face_tracker) && eye_gaze_supported)
{
- htc_face_tracker_lip = xr_session.create_htc_face_tracker(XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC);
- }
-
- if (pico_face_tracking_supported)
- {
- pico_face_tracker = xr_session.create_pico_face_tracker();
+ switch (guess_model())
+ {
+ case model::pico_4_pro:
+ case model::pico_4_enterprise:
+ spdlog::info(" PICO face tracking support: true");
+ face_tracker = xr_session.create_pico_face_tracker();
+ break;
+ default:
+ break;
+ }
}
if (utils::contains_all(xr_extensions, std::array{XR_FB_BODY_TRACKING_EXTENSION_NAME, XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME, XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME}))
diff --git a/client/application.h b/client/application.h
index 6a2d8af2..ebf482ca 100644
--- a/client/application.h
+++ b/client/application.h
@@ -129,17 +129,7 @@ class application : public singleton
xr::hand_tracker left_hand;
xr::hand_tracker right_hand;
- bool fb_face_tracking2_supported = false;
- xr::fb_face_tracker2 fb_face_tracker2;
-
- bool htc_face_tracking_eye_supported = false;
- xr::htc_face_tracker htc_face_tracker_eye;
- bool htc_face_tracking_lip_supported = false;
- xr::htc_face_tracker htc_face_tracker_lip;
-
- bool pico_face_tracking_supported = false;
- xr::pico_face_tracker pico_face_tracker;
-
+ std::variant face_tracker;
std::variant body_tracker;
bool eye_gaze_supported = false;
@@ -430,24 +420,9 @@ public:
return instance().hand_tracking_supported;
}
- static bool get_fb_face_tracking2_supported()
+ static bool get_face_tracking_supported()
{
- return instance().fb_face_tracking2_supported;
- }
-
- static bool get_htc_face_tracking_eye_supported()
- {
- return instance().htc_face_tracking_eye_supported;
- }
-
- static bool get_htc_face_tracking_lip_supported()
- {
- return instance().htc_face_tracking_lip_supported;
- }
-
- static bool get_pico_face_tracking_supported()
- {
- return instance().pico_face_tracking_supported;
+ return !std::holds_alternative(instance().face_tracker);
}
static bool get_body_tracking_supported()
@@ -475,24 +450,9 @@ public:
return instance().right_hand;
}
- static xr::fb_face_tracker2 & get_fb_face_tracker2()
+ static auto & get_face_tracker()
{
- return instance().fb_face_tracker2;
- }
-
- static xr::htc_face_tracker & get_htc_face_tracker_eye()
- {
- return instance().htc_face_tracker_eye;
- }
-
- static xr::htc_face_tracker & get_htc_face_tracker_lip()
- {
- return instance().htc_face_tracker_lip;
- }
-
- static xr::pico_face_tracker & get_pico_face_tracker()
- {
- return instance().pico_face_tracker;
+ return instance().face_tracker;
}
static auto & get_body_tracker()
diff --git a/client/configuration.cpp b/client/configuration.cpp
index 82b1f140..13d8f1f9 100644
--- a/client/configuration.cpp
+++ b/client/configuration.cpp
@@ -106,18 +106,17 @@ bool configuration::check_feature(feature f) const
{
case model::htc_vive_focus_3:
case model::htc_vive_focus_vision:
- [[fallthrough]];
case model::htc_vive_xr_elite:
- if (not(application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported()))
+ if (not std::holds_alternative(application::get_face_tracker()))
return false;
break;
case model::pico_4_pro:
case model::pico_4_enterprise:
- if (not application::get_pico_face_tracking_supported())
+ if (not std::holds_alternative(application::get_face_tracker()))
return false;
break;
default:
- if (not application::get_fb_face_tracking2_supported())
+ if (not std::holds_alternative(application::get_face_tracker()))
return false;
break;
}
diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp
index 564ef93c..d357b35a 100644
--- a/client/scenes/lobby_gui.cpp
+++ b/client/scenes/lobby_gui.cpp
@@ -728,7 +728,7 @@ void scenes::lobby::gui_settings()
ImGui::EndDisabled();
}
{
- ImGui::BeginDisabled(not(application::get_fb_face_tracking2_supported() or application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported()));
+ ImGui::BeginDisabled(not application::get_face_tracking_supported());
bool enabled = config.check_feature(feature::face_tracking);
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
{
@@ -1400,7 +1400,7 @@ static const char * get_face_icon(XrTime predicted_display_time)
{
static const auto w = face_weights();
wivrn::from_headset::tracking::fb_face2 expression;
- application::get_fb_face_tracker2().get_weights(predicted_display_time, expression);
+ std::get(application::get_face_tracker()).get_weights(predicted_display_time, expression);
if (not expression.is_valid)
return ICON_FA_FACE_MEH;
@@ -1464,24 +1464,16 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
});
}
- if (application::get_fb_face_tracking2_supported())
+ if (application::get_face_tracking_supported())
{
+ const char * icon_enabled = std::holds_alternative(application::get_face_tracker())
+ ? get_face_icon(predicted_display_time)
+ : ICON_FA_FACE_KISS_WINK_HEART;
items.push_back({
.f = feature::face_tracking,
.tooltip_enabled = _("Face tracking is enabled"),
.tooltip_disabled = _("Face tracking is disabled"),
- .icon_enabled = get_face_icon(predicted_display_time),
- .icon_disabled = ICON_FA_FACE_MEH_BLANK,
- });
- }
-
- if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported())
- {
- items.push_back({
- .f = feature::face_tracking,
- .tooltip_enabled = _("Face tracking is enabled"),
- .tooltip_disabled = _("Face tracking is disabled"),
- .icon_enabled = ICON_FA_FACE_KISS_WINK_HEART,
+ .icon_enabled = icon_enabled,
.icon_disabled = ICON_FA_FACE_MEH_BLANK,
});
}
diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp
index e38448fd..e89605e5 100644
--- a/client/scenes/stream.cpp
+++ b/client/scenes/stream.cpp
@@ -18,6 +18,7 @@
*/
#include "utils/overloaded.h"
#include "xr/fb_body_tracker.h"
+#include "xr/fb_face_tracker2.h"
#include "xr/htc_body_tracker.h"
#include "xr/pico_body_tracker.h"
#define GLM_FORCE_RADIANS
@@ -219,12 +220,21 @@ std::shared_ptr scenes::stream::create(std::unique_ptr(&face_tracker))
+ face_pico->start();
}
const bool body_tracking = config.check_feature(feature::body_tracking);
@@ -430,29 +424,15 @@ void scenes::stream::tracking()
},
body_tracker);
- if (control.enabled[size_t(tid::face)])
+ if (face_tracking && control.enabled[size_t(tid::face)])
{
- switch (face_tracking)
- {
- case wivrn::from_headset::face_type::none:
- break;
- case wivrn::from_headset::face_type::fb2:
- application::get_fb_face_tracker2().get_weights(t0 + Δt, packet.face.emplace());
- break;
- case wivrn::from_headset::face_type::htc: {
- auto & face_htc = packet.face.emplace();
- face_htc.eye_active = false;
- face_htc.lip_active = false;
- if (application::get_htc_face_tracking_eye_supported())
- application::get_htc_face_tracker_eye().get_weights(t0 + Δt, face_htc);
- if (application::get_htc_face_tracking_lip_supported())
- application::get_htc_face_tracker_lip().get_weights(t0 + Δt, face_htc);
- break;
- }
- case wivrn::from_headset::face_type::pico:
- application::get_pico_face_tracker().get_weights(t0 + Δt, packet.face.emplace());
- break;
- }
+ std::visit(utils::overloaded{
+ [](std::monostate &) {},
+ [&](auto & ft) {
+ ft.get_weights(t0 + Δt, packet.face.emplace::packet_type>());
+ },
+ },
+ face_tracker);
}
}
catch (const std::system_error & e)
@@ -555,8 +535,8 @@ void scenes::stream::tracking()
}
}
- if (face_tracking == from_headset::face_type::pico)
- application::get_pico_face_tracker().stop();
+ if (auto * face_pico = std::get_if(&face_tracker))
+ face_pico->stop();
}
void scenes::stream::operator()(to_headset::tracking_control && packet)
diff --git a/client/xr/fb_face_tracker2.h b/client/xr/fb_face_tracker2.h
index 29e0787c..86ef0f2d 100644
--- a/client/xr/fb_face_tracker2.h
+++ b/client/xr/fb_face_tracker2.h
@@ -34,9 +34,10 @@ class fb_face_tracker2 : public utils::handle
+ * Copyright (C) 2025 Sapphire
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,26 +20,50 @@
#include "htc_face_tracker.h"
#include "wivrn_packets.h"
#include "xr/instance.h"
+#include "xr/session.h"
#include
-static PFN_xrDestroyFacialTrackerHTC xrDestroyFacialTrackerHTC{};
-
-XrResult xr::destroy_htc_face_tracker(XrFacialTrackerHTC id)
+xr::htc_face_tracker::htc_face_tracker(instance & inst, session & s, bool eye, bool lip) :
+ s(s)
{
- return xrDestroyFacialTrackerHTC(id);
-}
+ if (!eye && !lip)
+ return;
-xr::htc_face_tracker::htc_face_tracker(instance & inst, XrFacialTrackerHTC h, XrFacialTrackingTypeHTC facialTrackingTypeHTC)
-{
- id = h;
+ xrCreateFacialTrackerHTC = inst.get_proc("xrCreateFacialTrackerHTC");
xrGetFacialExpressionsHTC = inst.get_proc("xrGetFacialExpressionsHTC");
xrDestroyFacialTrackerHTC = inst.get_proc("xrDestroyFacialTrackerHTC");
- trackerType = facialTrackingTypeHTC;
+
+ XrFacialTrackerCreateInfoHTC create_info{
+ .type = XR_TYPE_FACIAL_TRACKER_CREATE_INFO_HTC,
+ .next = nullptr,
+ };
+
+ if (eye)
+ {
+ create_info.facialTrackingType = XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC;
+ xrCreateFacialTrackerHTC(s, &create_info, &this->eye);
+ }
+ if (lip)
+ {
+ create_info.facialTrackingType = XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC;
+ xrCreateFacialTrackerHTC(s, &create_info, &this->lip);
+ }
}
-void xr::htc_face_tracker::get_weights(XrTime time, wivrn::from_headset::tracking::htc_face & out_expressions)
+xr::htc_face_tracker::~htc_face_tracker()
{
- if (!id || !xrGetFacialExpressionsHTC)
+ if (!xrDestroyFacialTrackerHTC)
+ return;
+
+ if (eye)
+ CHECK_XR(xrDestroyFacialTrackerHTC(std::exchange(eye, nullptr)));
+ if (lip)
+ CHECK_XR(xrDestroyFacialTrackerHTC(std::exchange(lip, nullptr)));
+}
+
+void xr::htc_face_tracker::get_weights(XrTime time, packet_type & out_expressions)
+{
+ if (!(eye || lip) || !xrGetFacialExpressionsHTC)
return;
XrFacialExpressionsHTC expressions{
@@ -47,25 +72,18 @@ void xr::htc_face_tracker::get_weights(XrTime time, wivrn::from_headset::trackin
.sampleTime = time,
};
- bool * is_active;
-
- switch (trackerType)
+ if (eye)
{
- case XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC:
- expressions.expressionCount = out_expressions.eye.size();
- expressions.expressionWeightings = out_expressions.eye.data();
- is_active = &out_expressions.eye_active;
- break;
- case XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC:
- expressions.expressionCount = out_expressions.lip.size();
- expressions.expressionWeightings = out_expressions.lip.data();
- is_active = &out_expressions.lip_active;
- break;
- default:
- throw std::system_error(1, std::generic_category(), "htc_face_tracker with unknown trackerType");
+ expressions.expressionCount = out_expressions.eye.size();
+ expressions.expressionWeightings = out_expressions.eye.data();
+ CHECK_XR(xrGetFacialExpressionsHTC(eye, &expressions));
+ out_expressions.eye_active = expressions.isActive;
+ }
+ if (lip)
+ {
+ expressions.expressionCount = out_expressions.lip.size();
+ expressions.expressionWeightings = out_expressions.lip.data();
+ CHECK_XR(xrGetFacialExpressionsHTC(lip, &expressions));
+ out_expressions.lip_active = expressions.isActive;
}
-
- CHECK_XR(xrGetFacialExpressionsHTC(id, &expressions));
-
- *is_active = expressions.isActive;
}
diff --git a/client/xr/htc_face_tracker.h b/client/xr/htc_face_tracker.h
index f8381b54..fecd802c 100644
--- a/client/xr/htc_face_tracker.h
+++ b/client/xr/htc_face_tracker.h
@@ -1,6 +1,7 @@
/*
* WiVRn VR streaming
* Copyright (C) 2024 galister
+ * Copyright (C) 2025 Sapphire
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,19 +26,23 @@
namespace xr
{
class instance;
+class session;
-XrResult destroy_htc_face_tracker(XrFacialTrackerHTC);
-
-class htc_face_tracker : public utils::handle
+class htc_face_tracker
{
+ XrSession s;
+ XrFacialTrackerHTC eye{};
+ XrFacialTrackerHTC lip{};
+ PFN_xrCreateFacialTrackerHTC xrCreateFacialTrackerHTC{};
PFN_xrGetFacialExpressionsHTC xrGetFacialExpressionsHTC{};
PFN_xrDestroyFacialTrackerHTC xrDestroyFacialTrackerHTC{};
- XrFacialTrackingTypeHTC trackerType{};
public:
+ using packet_type = wivrn::from_headset::tracking::htc_face;
htc_face_tracker() = default;
- htc_face_tracker(instance & inst, XrFacialTrackerHTC h, XrFacialTrackingTypeHTC facialTrackingTypeHTC);
+ htc_face_tracker(instance & inst, session & s, bool eye, bool lip);
+ ~htc_face_tracker();
- void get_weights(XrTime time, struct wivrn::from_headset::tracking::htc_face & out_expressions);
+ void get_weights(XrTime time, packet_type & out_expressions);
};
} // namespace xr
diff --git a/client/xr/pico_face_tracker.h b/client/xr/pico_face_tracker.h
index bd006568..fd5a7d72 100644
--- a/client/xr/pico_face_tracker.h
+++ b/client/xr/pico_face_tracker.h
@@ -40,12 +40,13 @@ class pico_face_tracker
bool started{};
public:
+ using packet_type = wivrn::from_headset::tracking::fb_face2;
pico_face_tracker() = default;
pico_face_tracker(instance & inst, session & s);
~pico_face_tracker();
void start();
void stop();
- void get_weights(XrTime time, struct wivrn::from_headset::tracking::fb_face2 & out_expressions);
+ void get_weights(XrTime time, packet_type & out_expressions);
};
} // namespace xr
diff --git a/client/xr/session.cpp b/client/xr/session.cpp
index fe816159..34ee55c2 100644
--- a/client/xr/session.cpp
+++ b/client/xr/session.cpp
@@ -123,21 +123,9 @@ xr::fb_face_tracker2 xr::session::create_fb_face_tracker2()
return {*inst, ft};
}
-xr::htc_face_tracker xr::session::create_htc_face_tracker(XrFacialTrackingTypeHTC facialTrackingType)
+xr::htc_face_tracker xr::session::create_htc_face_tracker(bool eye, bool lip)
{
- XrFacialTrackerCreateInfoHTC create_info{
- .type = XR_TYPE_FACIAL_TRACKER_CREATE_INFO_HTC,
- .next = nullptr,
- .facialTrackingType = facialTrackingType,
- };
-
- XrFacialTrackerHTC ft;
-
- auto xrCreateFacialTrackerHTC = inst->get_proc("xrCreateFacialTrackerHTC");
- assert(xrCreateFacialTrackerHTC);
-
- CHECK_XR(xrCreateFacialTrackerHTC(id, &create_info, &ft));
- return {*inst, ft, facialTrackingType};
+ return {*inst, *this, eye, lip};
}
xr::pico_face_tracker xr::session::create_pico_face_tracker()
diff --git a/client/xr/session.h b/client/xr/session.h
index 0086ce7f..a4a026d1 100644
--- a/client/xr/session.h
+++ b/client/xr/session.h
@@ -55,7 +55,7 @@ public:
space create_action_space(XrAction action, const XrPosef & pose = {{0, 0, 0, 1}, {0, 0, 0}});
hand_tracker create_hand_tracker(XrHandEXT hand, XrHandJointSetEXT hand_joint_set = XR_HAND_JOINT_SET_DEFAULT_EXT);
fb_face_tracker2 create_fb_face_tracker2();
- htc_face_tracker create_htc_face_tracker(XrFacialTrackingTypeHTC);
+ htc_face_tracker create_htc_face_tracker(bool eye, bool lip);
pico_face_tracker create_pico_face_tracker();
fb_body_tracker create_fb_body_tracker();
htc_body_tracker create_htc_body_tracker();
diff --git a/common/wivrn_packets.h b/common/wivrn_packets.h
index 90dbb0fb..a4f34ae1 100644
--- a/common/wivrn_packets.h
+++ b/common/wivrn_packets.h
@@ -198,7 +198,6 @@ enum face_type : uint8_t
none,
fb2,
htc,
- pico,
};
struct headset_info_packet
diff --git a/server/driver/wivrn_session.cpp b/server/driver/wivrn_session.cpp
index 7a3b025c..0bc1f236 100644
--- a/server/driver/wivrn_session.cpp
+++ b/server/driver/wivrn_session.cpp
@@ -211,7 +211,7 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr connection
}
auto face = get_info().face_tracking;
- if (face == from_headset::face_type::fb2 || face == from_headset::face_type::pico || is_forced_extension("FB_face_tracking2"))
+ if (face == from_headset::face_type::fb2 || is_forced_extension("FB_face_tracking2"))
{
fb_face2_tracker = std::make_unique(&hmd, *this);
static_roles.face = fb_face2_tracker.get();
From f2760df4b7114a0d20d07b976b8b5d99b5234f12 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Sun, 29 Jun 2025 22:06:52 -0500
Subject: [PATCH 027/135] bump protocol revision
---
common/wivrn_packets.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/wivrn_packets.h b/common/wivrn_packets.h
index a4f34ae1..52b9bb0d 100644
--- a/common/wivrn_packets.h
+++ b/common/wivrn_packets.h
@@ -41,7 +41,7 @@ namespace wivrn
// Default port for server to listen, both TCP and UDP
static const int default_port = 9757;
-static constexpr int protocol_revision = 0;
+static constexpr int protocol_revision = 1;
enum class device_id : uint8_t
{
From 29b445e9844ef2ebea6d5057c0efd1e769f47ce1 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 1 Jul 2025 21:26:24 +0200
Subject: [PATCH 028/135] Don't build common when only building openxr lib
---
CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94cafdf2..07cdb545 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,7 +296,9 @@ FetchContent_Declare(monado
)
add_subdirectory(external)
-add_subdirectory(common)
+if (WIVRN_BUILD_CLIENT OR WIVRN_BUILD_SERVER OR WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_DISSECTOR)
+ add_subdirectory(common)
+endif()
if (WIVRN_BUILD_CLIENT)
add_subdirectory(client)
From a2837904cc58759fe403333f24323d19248f2a1b Mon Sep 17 00:00:00 2001
From: Guillaume Meunier
Date: Tue, 24 Jun 2025 15:59:36 +0200
Subject: [PATCH 029/135] Fix ray visibility
---
client/scenes/input_profile.cpp | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/client/scenes/input_profile.cpp b/client/scenes/input_profile.cpp
index 86b3482c..0a0299ca 100644
--- a/client/scenes/input_profile.cpp
+++ b/client/scenes/input_profile.cpp
@@ -334,8 +334,6 @@ static void set_clipping_planes(node_handle node, std::span clipping_
}
}
- node->visible = true;
-
for (auto child_node: node.children())
{
size_t nb_clipping_planes = std::min(child_node->clipping_planes.size(), clipping_planes.size());
@@ -360,16 +358,12 @@ void input_profile::apply(XrSpace world_space, XrTime predicted_display_time, bo
if ((space == xr::spaces::grip_left or space == xr::spaces::aim_left) and hide_left)
{
node->visible = false;
- continue;
}
-
- if ((space == xr::spaces::grip_right or space == xr::spaces::aim_right) and hide_right)
+ else if ((space == xr::spaces::grip_right or space == xr::spaces::aim_right) and hide_right)
{
node->visible = false;
- continue;
}
-
- if (auto location = application::locate_controller(application::space(space), world_space, predicted_display_time); location)
+ else if (auto location = application::locate_controller(application::space(space), world_space, predicted_display_time); location)
{
node->visible = true;
From 2ba3d78cd46d34a42bf3752a27bb920a971b8954 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Wed, 2 Jul 2025 15:49:23 +0200
Subject: [PATCH 030/135] Try to request OpenXR 1.1
---
client/application.cpp | 127 ++++++++++++++++++++++-------------------
client/xr/instance.cpp | 24 +++++++-
client/xr/instance.h | 6 ++
3 files changed, 95 insertions(+), 62 deletions(-)
diff --git a/client/application.cpp b/client/application.cpp
index 8cf3033d..992e01c0 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -26,7 +26,6 @@
#include "spdlog/spdlog.h"
#include "utils/contains.h"
#include "utils/files.h"
-#include "utils/named_thread.h"
#include "vk/check.h"
#include "wifi_lock.h"
#include "xr/actionset.h"
@@ -51,6 +50,7 @@
#endif
#ifdef __ANDROID__
+#include "utils/named_thread.h"
#include
#include
@@ -66,15 +66,16 @@ struct interaction_profile
{
std::string profile_name;
std::vector required_extensions;
+ XrVersion min_version = XR_MAKE_VERSION(1, 0, 0);
+ XrVersion max_version = XR_MAKE_VERSION(2, 0, 0); // exclusive
std::vector input_sources;
bool available;
};
static std::vector interaction_profiles{
interaction_profile{
- "/interaction_profiles/khr/simple_controller",
- {},
- {
+ .profile_name = "/interaction_profiles/khr/simple_controller",
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -90,11 +91,11 @@ static std::vector interaction_profiles{
"/user/hand/right/input/menu/click",
"/user/hand/right/input/select/click",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/oculus/touch_controller",
- {},
- {
+ .profile_name = "/interaction_profiles/oculus/touch_controller",
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -129,11 +130,13 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbstick/click",
"/user/hand/right/input/thumbstick/touch",
"/user/hand/right/input/thumbrest/touch",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/facebook/touch_controller_pro",
- {"XR_FB_touch_controller_pro"},
- {
+ .profile_name = "/interaction_profiles/facebook/touch_controller_pro",
+ .required_extensions = {"XR_FB_touch_controller_pro"},
+ .max_version = XR_MAKE_VERSION(1, 1, 0),
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/left/output/haptic_trigger_fb",
"/user/hand/left/output/haptic_thumb_fb",
@@ -184,11 +187,12 @@ static std::vector interaction_profiles{
"/user/hand/right/input/trigger/slide_fb",
"/user/hand/right/input/trigger/proximity_fb",
"/user/hand/right/input/thumb_fb/proximity_fb",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/meta/touch_pro_controller",
- {"XR_VERSION_1_1"},
- {
+ .profile_name = "/interaction_profiles/meta/touch_pro_controller",
+ .min_version = XR_MAKE_VERSION(1, 1, 0),
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/left/output/haptic_trigger",
"/user/hand/left/output/haptic_thumb",
@@ -239,12 +243,13 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbrest/touch",
"/user/hand/right/input/thumbrest/force",
"/user/hand/right/input/stylus/force",
-
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/meta/touch_controller_plus",
- {"XR_META_touch_controller_plus"},
- {
+ .profile_name = "/interaction_profiles/meta/touch_controller_plus",
+ .required_extensions = {"XR_META_touch_controller_plus"},
+ .max_version = XR_MAKE_VERSION(1, 1, 0),
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -288,11 +293,12 @@ static std::vector interaction_profiles{
"/user/hand/right/input/trigger/slide_meta",
"/user/hand/right/input/trigger/force",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/meta/touch_plus_controller",
- {"XR_VERSION_1_1"},
- {
+ .profile_name = "/interaction_profiles/meta/touch_plus_controller",
+ .min_version = XR_MAKE_VERSION(1, 1, 0),
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -338,11 +344,12 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbstick/touch",
"/user/hand/right/input/thumbrest/touch",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/bytedance/pico_neo3_controller",
- {"XR_BD_controller_interaction"},
- {
+ .profile_name = "/interaction_profiles/bytedance/pico_neo3_controller",
+ .required_extensions = {"XR_BD_controller_interaction"},
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -380,11 +387,12 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbstick/click",
"/user/hand/right/input/thumbstick/touch",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/bytedance/pico4_controller",
- {"XR_BD_controller_interaction"},
- {
+ .profile_name = "/interaction_profiles/bytedance/pico4_controller",
+ .required_extensions = {"XR_BD_controller_interaction"},
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -422,11 +430,12 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbstick/touch",
"/user/hand/right/input/squeeze/click",
"/user/hand/right/input/squeeze/value",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/bytedance/pico4s_controller",
- {"XR_BD_controller_interaction"},
- {
+ .profile_name = "/interaction_profiles/bytedance/pico4s_controller",
+ .required_extensions = {"XR_BD_controller_interaction"},
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -464,11 +473,12 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbstick/touch",
"/user/hand/right/input/squeeze/click",
"/user/hand/right/input/squeeze/value",
- }},
+ },
+ },
interaction_profile{
- "/interaction_profiles/htc/vive_focus3_controller",
- {"XR_HTC_vive_focus3_controller_interaction"},
- {
+ .profile_name = "/interaction_profiles/htc/vive_focus3_controller",
+ .required_extensions = {"XR_HTC_vive_focus3_controller_interaction"},
+ .input_sources = {
"/user/hand/left/output/haptic",
"/user/hand/right/output/haptic",
@@ -505,18 +515,19 @@ static std::vector interaction_profiles{
"/user/hand/right/input/thumbstick/click",
"/user/hand/right/input/thumbstick/touch",
"/user/hand/right/input/thumbrest/touch",
- }},
- interaction_profile{
- "/interaction_profiles/htc/vive_xr_tracker",
- {"XR_HTC_vive_xr_tracker_interaction", "XR_HTC_path_enumeration"},
- {},
+ },
},
interaction_profile{
- "/interaction_profiles/ext/eye_gaze_interaction",
- {"XR_EXT_eye_gaze_interaction"},
- {
+ .profile_name = "/interaction_profiles/htc/vive_xr_tracker",
+ .required_extensions = {"XR_HTC_vive_xr_tracker_interaction", "XR_HTC_path_enumeration"},
+ },
+ interaction_profile{
+ .profile_name = "/interaction_profiles/ext/eye_gaze_interaction",
+ .required_extensions = {"XR_EXT_eye_gaze_interaction"},
+ .input_sources = {
"/user/eyes_ext/input/gaze_ext/pose",
- }},
+ },
+ },
};
static const std::pair action_suffixes[] =
@@ -910,12 +921,13 @@ void application::initialize_actions()
std::unordered_map> suggested_bindings;
+ XrVersion api_version = xr_instance.get_api_version();
// Build the list of all possible input sources, without duplicates,
// checking which profiles are supported by the runtime
std::vector sources;
for (auto & profile: interaction_profiles)
{
- profile.available = utils::contains_all(xr_extensions, profile.required_extensions);
+ profile.available = utils::contains_all(xr_extensions, profile.required_extensions) and profile.min_version <= api_version and profile.max_version > api_version;
if (!profile.available)
continue;
@@ -1080,13 +1092,7 @@ void application::initialize()
opt_extensions.push_back(XR_FB_COMPOSITION_LAYER_SETTINGS_EXTENSION_NAME);
for (const auto & i: interaction_profiles)
- {
- for (const auto & j: i.required_extensions)
- {
- if (not j.starts_with("XR_VERSION"))
- opt_extensions.push_back(j);
- }
- }
+ opt_extensions.insert(opt_extensions.end(), i.required_extensions.begin(), i.required_extensions.end());
for (const auto & i: xr::instance::extensions())
{
@@ -1107,7 +1113,10 @@ void application::initialize()
xr_instance = xr::instance(app_info.name, extensions);
#endif
- spdlog::info("Created OpenXR instance, runtime {}, version {}", xr_instance.get_runtime_name(), xr_instance.get_runtime_version());
+ spdlog::info("Created OpenXR instance, runtime {}, version {}, API version {}",
+ xr_instance.get_runtime_name(),
+ xr_instance.get_runtime_version(),
+ xr::to_string(xr_instance.get_api_version()));
xr_system_id = xr::system(xr_instance, app_info.formfactor);
spdlog::info("Created OpenXR system for form factor {}", xr::to_string(app_info.formfactor));
diff --git a/client/xr/instance.cpp b/client/xr/instance.cpp
index ab934b1f..64a993fc 100644
--- a/client/xr/instance.cpp
+++ b/client/xr/instance.cpp
@@ -40,6 +40,26 @@ static XrBool32 debug_callback(
return XR_FALSE;
}
+static std::pair create_instance(XrInstanceCreateInfo & info)
+{
+ XrResult res;
+ for (XrVersion version: {
+ XR_API_VERSION_1_1,
+ XR_API_VERSION_1_0,
+ })
+ {
+ info.applicationInfo.apiVersion = version;
+ XrInstance inst;
+ res = xrCreateInstance(&info, &inst);
+ if (XR_SUCCEEDED(res))
+ return {version, inst};
+ spdlog::info("Failed to create OpenXR instance version {}: {}",
+ xr::to_string(version),
+ xr::to_string(res));
+ }
+ throw std::system_error(res, xr::error_category(), "Failed to create OpenXR instance");
+}
+
#if defined(XR_USE_PLATFORM_ANDROID)
xr::instance::instance(std::string_view application_name, void * applicationVM, void * applicationActivity, std::vector extensions)
#else
@@ -122,7 +142,6 @@ xr::instance::instance(std::string_view application_name, std::vector
std::string runtime_version;
std::string runtime_name;
std::unordered_map loaded_extensions;
+ XrVersion api_version;
public:
#if defined(XR_USE_PLATFORM_ANDROID)
@@ -70,6 +71,11 @@ public:
return runtime_name;
}
+ XrVersion get_api_version() const
+ {
+ return api_version;
+ }
+
template
F get_proc(const char * name)
{
From 3a33adbd86dec8c355b7ddb9813ec4b23c60ee8c Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Wed, 2 Jul 2025 17:09:43 +0200
Subject: [PATCH 031/135] Remove Quest/simple_controller hack
Just don't suggest bindings for simple controller on Quest
---
client/application.cpp | 16 ++++++++++
client/scenes/stream_tracking.cpp | 49 +------------------------------
2 files changed, 17 insertions(+), 48 deletions(-)
diff --git a/client/application.cpp b/client/application.cpp
index 992e01c0..b7cb4b21 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -929,6 +929,22 @@ void application::initialize_actions()
{
profile.available = utils::contains_all(xr_extensions, profile.required_extensions) and profile.min_version <= api_version and profile.max_version > api_version;
+ if (profile.profile_name.ends_with("khr/simple_controller"))
+ {
+ switch (guess_model())
+ {
+ // Quest hand tracking creates a fake khr/simple_controller when hand tracking
+ // is enabled, this messes with native hand tracking
+ case model::meta_quest_3:
+ case model::meta_quest_pro:
+ case model::meta_quest_3s:
+ case model::oculus_quest_2:
+ profile.available = false;
+ default:
+ break;
+ }
+ }
+
if (!profile.available)
continue;
diff --git a/client/scenes/stream_tracking.cpp b/client/scenes/stream_tracking.cpp
index 67d31429..0a4d9b74 100644
--- a/client/scenes/stream_tracking.cpp
+++ b/client/scenes/stream_tracking.cpp
@@ -246,20 +246,6 @@ void scenes::stream::tracking()
std::vector packets;
const bool hand_tracking = config.check_feature(feature::hand_tracking);
- // Quest hand tracking creates a fake khr/simple_controller when hand tracking
- // is enabled, let's not send it when hand tracking data is invalid
- bool block_khr_simple_controller = false;
- switch (guess_model())
- {
- case model::meta_quest_3:
- case model::meta_quest_pro:
- case model::meta_quest_3s:
- case model::oculus_quest_2:
- block_khr_simple_controller = hand_tracking;
- break;
- default:
- break;
- }
const bool face_tracking = config.check_feature(feature::face_tracking);
auto & face_tracker = application::get_face_tracker();
@@ -345,62 +331,29 @@ void scenes::stream::tracking()
if (control.enabled[size_t(tid::left_hand)])
{
auto joints = locate_hands(application::get_left_hand(), world_space, t0 + Δt);
- should_skip_simple_controllers[0] = !joints.has_value();
hands.emplace_back(
t0,
t0 + Δt,
from_headset::hand_tracking::left,
joints);
}
- else
- {
- should_skip_simple_controllers[0] = false;
- }
if (control.enabled[size_t(tid::right_hand)])
{
auto joints = locate_hands(application::get_right_hand(), world_space, t0 + Δt);
- should_skip_simple_controllers[1] = !joints.has_value();
hands.emplace_back(
t0,
t0 + Δt,
from_headset::hand_tracking::right,
joints);
}
- else
- {
- should_skip_simple_controllers[1] = false;
- }
}
packet.device_poses.clear();
for (auto [device, space]: spaces)
{
if (enabled(control, device))
- {
- switch (device)
- {
- case device_id::LEFT_AIM:
- case device_id::LEFT_GRIP:
- case device_id::LEFT_PALM:
- case device_id::RIGHT_AIM:
- case device_id::RIGHT_GRIP:
- case device_id::RIGHT_PALM: {
- const bool right = device > device_id::LEFT_PALM;
- if (block_khr_simple_controller and interaction_profiles[right].load() == interaction_profile::khr_simple_controller and should_skip_simple_controllers[right])
- {
- packet.device_poses.emplace_back(from_headset::tracking::pose{
- .device = device,
- });
- continue;
- }
- [[fallthrough]];
- }
- default:
- packet.device_poses.emplace_back(locate_space(device, space, world_space, t0 + Δt));
- break;
- }
- }
+ packet.device_poses.emplace_back(locate_space(device, space, world_space, t0 + Δt));
}
if (body_tracking)
From 1ad015ff65452b03d76aaf719bb46612aca1fdc6 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Wed, 2 Jul 2025 21:15:06 +0200
Subject: [PATCH 032/135] Use xrLocateSpaces when runtime has OpenXR 1.1
---
client/scenes/stream_tracking.cpp | 170 ++++++++++++++++++++++++------
1 file changed, 136 insertions(+), 34 deletions(-)
diff --git a/client/scenes/stream_tracking.cpp b/client/scenes/stream_tracking.cpp
index 0a4d9b74..03b685be 100644
--- a/client/scenes/stream_tracking.cpp
+++ b/client/scenes/stream_tracking.cpp
@@ -22,6 +22,7 @@
#include "utils/overloaded.h"
#include "wivrn_packets.h"
#include "xr/fb_body_tracker.h"
+#include
#include
#include
#include
@@ -35,46 +36,28 @@ using tid = to_headset::tracking_control::id;
static const XrDuration min_tracking_period = 2'000'000;
static const XrDuration max_tracking_period = 5'000'000;
-static from_headset::tracking::pose locate_space(device_id device, XrSpace space, XrSpace reference, XrTime time)
+static uint8_t cast_flags(XrSpaceLocationFlags location, XrSpaceVelocityFlags velocity)
{
- XrSpaceVelocity velocity{
- .type = XR_TYPE_SPACE_VELOCITY,
- };
+ uint8_t flags = 0;
+ if (location & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT)
+ flags |= from_headset::tracking::orientation_valid;
- XrSpaceLocation location{
- .type = XR_TYPE_SPACE_LOCATION,
- .next = &velocity,
- };
+ if (location & XR_SPACE_LOCATION_POSITION_VALID_BIT)
+ flags |= from_headset::tracking::position_valid;
- xrLocateSpace(space, reference, time, &location);
+ if (velocity & XR_SPACE_VELOCITY_LINEAR_VALID_BIT)
+ flags |= from_headset::tracking::linear_velocity_valid;
- from_headset::tracking::pose res{
- .pose = location.pose,
- .linear_velocity = velocity.linearVelocity,
- .angular_velocity = velocity.angularVelocity,
- .device = device,
- .flags = 0,
- };
+ if (velocity & XR_SPACE_VELOCITY_ANGULAR_VALID_BIT)
+ flags |= from_headset::tracking::angular_velocity_valid;
- if (location.locationFlags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT)
- res.flags |= from_headset::tracking::orientation_valid;
+ if (location & XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT)
+ flags |= from_headset::tracking::orientation_tracked;
- if (location.locationFlags & XR_SPACE_LOCATION_POSITION_VALID_BIT)
- res.flags |= from_headset::tracking::position_valid;
+ if (location & XR_SPACE_LOCATION_POSITION_TRACKED_BIT)
+ flags |= from_headset::tracking::position_tracked;
- if (velocity.velocityFlags & XR_SPACE_VELOCITY_LINEAR_VALID_BIT)
- res.flags |= from_headset::tracking::linear_velocity_valid;
-
- if (velocity.velocityFlags & XR_SPACE_VELOCITY_ANGULAR_VALID_BIT)
- res.flags |= from_headset::tracking::angular_velocity_valid;
-
- if (location.locationFlags & XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT)
- res.flags |= from_headset::tracking::orientation_tracked;
-
- if (location.locationFlags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT)
- res.flags |= from_headset::tracking::position_tracked;
-
- return res;
+ return flags;
}
namespace
@@ -92,6 +75,122 @@ public:
return instance.now() - start;
}
};
+
+from_headset::tracking::pose locate_space(device_id device, XrSpace space, XrSpace reference, XrTime time)
+{
+ XrSpaceVelocity velocity{
+ .type = XR_TYPE_SPACE_VELOCITY,
+ };
+
+ XrSpaceLocation location{
+ .type = XR_TYPE_SPACE_LOCATION,
+ .next = &velocity,
+ };
+
+ auto res = xrLocateSpace(space, reference, time, &location);
+
+ if (XR_SUCCEEDED(res))
+ return {
+ .pose = location.pose,
+ .linear_velocity = velocity.linearVelocity,
+ .angular_velocity = velocity.angularVelocity,
+ .device = device,
+ .flags = cast_flags(location.locationFlags, velocity.velocityFlags),
+ };
+ spdlog::warn("xrLocateSpace failed for {}: {}", magic_enum::enum_name(device), xr::to_string(res));
+ return {};
+}
+
+class locate_spaces_functor
+{
+ std::vector locations;
+ std::vector velocities;
+ std::vector devices;
+ std::vector spaces;
+ XrSpace reference;
+ PFN_xrLocateSpaces locate_spaces = nullptr;
+
+public:
+ locate_spaces_functor(xr::instance & instance, XrSpace reference) :
+ reference(reference)
+ {
+ if (instance.get_api_version() >= XR_MAKE_VERSION(1, 1, 0))
+ {
+ try
+ {
+ locate_spaces = instance.get_proc("xrLocateSpaces");
+ }
+ catch (std::exception & e)
+ {
+ spdlog::warn("Failed to load xrLocateSpaces function, fallback to xrLocateSpace");
+ }
+ }
+ }
+
+ void add_space(wivrn::device_id device, XrSpace space, XrTime t, std::vector & out)
+ {
+ if (not locate_spaces)
+ {
+ // store, will be located later
+ devices.push_back(device);
+ spaces.push_back(space);
+ }
+ else
+ out.push_back(locate_space(device, space, reference, t));
+ }
+
+ void resolve(
+ xr::session & session,
+ XrTime t,
+ std::vector & out)
+ {
+ assert(devices.size() == spaces.size());
+ if (locate_spaces)
+ {
+ locations.resize(spaces.size());
+ velocities.resize(spaces.size());
+ XrSpaceVelocities spc_velocities{
+ .type = XR_TYPE_SPACE_VELOCITIES,
+ .velocityCount = uint32_t(velocities.size()),
+ .velocities = velocities.data(),
+ };
+ XrSpaceLocations spc_locations{
+ .type = XR_TYPE_SPACE_LOCATIONS,
+ .locationCount = uint32_t(locations.size()),
+ .locations = locations.data(),
+ };
+ XrSpacesLocateInfo info{
+ .type = XR_TYPE_SPACES_LOCATE_INFO,
+ .baseSpace = reference,
+ .time = t,
+ .spaceCount = uint32_t(spaces.size()),
+ .spaces = spaces.data(),
+ };
+ auto res = locate_spaces(session, &info, &spc_locations);
+ if (XR_SUCCEEDED(res))
+ {
+ for (size_t i = 0; i < devices.size(); ++i)
+ {
+ const auto & location = locations[i];
+ const auto & velocity = velocities[i];
+
+ out.push_back({
+ .pose = location.pose,
+ .linear_velocity = velocity.linearVelocity,
+ .angular_velocity = velocity.angularVelocity,
+ .device = devices[i],
+ .flags = cast_flags(location.locationFlags, velocity.velocityFlags),
+ });
+ }
+ }
+ else
+ spdlog::warn("xrLocateSpaces failed: {}", xr::to_string(res));
+ devices.clear();
+ spaces.clear();
+ }
+ }
+};
+
} // namespace
static std::optional> locate_hands(xr::hand_tracker & hand, XrSpace space, XrTime time)
@@ -272,6 +371,8 @@ void scenes::stream::tracking()
}
}
+ locate_spaces_functor locate_spaces{instance, world_space};
+
on_interaction_profile_changed({});
while (not exiting)
@@ -353,8 +454,9 @@ void scenes::stream::tracking()
for (auto [device, space]: spaces)
{
if (enabled(control, device))
- packet.device_poses.emplace_back(locate_space(device, space, world_space, t0 + Δt));
+ locate_spaces.add_space(device, space, t0 + Δt, packet.device_poses);
}
+ locate_spaces.resolve(session, t0 + Δt, packet.device_poses);
if (body_tracking)
std::visit(utils::overloaded{
From 66878a259df2af74e0f39f8062d786282c878c9c Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Thu, 3 Jul 2025 00:28:13 -0500
Subject: [PATCH 033/135] fix add_space locate_spaces check, load
xrLocateSpacesKHR on OpenXR 1.0 if supported
---
client/application.cpp | 1 +
client/scenes/stream_tracking.cpp | 18 +++++++++---------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/client/application.cpp b/client/application.cpp
index b7cb4b21..cbd52f2c 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1088,6 +1088,7 @@ void application::initialize()
// Optional extensions
std::vector opt_extensions;
opt_extensions.push_back(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME);
+ opt_extensions.push_back(XR_KHR_LOCATE_SPACES_EXTENSION_NAME);
opt_extensions.push_back(XR_EXT_HAND_TRACKING_EXTENSION_NAME);
opt_extensions.push_back(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_PASSTHROUGH_EXTENSION_NAME);
diff --git a/client/scenes/stream_tracking.cpp b/client/scenes/stream_tracking.cpp
index 03b685be..7aaadf04 100644
--- a/client/scenes/stream_tracking.cpp
+++ b/client/scenes/stream_tracking.cpp
@@ -114,22 +114,22 @@ public:
locate_spaces_functor(xr::instance & instance, XrSpace reference) :
reference(reference)
{
- if (instance.get_api_version() >= XR_MAKE_VERSION(1, 1, 0))
+ try
{
- try
- {
+ if (instance.get_api_version() >= XR_MAKE_VERSION(1, 1, 0))
locate_spaces = instance.get_proc("xrLocateSpaces");
- }
- catch (std::exception & e)
- {
- spdlog::warn("Failed to load xrLocateSpaces function, fallback to xrLocateSpace");
- }
+ else
+ locate_spaces = instance.get_proc("xrLocateSpacesKHR");
+ }
+ catch (std::exception & e)
+ {
+ spdlog::warn("Failed to load xrLocateSpaces function, fallback to xrLocateSpace");
}
}
void add_space(wivrn::device_id device, XrSpace space, XrTime t, std::vector & out)
{
- if (not locate_spaces)
+ if (locate_spaces)
{
// store, will be located later
devices.push_back(device);
From 88f0f52afe1ececd9ac742426a7649a0f1b38375 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Thu, 3 Jul 2025 01:00:57 -0500
Subject: [PATCH 034/135] Use grip_surface pose for palms when supported
---
client/application.cpp | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/client/application.cpp b/client/application.cpp
index cbd52f2c..f8ec53a8 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -948,10 +948,17 @@ void application::initialize_actions()
if (!profile.available)
continue;
- // Patch profile to add palm_ext
- if (utils::contains(xr_extensions, XR_EXT_PALM_POSE_EXTENSION_NAME) //
- and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
- and not utils::contains(profile.input_sources, "/user/hand/left/input/palm_ext/pose"))
+ // Patch profile to add grip_surface or palm_ext
+ if ((api_version >= XR_MAKE_VERSION(1, 1, 0) or utils::contains(xr_extensions, XR_KHR_MAINTENANCE1_EXTENSION_NAME)) //
+ and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
+ and not utils::contains(profile.input_sources, "/user/hand/left/input/grip_surface/pose"))
+ {
+ profile.input_sources.push_back("/user/hand/left/input/grip_surface/pose");
+ profile.input_sources.push_back("/user/hand/right/input/grip_surface/pose");
+ }
+ else if (utils::contains(xr_extensions, XR_EXT_PALM_POSE_EXTENSION_NAME) //
+ and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
+ and not utils::contains(profile.input_sources, "/user/hand/left/input/palm_ext/pose"))
{
profile.input_sources.push_back("/user/hand/left/input/palm_ext/pose");
profile.input_sources.push_back("/user/hand/right/input/palm_ext/pose");
@@ -995,16 +1002,16 @@ void application::initialize_actions()
spaces[size_t(xr::spaces::grip_left)] = xr_session.create_action_space(a);
else if (name == "/user/hand/left/input/aim/pose")
spaces[size_t(xr::spaces::aim_left)] = xr_session.create_action_space(a);
+ else if (name == "/user/hand/left/input/palm_ext/pose" or name == "/user/hand/left/input/grip_surface/pose")
+ spaces[size_t(xr::spaces::palm_left)] = xr_session.create_action_space(a);
else if (name == "/user/hand/right/input/grip/pose")
spaces[size_t(xr::spaces::grip_right)] = xr_session.create_action_space(a);
else if (name == "/user/hand/right/input/aim/pose")
spaces[size_t(xr::spaces::aim_right)] = xr_session.create_action_space(a);
+ else if (name == "/user/hand/right/input/palm_ext/pose" or name == "/user/hand/right/input/grip_surface/pose")
+ spaces[size_t(xr::spaces::palm_right)] = xr_session.create_action_space(a);
else if (name == "/user/eyes_ext/input/gaze_ext/pose")
spaces[size_t(xr::spaces::eye_gaze)] = xr_session.create_action_space(a);
- else if (name == "/user/hand/right/input/palm_ext/pose")
- spaces[size_t(xr::spaces::palm_right)] = xr_session.create_action_space(a);
- else if (name == "/user/hand/left/input/palm_ext/pose")
- spaces[size_t(xr::spaces::palm_left)] = xr_session.create_action_space(a);
else if (name.contains("/input/entity_htc/pose") && htc_body)
htc_body->add(xr_session.create_action_space(a));
}
@@ -1087,8 +1094,9 @@ void application::initialize()
// Optional extensions
std::vector opt_extensions;
- opt_extensions.push_back(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME);
opt_extensions.push_back(XR_KHR_LOCATE_SPACES_EXTENSION_NAME);
+ opt_extensions.push_back(XR_KHR_MAINTENANCE1_EXTENSION_NAME);
+ opt_extensions.push_back(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME);
opt_extensions.push_back(XR_EXT_HAND_TRACKING_EXTENSION_NAME);
opt_extensions.push_back(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_PASSTHROUGH_EXTENSION_NAME);
From 42c57b61e211476c2ecae667d4af9cfe082a65c7 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Thu, 3 Jul 2025 01:24:33 -0500
Subject: [PATCH 035/135] Revert "Fix meta handtracking thumb rotation offset"
Thumb joint rotations are correct when requesting OpenXR 1.1 on Quest,
this is no longer needed.
This reverts commit e0a1598ac5ca13f8fcb8e28013b38752076e7fe6.
---
client/xr/hand_tracker.cpp | 45 +-------------------------------------
client/xr/hand_tracker.h | 3 ---
2 files changed, 1 insertion(+), 47 deletions(-)
diff --git a/client/xr/hand_tracker.cpp b/client/xr/hand_tracker.cpp
index 261e5e05..34a7a0e7 100644
--- a/client/xr/hand_tracker.cpp
+++ b/client/xr/hand_tracker.cpp
@@ -18,13 +18,10 @@
*/
#include "hand_tracker.h"
-#include "hardware.h"
#include "xr/check.h"
#include "xr/instance.h"
#include "xr/session.h"
#include
-#include
-#include
static PFN_xrDestroyHandTrackerEXT xrDestroyHandTrackerEXT{};
@@ -33,8 +30,7 @@ XrResult xr::destroy_hand_tracker(XrHandTrackerEXT id)
return xrDestroyHandTrackerEXT(id);
}
-xr::hand_tracker::hand_tracker(instance & inst, session & session, const XrHandTrackerCreateInfoEXT & info) :
- hand_id(info.hand)
+xr::hand_tracker::hand_tracker(instance & inst, session & session, const XrHandTrackerCreateInfoEXT & info)
{
static auto xrCreateHandTrackerEXT = inst.get_proc("xrCreateHandTrackerEXT");
assert(xrCreateHandTrackerEXT);
@@ -81,48 +77,9 @@ std::optional> xr::
if (!std::ranges::any_of(joints_pos, [](const auto & loc) { return loc.locationFlags != 0; }))
return std::nullopt;
- float offset_angle = 0;
-
- // check if we have a device that needs a thumb offset
- switch (guess_model())
- {
- case model::meta_quest_3:
- case model::meta_quest_pro:
- case model::meta_quest_3s:
- case model::oculus_quest:
- case model::oculus_quest_2:
- if (hand_id == XR_HAND_LEFT_EXT)
- offset_angle = glm::radians(-90.0f);
- else if (hand_id == XR_HAND_RIGHT_EXT)
- offset_angle = glm::radians(90.0f);
- break;
-
- default:
- break;
- }
-
std::array joints;
for (int i = 0; i < XR_HAND_JOINT_COUNT_EXT; i++)
{
- if (i >= XR_HAND_JOINT_THUMB_METACARPAL_EXT && i <= XR_HAND_JOINT_THUMB_TIP_EXT)
- {
- // Need to convert the XrQuaternionf to a glm::quat to use glm::rotate
- glm::quat q(
- joints_pos[i].pose.orientation.w,
- joints_pos[i].pose.orientation.x,
- joints_pos[i].pose.orientation.y,
- joints_pos[i].pose.orientation.z);
-
- glm::quat offset_rotation = glm::rotate(q, offset_angle, glm::vec3(0, 0, 1));
-
- joints_pos[i].pose.orientation = {
- .x = offset_rotation.x,
- .y = offset_rotation.y,
- .z = offset_rotation.z,
- .w = offset_rotation.w,
- };
- }
-
joints[i] = {joints_pos[i], joints_vel[i]};
}
diff --git a/client/xr/hand_tracker.h b/client/xr/hand_tracker.h
index fad2339f..73e9d05e 100644
--- a/client/xr/hand_tracker.h
+++ b/client/xr/hand_tracker.h
@@ -43,8 +43,5 @@ public:
std::optional> locate(XrSpace space, XrTime time);
static bool check_flags(const std::array & joints, XrSpaceLocationFlags position, XrSpaceVelocityFlags velocity);
-
-private:
- XrHandEXT hand_id;
};
} // namespace xr
From af69dc1f4e74f26f5cafd57c318d2a443d7ac7e9 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Thu, 3 Jul 2025 10:21:39 +0200
Subject: [PATCH 036/135] Fix flatpak CI on pull requests
---
.github/workflows/Build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml
index a5a8ad12..d6ad8099 100644
--- a/.github/workflows/Build.yml
+++ b/.github/workflows/Build.yml
@@ -124,7 +124,7 @@ jobs:
run: |
git config --global --add safe.directory $(pwd)
pip install toml aiohttp
- tools/gen_flatpak_manifest.py --git https://github.com/${{github.repository}}.git --out flatpak
+ tools/gen_flatpak_manifest.py --gitlocal --out flatpak
cat flatpak/io.github.wivrn.wivrn.yml
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.4
From 56e68825ef06831aba8dfe75535647275de5a4c0 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Fri, 4 Jul 2025 20:30:00 +0200
Subject: [PATCH 037/135] typo developper -> developer
---
dashboard/qml/ApkInstallPage.qml | 2 +-
dashboard/qml/WizardPage.qml | 4 ++--
locale/es/wivrn-dashboard.po | 6 +++---
locale/fr/wivrn-dashboard.po | 6 +++---
locale/ja/wivrn-dashboard.po | 6 +++---
locale/pt_BR/wivrn-dashboard.po | 6 +++---
locale/zh_TW/wivrn-dashboard.po | 6 +++---
7 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/dashboard/qml/ApkInstallPage.qml b/dashboard/qml/ApkInstallPage.qml
index 60a65656..5ef5bc05 100644
--- a/dashboard/qml/ApkInstallPage.qml
+++ b/dashboard/qml/ApkInstallPage.qml
@@ -44,7 +44,7 @@ Kirigami.ScrollablePage {
else if (!Adb.adbInstalled)
return i18n("ADB is not installed.");
else
- return i18n("Connect a headset and make sure developper mode is enabled.");
+ return i18n("Connect a headset and make sure developer mode is enabled.");
}
explanation: {
if (!ApkInstaller.busy && !ApkInstaller.apkAvailable)
diff --git a/dashboard/qml/WizardPage.qml b/dashboard/qml/WizardPage.qml
index 8933a386..76a31289 100644
--- a/dashboard/qml/WizardPage.qml
+++ b/dashboard/qml/WizardPage.qml
@@ -109,7 +109,7 @@ Kirigami.ScrollablePage {
}
Kirigami.Dialog {
id: devmode_dialog
- title: i18n("How to enable developper mode")
+ title: i18n("How to enable developer mode")
showCloseButton: false
padding: 2 * Kirigami.Units.largeSpacing
ColumnLayout {
@@ -216,7 +216,7 @@ Kirigami.ScrollablePage {
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
- text: i18n("No headset detected. Make sure that:\n
")
+ text: i18n("No headset detected. Make sure that:\n
")
onLinkActivated: devmode_dialog.open()
MouseArea {
anchors.fill: parent
diff --git a/locale/es/wivrn-dashboard.po b/locale/es/wivrn-dashboard.po
index 8fdc632c..74d30780 100644
--- a/locale/es/wivrn-dashboard.po
+++ b/locale/es/wivrn-dashboard.po
@@ -93,7 +93,7 @@ msgstr "ADB no está instalado."
#: dashboard/qml/ApkInstallPage.qml:47
#, kde-format
-msgid "Connect a headset and make sure developper mode is enabled."
+msgid "Connect a headset and make sure developer mode is enabled."
msgstr ""
"Conecta un visor y asegúrate de que el modo desarrollador esté activado."
@@ -760,7 +760,7 @@ msgstr "Siguiente"
#: dashboard/qml/WizardPage.qml:112
#, kde-format
-msgid "How to enable developper mode"
+msgid "How to enable developer mode"
msgstr "Cómo habilitar el modo desarrollador"
#: dashboard/qml/WizardPage.qml:119
@@ -831,7 +831,7 @@ msgstr "ADB no está instalado"
msgid ""
"No headset detected. Make sure that:\n"
"
"
+"href=\"#\">developer mode"
msgstr ""
"No se detectó el visor. Asegúrate de que:\n"
"
"
msgstr ""
"Aucun casque détecté. Assurez-vous que:\n"
"
"
msgstr ""
"HMDは見つかりません。以下を確認しましょう:\n"
"
"
msgstr ""
"Nenhum headset detectado. Tenha certeza que:\n"
"
"
msgstr ""
"未偵測到頭戴式裝置。請確認:\n"
"
- 已安裝 ADB udev 規則
- 頭戴式裝置處於 開發者模式"
From 90f49e579b473c7f3ea22a2eb961d628f6cd4186 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Fri, 4 Jul 2025 19:10:11 +0200
Subject: [PATCH 038/135] update monado
---
flake.nix | 2 +-
monado-rev | 2 +-
server/driver/wivrn_session.cpp | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/flake.nix b/flake.nix
index 39a4b4eb..63019ce5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
# Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev;
# Nix will output the correct hash when it doesn't match
- hash = "sha256-+PiWxnvMXaSFc+67r17GBRXo7kbjikSElawNMJCydrk=";
+ hash = "sha256-A6TEtT/yrrlNjBSbVaY+WEsBWsnkAPqfW8muHJwN+iE=";
};
};
diff --git a/monado-rev b/monado-rev
index f6c566ab..e12944d3 100644
--- a/monado-rev
+++ b/monado-rev
@@ -1 +1 @@
-bb9bcee2a3be75592de819d9e3fb2c8ed27bb7dc
+40fcca9baf7b0379b03ce68b474c9dd2569e9cf2
diff --git a/server/driver/wivrn_session.cpp b/server/driver/wivrn_session.cpp
index 0bc1f236..5475de30 100644
--- a/server/driver/wivrn_session.cpp
+++ b/server/driver/wivrn_session.cpp
@@ -313,6 +313,7 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptrhmd,
&self->left_hand,
&self->right_hand,
+ nullptr,
self->xdevs,
self->xdev_count,
false,
From 1698f4aba6ea1dcd0e12513fa6acd7c3fd73840f Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Fri, 4 Jul 2025 19:16:54 +0200
Subject: [PATCH 039/135] update monado
---
flake.nix | 2 +-
monado-rev | 2 +-
server/driver/wivrn_controller.cpp | 7 ++++---
server/driver/wivrn_controller.h | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/flake.nix b/flake.nix
index 63019ce5..711ba40c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
# Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev;
# Nix will output the correct hash when it doesn't match
- hash = "sha256-A6TEtT/yrrlNjBSbVaY+WEsBWsnkAPqfW8muHJwN+iE=";
+ hash = "sha256-oyHPOwL05H9rjJJIW7ku5RIQ8I3ucJcSxTWNYvqU89c=";
};
};
diff --git a/monado-rev b/monado-rev
index e12944d3..0f0c3ae0 100644
--- a/monado-rev
+++ b/monado-rev
@@ -1 +1 @@
-40fcca9baf7b0379b03ce68b474c9dd2569e9cf2
+aa5b75cd3e4e1c1f8f93b53797f44d8c9e748204
diff --git a/server/driver/wivrn_controller.cpp b/server/driver/wivrn_controller.cpp
index 524a7d7b..3180e7b4 100644
--- a/server/driver/wivrn_controller.cpp
+++ b/server/driver/wivrn_controller.cpp
@@ -840,7 +840,7 @@ void wivrn_controller::update_hand_tracking(const from_headset::hand_tracking &
cnx->set_enabled(joints.hand_id == 0 ? to_headset::tracking_control::id::left_hand : to_headset::tracking_control::id::right_hand, false);
}
-void wivrn_controller::set_output(xrt_output_name name, const xrt_output_value * value)
+xrt_result_t wivrn_controller::set_output(xrt_output_name name, const xrt_output_value * value)
{
device_id id;
const bool left = device_type == XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER;
@@ -856,7 +856,7 @@ void wivrn_controller::set_output(xrt_output_name name, const xrt_output_value *
id = left ? device_id::LEFT_THUMB_HAPTIC : device_id::RIGHT_THUMB_HAPTIC;
break;
default:
- return;
+ return XRT_ERROR_OUTPUT_UNSUPPORTED;
}
try
@@ -869,7 +869,8 @@ void wivrn_controller::set_output(xrt_output_name name, const xrt_output_value *
}
catch (...)
{
- // Ignore errors
+ return XRT_ERROR_OUTPUT_REQUEST_FAILURE;
}
+ return XRT_SUCCESS;
}
} // namespace wivrn
diff --git a/server/driver/wivrn_controller.h b/server/driver/wivrn_controller.h
index ced51562..b88a1240 100644
--- a/server/driver/wivrn_controller.h
+++ b/server/driver/wivrn_controller.h
@@ -55,7 +55,7 @@ public:
xrt_result_t get_tracked_pose(xrt_input_name name, int64_t at_timestamp_ns, xrt_space_relation * out_relation);
xrt_result_t get_hand_tracking(xrt_input_name name, int64_t desired_timestamp_ns, xrt_hand_joint_set * out_value, int64_t * out_timestamp_ns);
- void set_output(xrt_output_name name, const xrt_output_value * value);
+ xrt_result_t set_output(xrt_output_name name, const xrt_output_value * value);
void set_inputs(const from_headset::inputs &, const clock_offset &);
From a1c262808d533c261899b96ff2e9b425c85f51b6 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Fri, 4 Jul 2025 20:14:11 +0200
Subject: [PATCH 040/135] update monado
---
flake.nix | 2 +-
monado-rev | 2 +-
...001-c-multi-early-wake-of-compositor.patch | 4 +-
...02-ipc-server-Always-listen-to-stdin.patch | 4 +-
.../monado/0003-Use-extern-socket-fd.patch | 4 +-
...Add-storage-usage-to-distortion-mesh.patch | 4 +-
...vironment-blend-mode-selection-logic.patch | 4 +-
.../0006-Convert-to-YCbCr-in-Monado.patch | 158 ++++++++----------
.../0007-store-alpha-channel-in-layer-1.patch | 4 +-
...t-oxr-bind-to-dynamic-role-s-profile.patch | 4 +-
...main-allow-custom-pacing-app-factory.patch | 10 +-
.../0010-st-oxr-forward-0-refresh-rate.patch | 4 +-
...tortion-with-pixel-aligned-foveation.patch | 52 +++---
13 files changed, 117 insertions(+), 139 deletions(-)
diff --git a/flake.nix b/flake.nix
index 711ba40c..026c36dd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
# Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev;
# Nix will output the correct hash when it doesn't match
- hash = "sha256-oyHPOwL05H9rjJJIW7ku5RIQ8I3ucJcSxTWNYvqU89c=";
+ hash = "sha256-HDCAvqBq5qpWlY1DKBDd2GTjqWUrrdeB8HGUtyxVw88=";
};
};
diff --git a/monado-rev b/monado-rev
index 0f0c3ae0..ec0003c6 100644
--- a/monado-rev
+++ b/monado-rev
@@ -1 +1 @@
-aa5b75cd3e4e1c1f8f93b53797f44d8c9e748204
+93d76364ddc848b8a6681e59d23f3235480b781b
diff --git a/patches/monado/0001-c-multi-early-wake-of-compositor.patch b/patches/monado/0001-c-multi-early-wake-of-compositor.patch
index 6bd0fb26..6d59f358 100644
--- a/patches/monado/0001-c-multi-early-wake-of-compositor.patch
+++ b/patches/monado/0001-c-multi-early-wake-of-compositor.patch
@@ -1,4 +1,4 @@
-From 4c22024929342b69b4a1c7d30334b994ea8c78c1 Mon Sep 17 00:00:00 2001
+From 20aa4cc8fd841df0498a3ea34cccbe475db5b800 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 22 Oct 2024 15:23:19 +0200
Subject: [PATCH 01/11] c/multi: early wake of compositor
@@ -128,5 +128,5 @@ index a0bd04e08..9d7610d02 100644
//! @todo Make the clients not go from IDLE to READY before we have completed a first frame.
// Make sure there is at least some sort of valid frame data here.
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch b/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch
index 7b170603..01c8f297 100644
--- a/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch
+++ b/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch
@@ -1,4 +1,4 @@
-From dab0f39ec43bd1eb7d17d3bc32d1a2404cfa3702 Mon Sep 17 00:00:00 2001
+From 328076ce8b74e32e6e41c3a53de3e000a43720a4 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 2 Apr 2024 17:14:42 +0200
Subject: [PATCH 02/11] ipc/server: Always listen to stdin
@@ -21,5 +21,5 @@ index d364fbed3..ad6b473b7 100644
// default.
// This polls stdin.
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0003-Use-extern-socket-fd.patch b/patches/monado/0003-Use-extern-socket-fd.patch
index aa6a4f28..e7f27e2c 100644
--- a/patches/monado/0003-Use-extern-socket-fd.patch
+++ b/patches/monado/0003-Use-extern-socket-fd.patch
@@ -1,4 +1,4 @@
-From 4abefae5f0c3bfbe959368d2708384e4cb503ef5 Mon Sep 17 00:00:00 2001
+From e1c5cdf2de5f1ef5c9556004ffc44a75e0fadc10 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Tue, 8 Oct 2024 22:13:15 +0200
Subject: [PATCH 03/11] Use extern socket fd
@@ -34,5 +34,5 @@ index ad6b473b7..ea6fad65b 100644
// We may have been launched with socket activation
int num_fds = sd_listen_fds(0);
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch b/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch
index bfd3f08d..040c2b6c 100644
--- a/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch
+++ b/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch
@@ -1,4 +1,4 @@
-From da5a76a27abe3b9b44bc0dd432eb273c89cd4575 Mon Sep 17 00:00:00 2001
+From 8aa74c49f98d57c44c7ee9ad4bfa30c91aae8e67 Mon Sep 17 00:00:00 2001
From: galister <3123227-galister@users.noreply.gitlab.com>
Date: Mon, 19 Aug 2024 18:51:45 +0900
Subject: [PATCH 04/11] c/render: Add storage usage to distortion mesh
@@ -21,5 +21,5 @@ index 8ac24db8e..5a7e400c3 100644
&image); // out_image
VK_CHK_AND_RET(ret, "vk_create_image_simple");
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0005-change-environment-blend-mode-selection-logic.patch b/patches/monado/0005-change-environment-blend-mode-selection-logic.patch
index 386bea85..fb014060 100644
--- a/patches/monado/0005-change-environment-blend-mode-selection-logic.patch
+++ b/patches/monado/0005-change-environment-blend-mode-selection-logic.patch
@@ -1,4 +1,4 @@
-From 322b8b36d52afe7f5b57f5785c8b07bc37d315e8 Mon Sep 17 00:00:00 2001
+From 6e97c25c737f0eb2fda9683caf9d38be66ea5aa9 Mon Sep 17 00:00:00 2001
From: galister <85970-galister@users.noreply.gitlab.freedesktop.org>
Date: Sat, 23 Nov 2024 02:42:12 +0900
Subject: [PATCH 05/11] change environment blend mode selection logic
@@ -53,5 +53,5 @@ index 9d7610d02..f3131e810 100644
}
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch b/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch
index 12180fdb..0bc80fca 100644
--- a/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch
+++ b/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch
@@ -1,4 +1,4 @@
-From 52417118d51d284ab5c0cd3d2c9a93c487b66f5f Mon Sep 17 00:00:00 2001
+From a8d3eae0afd8b61aacc18824982c5b6066b5e4d6 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Wed, 11 Sep 2024 22:56:29 +0200
Subject: [PATCH 06/11] Convert to YCbCr in Monado
@@ -11,14 +11,14 @@ Subject: [PATCH 06/11] Convert to YCbCr in Monado
src/xrt/compositor/render/render_resources.c | 35 +++++--
src/xrt/compositor/shaders/distortion.comp | 62 +++++++----
src/xrt/compositor/util/comp_render.h | 12 ++-
- src/xrt/compositor/util/comp_render_cs.c | 41 +++++---
- 8 files changed, 186 insertions(+), 92 deletions(-)
+ src/xrt/compositor/util/comp_render_cs.c | 19 ++--
+ 8 files changed, 175 insertions(+), 81 deletions(-)
diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c
-index 6df4d2b29..ea581accd 100644
+index 06d1cb72a..80678b9f1 100644
--- a/src/xrt/compositor/main/comp_renderer.c
+++ b/src/xrt/compositor/main/comp_renderer.c
-@@ -1001,7 +1001,8 @@ dispatch_compute(struct comp_renderer *r,
+@@ -1022,7 +1022,8 @@ dispatch_compute(struct comp_renderer *r,
// Target Vulkan resources..
VkImage target_image = r->c->target->images[r->acquired_buffer].handle;
@@ -28,7 +28,7 @@ index 6df4d2b29..ea581accd 100644
// Target view information.
struct render_viewport_data views[XRT_MAX_VIEWS];
-@@ -1012,7 +1013,8 @@ dispatch_compute(struct comp_renderer *r,
+@@ -1033,7 +1034,8 @@ dispatch_compute(struct comp_renderer *r,
comp_render_cs_initial_init( //
&data, // data
target_image, // target_image
@@ -39,10 +39,10 @@ index 6df4d2b29..ea581accd 100644
do_timewarp); // do_timewarp
diff --git a/src/xrt/compositor/main/comp_target.h b/src/xrt/compositor/main/comp_target.h
-index 876ff8cd9..924b4ea08 100644
+index 143d41639..98301d596 100644
--- a/src/xrt/compositor/main/comp_target.h
+++ b/src/xrt/compositor/main/comp_target.h
-@@ -61,7 +61,8 @@ enum comp_target_display_timing_usage
+@@ -62,7 +62,8 @@ enum comp_target_display_timing_usage
struct comp_target_image
{
VkImage handle;
@@ -584,40 +584,40 @@ index 08b44d4cf..e1dd1cb58 100644
+ imageStore(chroma, ivec2(offset.xy/2 + gl_GlobalInvocationID.xy), vec4(cbcr.x, cbcr.y, 0, 0));
}
diff --git a/src/xrt/compositor/util/comp_render.h b/src/xrt/compositor/util/comp_render.h
-index 579b91413..ad1b960cd 100644
+index 0afe87393..550c014a0 100644
--- a/src/xrt/compositor/util/comp_render.h
+++ b/src/xrt/compositor/util/comp_render.h
-@@ -161,7 +161,8 @@ struct comp_render_dispatch_data
- VkImage target_image;
+@@ -189,7 +189,8 @@ struct comp_render_dispatch_data
+ VkImage image;
- //! Target image view for distortion.
-- VkImageView target_unorm_view;
-+ VkImageView target_unorm_view_y;
-+ VkImageView target_unorm_view_cbcr;
- } cs;
+ //! Target image view for distortion.
+- VkImageView storage_view;
++ VkImageView storage_view_y;
++ VkImageView storage_view_cbcr;
+ } cs;
+ } target;
};
-
-@@ -424,7 +425,8 @@ comp_render_gfx_dispatch(struct render_gfx *render,
+@@ -465,7 +466,8 @@ comp_render_gfx_dispatch(struct render_gfx *render,
static inline void
comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
VkImage target_image,
-- VkImageView target_unorm_view,
-+ VkImageView target_unorm_view_y,
-+ VkImageView target_unorm_view_cbcr,
+- VkImageView target_storage_view,
++ VkImageView target_storage_view_y,
++ VkImageView target_storage_view_cbcr,
bool fast_path,
bool do_timewarp)
{
-@@ -434,7 +436,8 @@ comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
- data->do_timewarp = do_timewarp;
+@@ -476,7 +478,8 @@ comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
- data->cs.target_image = target_image;
-- data->cs.target_unorm_view = target_unorm_view;
-+ data->cs.target_unorm_view_y = target_unorm_view_y;
-+ data->cs.target_unorm_view_cbcr = target_unorm_view_cbcr;
+ // When writing into the target.
+ data->target.cs.image = target_image;
+- data->target.cs.storage_view = target_storage_view;
++ data->target.cs.storage_view_y = target_storage_view_y;
++ data->target.cs.storage_view_cbcr = target_storage_view_cbcr;
}
/*!
-@@ -522,7 +525,8 @@ comp_render_cs_layer(struct render_compute *render,
+@@ -565,7 +568,8 @@ comp_render_cs_layer(struct render_compute *render,
const struct xrt_pose *world_pose,
const struct xrt_pose *eye_pose,
const VkImage target_image,
@@ -628,72 +628,50 @@ index 579b91413..ad1b960cd 100644
bool do_timewarp);
diff --git a/src/xrt/compositor/util/comp_render_cs.c b/src/xrt/compositor/util/comp_render_cs.c
-index dbc2fec7e..c06dda63d 100644
+index d9d9ea8a4..29c645bff 100644
--- a/src/xrt/compositor/util/comp_render_cs.c
+++ b/src/xrt/compositor/util/comp_render_cs.c
-@@ -343,11 +343,12 @@ crc_clear_output(struct render_compute *render, const struct comp_render_dispatc
- }
-
-
-- render_compute_clear( //
-- render, //
-- d->cs.target_image, //
-- d->cs.target_unorm_view, // target_image_view
-- target_viewport_datas); // views
-+ render_compute_clear( //
-+ render, //
-+ d->cs.target_image, //
-+ d->cs.target_unorm_view_y, // target_image_view_y
-+ d->cs.target_unorm_view_cbcr, // target_image_view_cbcr
-+ target_viewport_datas); // views
+@@ -347,7 +347,8 @@ crc_clear_output(struct render_compute *render, const struct comp_render_dispatc
+ render_compute_clear( //
+ render, //
+ d->target.cs.image, //
+- d->target.cs.storage_view, // target_image_view
++ d->target.cs.storage_view_y, // target_image_view_y
++ d->target.cs.storage_view_cbcr, // target_image_view_cbcr
+ target_viewport_datas); // views
}
- /*
-@@ -391,14 +392,15 @@ crc_distortion_after_squash(struct render_compute *render, const struct comp_ren
- target_viewport_datas[i] = viewport_data;
- }
-
-- render_compute_projection( //
-- render, //
-- src_samplers, //
-- src_image_views, //
-- src_norm_rects, //
-- d->cs.target_image, //
-- d->cs.target_unorm_view, // target_image_view
-- target_viewport_datas); // views
-+ render_compute_projection( //
-+ render, //
-+ src_samplers, //
-+ src_image_views, //
-+ src_norm_rects, //
-+ d->cs.target_image, //
-+ d->cs.target_unorm_view_y, // target_image_view_y
-+ d->cs.target_unorm_view_cbcr, // target_image_view_cbcr
-+ target_viewport_datas); // views
+@@ -398,7 +399,8 @@ crc_distortion_after_squash(struct render_compute *render, const struct comp_ren
+ src_image_views, //
+ src_norm_rects, //
+ d->target.cs.image, //
+- d->target.cs.storage_view, // target_image_view
++ d->target.cs.storage_view_y, // target_image_view_y
++ d->target.cs.storage_view_cbcr, // target_image_view_cbcr
+ target_viewport_datas); // views
}
- /// Fast path
-@@ -470,7 +472,8 @@ crc_distortion_fast_path(struct render_compute *render,
- src_image_views, //
- src_norm_rects, //
- d->cs.target_image, //
-- d->cs.target_unorm_view, //
-+ d->cs.target_unorm_view_y, //
-+ d->cs.target_unorm_view_cbcr, //
- target_viewport_datas); //
+@@ -471,7 +473,8 @@ crc_distortion_fast_path(struct render_compute *render,
+ src_image_views, //
+ src_norm_rects, //
+ d->target.cs.image, //
+- d->target.cs.storage_view, //
++ d->target.cs.storage_view_y, //
++ d->target.cs.storage_view_cbcr, //
+ target_viewport_datas); //
} else {
render_compute_projection_timewarp( //
-@@ -482,7 +485,8 @@ crc_distortion_fast_path(struct render_compute *render,
+@@ -483,7 +486,8 @@ crc_distortion_fast_path(struct render_compute *render,
src_fovs, //
world_poses, //
- d->cs.target_image, //
-- d->cs.target_unorm_view, //
-+ d->cs.target_unorm_view_y, //
-+ d->cs.target_unorm_view_cbcr, //
+ d->target.cs.image, //
+- d->target.cs.storage_view, //
++ d->target.cs.storage_view_y, //
++ d->target.cs.storage_view_cbcr, //
target_viewport_datas); //
}
}
-@@ -503,7 +507,8 @@ comp_render_cs_layer(struct render_compute *render,
+@@ -504,7 +508,8 @@ comp_render_cs_layer(struct render_compute *render,
const struct xrt_pose *world_pose,
const struct xrt_pose *eye_pose,
const VkImage target_image,
@@ -703,7 +681,7 @@ index dbc2fec7e..c06dda63d 100644
const struct render_viewport_data *target_view,
bool do_timewarp)
{
-@@ -660,7 +665,8 @@ comp_render_cs_layer(struct render_compute *render,
+@@ -661,7 +666,8 @@ comp_render_cs_layer(struct render_compute *render,
src_samplers, //
src_image_views, //
cur_image, //
@@ -713,14 +691,14 @@ index dbc2fec7e..c06dda63d 100644
target_view, //
do_timewarp); //
}
-@@ -696,6 +702,7 @@ comp_render_cs_layers(struct render_compute *render,
- &view->eye_pose, //
- view->image, //
- view->cs.unorm_view, //
-+ view->cs.unorm_view, //
- &view->layer_viewport_data, //
- d->do_timewarp); //
+@@ -697,6 +703,7 @@ comp_render_cs_layers(struct render_compute *render,
+ &view->eye_pose, //
+ view->squash.image, //
+ view->squash.cs.storage_view, //
++ view->squash.cs.storage_view, //
+ &view->squash.viewport_data, //
+ d->do_timewarp); //
}
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0007-store-alpha-channel-in-layer-1.patch b/patches/monado/0007-store-alpha-channel-in-layer-1.patch
index 3e98a8bf..dee47064 100644
--- a/patches/monado/0007-store-alpha-channel-in-layer-1.patch
+++ b/patches/monado/0007-store-alpha-channel-in-layer-1.patch
@@ -1,4 +1,4 @@
-From 40c05c4cae8af77048580a83631aa51b0f48dfec Mon Sep 17 00:00:00 2001
+From 9d54ac2408a56556529de2f9173ffcd3d5775bd1 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sun, 3 Nov 2024 13:40:00 +0100
Subject: [PATCH 07/11] store alpha channel in layer 1
@@ -90,5 +90,5 @@ index e1dd1cb58..9ce46fe6f 100644
+ imageStore(luma, ivec3(offset.xy/2 + gl_GlobalInvocationID.xy, 1), alpha);
}
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch b/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch
index 4585bbb3..a18a3626 100644
--- a/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch
+++ b/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch
@@ -1,4 +1,4 @@
-From e92fb94901fc652bde712af1e90c14237ea26f8f Mon Sep 17 00:00:00 2001
+From 07084beafd9430561fbe5681398792282422dde6 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Wed, 19 Feb 2025 10:13:36 +0100
Subject: [PATCH 08/11] st/oxr: bind to dynamic role's profile
@@ -36,5 +36,5 @@ index ce4c0cca1..8ba94dc55 100644
oxr_get_profile_for_device_name(log, sess, xdev->name, out_p);
if (*out_p != NULL) {
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch b/patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch
index f54e5557..ee2ebe44 100644
--- a/patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch
+++ b/patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch
@@ -1,4 +1,4 @@
-From 685e9804eb0abe3fcd6da67ffbc180db35ca4e1d Mon Sep 17 00:00:00 2001
+From 8779248b08863b7a7dda3f9822cb9037372cbd3e Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Thu, 27 Feb 2025 22:45:36 +0100
Subject: [PATCH 09/11] c/main: allow custom pacing app factory
@@ -10,10 +10,10 @@ Subject: [PATCH 09/11] c/main: allow custom pacing app factory
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/xrt/compositor/main/comp_compositor.c b/src/xrt/compositor/main/comp_compositor.c
-index 26c341385..36e3297f7 100644
+index eecb14c17..24d061627 100644
--- a/src/xrt/compositor/main/comp_compositor.c
+++ b/src/xrt/compositor/main/comp_compositor.c
-@@ -983,6 +983,7 @@ compositor_init_renderer(struct comp_compositor *c)
+@@ -984,6 +984,7 @@ compositor_init_renderer(struct comp_compositor *c)
xrt_result_t
comp_main_create_system_compositor(struct xrt_device *xdev,
const struct comp_target_factory *ctf,
@@ -21,7 +21,7 @@ index 26c341385..36e3297f7 100644
struct xrt_system_compositor **out_xsysc)
{
COMP_TRACE_MARKER();
-@@ -1183,10 +1184,11 @@ comp_main_create_system_compositor(struct xrt_device *xdev,
+@@ -1184,10 +1185,11 @@ comp_main_create_system_compositor(struct xrt_device *xdev,
}
// Standard app pacer.
@@ -78,5 +78,5 @@ index 617561c37..e10ba8358 100644
#else
if (!use_null) {
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0010-st-oxr-forward-0-refresh-rate.patch b/patches/monado/0010-st-oxr-forward-0-refresh-rate.patch
index dd1ed8c2..c0bffc25 100644
--- a/patches/monado/0010-st-oxr-forward-0-refresh-rate.patch
+++ b/patches/monado/0010-st-oxr-forward-0-refresh-rate.patch
@@ -1,4 +1,4 @@
-From cbb5662aacc68f28e6628c9fda86a156b08d63a9 Mon Sep 17 00:00:00 2001
+From 723732637613edd61b51039544ec69eaaddb8a69 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sat, 15 Mar 2025 22:19:48 +0100
Subject: [PATCH 10/11] st/oxr: forward 0 refresh rate
@@ -29,5 +29,5 @@ index b3dac8c8a..27d80be9a 100644
if ((int)(displayRefreshRate * 100.0f) == (int)(sess->sys->xsysc->info.refresh_rates_hz[i] * 100.0f)) {
found = true;
--
-2.49.0
+2.50.0
diff --git a/patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch b/patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch
index 78594608..1f7d31ff 100644
--- a/patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch
+++ b/patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch
@@ -1,4 +1,4 @@
-From b659d6c6034b8714a014fc6a5819bb2556c6f0bb Mon Sep 17 00:00:00 2001
+From 89d5e71f70d70958e8c03a038ab4bc0fc262a455 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Mon, 2 Jun 2025 14:51:11 +0200
Subject: [PATCH 11/11] Replace distortion with pixel-aligned foveation
@@ -13,7 +13,7 @@ Subject: [PATCH 11/11] Replace distortion with pixel-aligned foveation
6 files changed, 76 insertions(+), 378 deletions(-)
diff --git a/src/xrt/compositor/CMakeLists.txt b/src/xrt/compositor/CMakeLists.txt
-index f1c54ed4d..a2f7ba5cc 100644
+index 46834bde8..e76c69dd0 100644
--- a/src/xrt/compositor/CMakeLists.txt
+++ b/src/xrt/compositor/CMakeLists.txt
@@ -115,7 +115,7 @@ if(XRT_HAVE_VULKAN)
@@ -652,23 +652,23 @@ index 9ce46fe6f..f3be617bd 100644
- imageStore(luma, ivec3(offset.xy/2 + gl_GlobalInvocationID.xy, 1), alpha);
}
diff --git a/src/xrt/compositor/util/comp_render_cs.c b/src/xrt/compositor/util/comp_render_cs.c
-index c06dda63d..a4934890f 100644
+index 29c645bff..322b0f761 100644
--- a/src/xrt/compositor/util/comp_render_cs.c
+++ b/src/xrt/compositor/util/comp_render_cs.c
-@@ -465,30 +465,15 @@ crc_distortion_fast_path(struct render_compute *render,
+@@ -466,30 +466,15 @@ crc_distortion_fast_path(struct render_compute *render,
world_poses[i] = world_pose;
}
- if (!d->do_timewarp) {
-- render_compute_projection( //
-- render, //
-- src_samplers, //
-- src_image_views, //
-- src_norm_rects, //
-- d->cs.target_image, //
-- d->cs.target_unorm_view_y, //
-- d->cs.target_unorm_view_cbcr, //
-- target_viewport_datas); //
+- render_compute_projection( //
+- render, //
+- src_samplers, //
+- src_image_views, //
+- src_norm_rects, //
+- d->target.cs.image, //
+- d->target.cs.storage_view_y, //
+- d->target.cs.storage_view_cbcr, //
+- target_viewport_datas); //
- } else {
- render_compute_projection_timewarp( //
- render, //
@@ -678,23 +678,23 @@ index c06dda63d..a4934890f 100644
- src_poses, //
- src_fovs, //
- world_poses, //
-- d->cs.target_image, //
-- d->cs.target_unorm_view_y, //
-- d->cs.target_unorm_view_cbcr, //
+- d->target.cs.image, //
+- d->target.cs.storage_view_y, //
+- d->target.cs.storage_view_cbcr, //
- target_viewport_datas); //
- }
-+ render_compute_projection( //
-+ render, //
-+ src_samplers, //
-+ src_image_views, //
-+ src_norm_rects, //
-+ d->cs.target_image, //
-+ d->cs.target_unorm_view_y, //
-+ d->cs.target_unorm_view_cbcr, //
-+ target_viewport_datas); //
++ render_compute_projection( //
++ render, //
++ src_samplers, //
++ src_image_views, //
++ src_norm_rects, //
++ d->target.cs.image, //
++ d->target.cs.storage_view_y, //
++ d->target.cs.storage_view_cbcr, //
++ target_viewport_datas); //
}
--
-2.49.0
+2.50.0
From f43ee229f19615857dc835a3f2965cb721706c30 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Fri, 4 Jul 2025 15:09:50 -0500
Subject: [PATCH 041/135] update monado
---
flake.nix | 2 +-
monado-rev | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/flake.nix b/flake.nix
index 026c36dd..82580246 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
# Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev;
# Nix will output the correct hash when it doesn't match
- hash = "sha256-HDCAvqBq5qpWlY1DKBDd2GTjqWUrrdeB8HGUtyxVw88=";
+ hash = "sha256-BiqNLYTQseymHgkZ3RLHOesxi6qaf4L0j8dgpgaG7LI=";
};
};
diff --git a/monado-rev b/monado-rev
index ec0003c6..800d79e2 100644
--- a/monado-rev
+++ b/monado-rev
@@ -1 +1 @@
-93d76364ddc848b8a6681e59d23f3235480b781b
+2bf7f5c14b947ab3528e37551eb49753fe982dcb
From 3ac31fe5cc2f3330dfd556f16560d2697653e3b9 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Sat, 28 Jun 2025 21:37:36 -0500
Subject: [PATCH 042/135] Forward XR_EXT_user_presence
Closes #258
---
client/application.cpp | 1 +
client/scenes/stream.cpp | 7 +++++++
client/xr/instance.h | 1 +
client/xr/system.cpp | 18 ++++++++++++++++++
client/xr/system.h | 1 +
common/wivrn_packets.h | 9 ++++++++-
server/driver/wivrn_hmd.cpp | 15 +++++++++++++++
server/driver/wivrn_hmd.h | 3 +++
server/driver/wivrn_session.cpp | 12 ++++++++++++
server/driver/wivrn_session.h | 1 +
10 files changed, 67 insertions(+), 1 deletion(-)
diff --git a/client/application.cpp b/client/application.cpp
index f8ec53a8..5bf205af 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1113,6 +1113,7 @@ void application::initialize()
opt_extensions.push_back(XR_KHR_COMPOSITION_LAYER_DEPTH_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_COMPOSITION_LAYER_DEPTH_TEST_EXTENSION_NAME);
opt_extensions.push_back(XR_KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS_EXTENSION_NAME);
+ opt_extensions.push_back(XR_EXT_USER_PRESENCE_EXTENSION_NAME);
opt_extensions.push_back(XR_KHR_VISIBILITY_MASK_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_COMPOSITION_LAYER_SETTINGS_EXTENSION_NAME);
diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp
index e89605e5..f4c85870 100644
--- a/client/scenes/stream.cpp
+++ b/client/scenes/stream.cpp
@@ -21,6 +21,7 @@
#include "xr/fb_face_tracker2.h"
#include "xr/htc_body_tracker.h"
#include "xr/pico_body_tracker.h"
+#include
#define GLM_FORCE_RADIANS
#include "stream.h"
@@ -217,6 +218,7 @@ std::shared_ptr scenes::stream::create(std::unique_ptrinstance.has_extension(XR_EXT_USER_PRESENCE_EXTENSION_NAME) && self->system.user_presence_properties().supportsUserPresence;
if (config.check_feature(feature::face_tracking))
{
@@ -1287,6 +1289,11 @@ void scenes::stream::on_xr_event(const xr::event & event)
.view_index = uint8_t(event.visibility_mask_changed.viewIndex),
});
break;
+ case XR_TYPE_EVENT_DATA_USER_PRESENCE_CHANGED_EXT:
+ network_session->send_control(from_headset::user_presence_changed{
+ .present = (bool)event.user_presence_changed.isUserPresent,
+ });
+ break;
case XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED:
on_interaction_profile_changed(event.interaction_profile_changed);
break;
diff --git a/client/xr/instance.h b/client/xr/instance.h
index 16b5a654..e4c28f5f 100644
--- a/client/xr/instance.h
+++ b/client/xr/instance.h
@@ -43,6 +43,7 @@ union event
XrEventDataDisplayRefreshRateChangedFB refresh_rate_changed;
XrEventDataPassthroughStateChangedFB passthrough_state_changed;
XrEventDataVisibilityMaskChangedKHR visibility_mask_changed;
+ XrEventDataUserPresenceChangedEXT user_presence_changed;
};
class instance : public utils::handle
{
diff --git a/client/xr/system.cpp b/client/xr/system.cpp
index 0c88054d..50c5acfc 100644
--- a/client/xr/system.cpp
+++ b/client/xr/system.cpp
@@ -105,6 +105,24 @@ XrSystemEyeGazeInteractionPropertiesEXT xr::system::eye_gaze_interaction_propert
return eye_gaze_prop;
}
+XrSystemUserPresencePropertiesEXT xr::system::user_presence_properties() const
+{
+ if (!id)
+ throw std::invalid_argument("this");
+
+ XrSystemUserPresencePropertiesEXT presence_prop{
+ .type = XR_TYPE_SYSTEM_USER_PRESENCE_PROPERTIES_EXT,
+ };
+
+ XrSystemProperties prop{
+ .type = XR_TYPE_SYSTEM_PROPERTIES,
+ .next = &presence_prop,
+ };
+ CHECK_XR(xrGetSystemProperties(*inst, id, &prop));
+
+ return presence_prop;
+}
+
XrSystemFaceTrackingProperties2FB xr::system::fb_face_tracking2_properties() const
{
if (!id)
diff --git a/client/xr/system.h b/client/xr/system.h
index 45e7729b..9905dca8 100644
--- a/client/xr/system.h
+++ b/client/xr/system.h
@@ -62,6 +62,7 @@ public:
XrSystemProperties properties() const;
XrSystemHandTrackingPropertiesEXT hand_tracking_properties() const;
XrSystemEyeGazeInteractionPropertiesEXT eye_gaze_interaction_properties() const;
+ XrSystemUserPresencePropertiesEXT user_presence_properties() const;
XrSystemFaceTrackingProperties2FB fb_face_tracking2_properties() const;
XrSystemFacialTrackingPropertiesHTC htc_face_tracking_properties() const;
XrSystemBodyTrackingPropertiesFB fb_body_tracking_properties() const;
diff --git a/common/wivrn_packets.h b/common/wivrn_packets.h
index 52b9bb0d..ac829131 100644
--- a/common/wivrn_packets.h
+++ b/common/wivrn_packets.h
@@ -216,6 +216,7 @@ struct headset_info_packet
std::array fov;
bool hand_tracking;
bool eye_gaze;
+ bool presence;
bool palm_pose;
bool passthrough;
face_type face_tracking;
@@ -409,6 +410,11 @@ struct refresh_rate_changed
float to;
};
+struct user_presence_changed
+{
+ bool present;
+};
+
using packets = std::variant<
crypto_handshake,
pin_check_1,
@@ -426,7 +432,8 @@ using packets = std::variant<
timesync_response,
battery,
visibility_mask_changed,
- refresh_rate_changed>;
+ refresh_rate_changed,
+ user_presence_changed>;
} // namespace from_headset
namespace to_headset
diff --git a/server/driver/wivrn_hmd.cpp b/server/driver/wivrn_hmd.cpp
index a07a42fd..755f9470 100644
--- a/server/driver/wivrn_hmd.cpp
+++ b/server/driver/wivrn_hmd.cpp
@@ -76,10 +76,12 @@ wivrn_hmd::wivrn_hmd(wivrn::wivrn_session * cnx,
.supported = {
.orientation_tracking = true,
.position_tracking = true,
+ .presence = info.presence,
.battery_status = true,
},
.update_inputs = [](xrt_device *) { return XRT_SUCCESS; },
.get_tracked_pose = method_pointer<&wivrn_hmd::get_tracked_pose>,
+ .get_presence = method_pointer<&wivrn_hmd::get_presence>,
.get_view_poses = method_pointer<&wivrn_hmd::get_view_poses>,
.get_visibility_mask = method_pointer<&wivrn_hmd::get_visibility_mask>,
.get_battery_status = method_pointer<&wivrn_hmd::get_battery_status>,
@@ -147,6 +149,13 @@ void wivrn_hmd::update_battery(const from_headset::battery & new_battery)
battery = new_battery;
}
+xrt_result_t wivrn_hmd::get_presence(bool * out_presence)
+{
+ *out_presence = presence;
+
+ return XRT_SUCCESS;
+}
+
xrt_result_t wivrn_hmd::get_view_poses(const xrt_vec3 * default_eye_relation,
int64_t at_timestamp_ns,
uint32_t view_count,
@@ -222,4 +231,10 @@ void wivrn_hmd::update_visibility_mask(const from_headset::visibility_mask_chang
auto m = visibility_mask.lock();
m->at(mask.view_index) = mask.data;
}
+
+void wivrn_hmd::update_presence(bool presence)
+{
+ U_LOG_I("Updating user presence to %s", presence ? "true" : "false");
+ this->presence = presence;
+}
} // namespace wivrn
diff --git a/server/driver/wivrn_hmd.h b/server/driver/wivrn_hmd.h
index c90f4f4b..275e967e 100644
--- a/server/driver/wivrn_hmd.h
+++ b/server/driver/wivrn_hmd.h
@@ -53,6 +53,7 @@ class wivrn_hmd : public xrt_device
view_list views;
from_headset::battery battery{};
+ std::atomic presence{true};
thread_safe, 2>> visibility_mask;
wivrn::wivrn_session * cnx;
@@ -67,6 +68,7 @@ public:
void set_foveated_size(uint32_t width, uint32_t height);
xrt_result_t get_tracked_pose(xrt_input_name name, int64_t at_timestamp_ns, xrt_space_relation *);
+ xrt_result_t get_presence(bool * out_presence);
xrt_result_t get_view_poses(const xrt_vec3 * default_eye_relation,
int64_t at_timestamp_ns,
uint32_t view_count,
@@ -80,5 +82,6 @@ public:
void update_battery(const from_headset::battery &);
void update_tracking(const from_headset::tracking &, const clock_offset &);
void update_visibility_mask(const from_headset::visibility_mask_changed &);
+ void update_presence(bool presence);
};
} // namespace wivrn
diff --git a/server/driver/wivrn_session.cpp b/server/driver/wivrn_session.cpp
index 5475de30..ea1e6968 100644
--- a/server/driver/wivrn_session.cpp
+++ b/server/driver/wivrn_session.cpp
@@ -576,6 +576,18 @@ void wivrn_session::operator()(from_headset::visibility_mask_changed && mask)
auto result = xrt_session_event_sink_push(&xrt_system.broadcast, &event);
}
+void wivrn_session::operator()(from_headset::user_presence_changed && event)
+{
+ hmd.update_presence(event.present);
+ push_event(
+ {
+ .presence_change = {
+ .type = XRT_SESSION_EVENT_USER_PRESENCE_CHANGE,
+ .is_user_present = event.present,
+ },
+ });
+}
+
void wivrn_session::operator()(from_headset::refresh_rate_changed && event)
{
{
diff --git a/server/driver/wivrn_session.h b/server/driver/wivrn_session.h
index 93ee8a93..63ea1168 100644
--- a/server/driver/wivrn_session.h
+++ b/server/driver/wivrn_session.h
@@ -179,6 +179,7 @@ public:
void operator()(from_headset::feedback &&);
void operator()(from_headset::battery &&);
void operator()(from_headset::visibility_mask_changed &&);
+ void operator()(from_headset::user_presence_changed &&);
void operator()(from_headset::refresh_rate_changed &&);
void operator()(audio_data &&);
From 8e2719ff30cd2bec6ebb7975f5d25fd7c4c0efff Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Fri, 4 Jul 2025 23:11:08 +0200
Subject: [PATCH 043/135] Update NDK to 28
---
build.gradle | 2 +-
client/render/scene_renderer.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.gradle b/build.gradle
index cfdb5663..06e64d97 100644
--- a/build.gradle
+++ b/build.gradle
@@ -55,7 +55,7 @@ task "generatePngs"() {
android {
namespace "org.meumeu.wivrn"
- ndkVersion "27.1.12297006"
+ ndkVersion "28.1.13356709"
lint {
disable += "ExpiredTargetSdkVersion"
diff --git a/client/render/scene_renderer.cpp b/client/render/scene_renderer.cpp
index e2d8dc34..79b9187d 100644
--- a/client/render/scene_renderer.cpp
+++ b/client/render/scene_renderer.cpp
@@ -717,7 +717,7 @@ scene_renderer::per_frame_resources & scene_renderer::current_frame()
void scene_renderer::update_material_descriptor_set(scene_data::material & material)
{
- if (!material.ds || !material.ds.unique())
+ if (!material.ds || material.ds.use_count() != 1)
material.ds = ds_pool_material.allocate();
vk::DescriptorSet ds = **material.ds;
From 5bfc9ed9423a3fffcd5ce372556da844610228b8 Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Sat, 5 Jul 2025 06:33:39 -0500
Subject: [PATCH 044/135] Forward session state to server
Closes #395
---
client/scenes/stream.cpp | 6 +++-
common/wivrn_packets.h | 6 +++-
server/driver/wivrn_hmd.cpp | 27 +++++++++++++---
server/driver/wivrn_hmd.h | 7 ++++-
server/driver/wivrn_session.cpp | 55 ++++++++++++++++++++++++++++++---
server/driver/wivrn_session.h | 1 +
6 files changed, 90 insertions(+), 12 deletions(-)
diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp
index f4c85870..a3788579 100644
--- a/client/scenes/stream.cpp
+++ b/client/scenes/stream.cpp
@@ -218,7 +218,6 @@ std::shared_ptr scenes::stream::create(std::unique_ptrinstance.has_extension(XR_EXT_USER_PRESENCE_EXTENSION_NAME) && self->system.user_presence_properties().supportsUserPresence;
if (config.check_feature(feature::face_tracking))
{
@@ -1289,6 +1288,11 @@ void scenes::stream::on_xr_event(const xr::event & event)
.view_index = uint8_t(event.visibility_mask_changed.viewIndex),
});
break;
+ case XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED:
+ network_session->send_control(from_headset::session_state_changed{
+ .state = event.state_changed.state,
+ });
+ break;
case XR_TYPE_EVENT_DATA_USER_PRESENCE_CHANGED_EXT:
network_session->send_control(from_headset::user_presence_changed{
.present = (bool)event.user_presence_changed.isUserPresent,
diff --git a/common/wivrn_packets.h b/common/wivrn_packets.h
index ac829131..e08453c5 100644
--- a/common/wivrn_packets.h
+++ b/common/wivrn_packets.h
@@ -216,7 +216,6 @@ struct headset_info_packet
std::array fov;
bool hand_tracking;
bool eye_gaze;
- bool presence;
bool palm_pose;
bool passthrough;
face_type face_tracking;
@@ -410,6 +409,10 @@ struct refresh_rate_changed
float to;
};
+struct session_state_changed
+{
+ XrSessionState state;
+};
struct user_presence_changed
{
bool present;
@@ -433,6 +436,7 @@ using packets = std::variant<
battery,
visibility_mask_changed,
refresh_rate_changed,
+ session_state_changed,
user_presence_changed>;
} // namespace from_headset
diff --git a/server/driver/wivrn_hmd.cpp b/server/driver/wivrn_hmd.cpp
index 755f9470..18cbac36 100644
--- a/server/driver/wivrn_hmd.cpp
+++ b/server/driver/wivrn_hmd.cpp
@@ -76,7 +76,7 @@ wivrn_hmd::wivrn_hmd(wivrn::wivrn_session * cnx,
.supported = {
.orientation_tracking = true,
.position_tracking = true,
- .presence = info.presence,
+ .presence = true,
.battery_status = true,
},
.update_inputs = [](xrt_device *) { return XRT_SUCCESS; },
@@ -232,9 +232,28 @@ void wivrn_hmd::update_visibility_mask(const from_headset::visibility_mask_chang
m->at(mask.view_index) = mask.data;
}
-void wivrn_hmd::update_presence(bool presence)
+bool wivrn_hmd::update_presence(bool new_presence, bool real)
{
- U_LOG_I("Updating user presence to %s", presence ? "true" : "false");
- this->presence = presence;
+ // if this presence change comes from headset, always honor it,
+ // otherwise try to keep it in sync with the real presence,
+ // while still changing presence to false when session is not
+ // visible
+ if (real || new_presence == this->real_presence || !new_presence)
+ {
+ if (real && this->real_presence != new_presence)
+ {
+ U_LOG_I("Updating real user presence: %s -> %s", real_presence ? "true" : "false", new_presence ? "true" : "false");
+ this->real_presence = new_presence;
+ }
+
+ if (this->presence == new_presence)
+ return false;
+
+ U_LOG_I("Updating user presence: %s -> %s", this->presence ? "true" : "false", new_presence ? "true" : "false");
+ this->presence = new_presence;
+ return true;
+ }
+
+ return false;
}
} // namespace wivrn
diff --git a/server/driver/wivrn_hmd.h b/server/driver/wivrn_hmd.h
index 275e967e..797cbbd2 100644
--- a/server/driver/wivrn_hmd.h
+++ b/server/driver/wivrn_hmd.h
@@ -54,6 +54,10 @@ class wivrn_hmd : public xrt_device
from_headset::battery battery{};
std::atomic presence{true};
+ // last XR_EVENT_DATA_USER_PRESENCE_CHANGED_EXT from headset
+ // we must keep track of this to not go out of sync with headset when
+ // a session state change also triggers presence change
+ std::atomic real_presence{true};
thread_safe, 2>> visibility_mask;
wivrn::wivrn_session * cnx;
@@ -82,6 +86,7 @@ public:
void update_battery(const from_headset::battery &);
void update_tracking(const from_headset::tracking &, const clock_offset &);
void update_visibility_mask(const from_headset::visibility_mask_changed &);
- void update_presence(bool presence);
+ // real if this update comes from a presence changed event
+ bool update_presence(bool new_presence, bool real);
};
} // namespace wivrn
diff --git a/server/driver/wivrn_session.cpp b/server/driver/wivrn_session.cpp
index ea1e6968..7a50da03 100644
--- a/server/driver/wivrn_session.cpp
+++ b/server/driver/wivrn_session.cpp
@@ -39,6 +39,7 @@
#include "wivrn_ipc.h"
#include "wivrn_packets.h"
+#include "xr/to_string.h"
#include "xrt/xrt_device.h"
#include "xrt/xrt_session.h"
#include
@@ -576,17 +577,61 @@ void wivrn_session::operator()(from_headset::visibility_mask_changed && mask)
auto result = xrt_session_event_sink_push(&xrt_system.broadcast, &event);
}
-void wivrn_session::operator()(from_headset::user_presence_changed && event)
+void wivrn_session::operator()(from_headset::session_state_changed && event)
{
- hmd.update_presence(event.present);
+ U_LOG_I("Session state changed: %s", xr::to_string(event.state));
+ bool visible, focused;
+ bool changed = false;
+ switch (event.state)
+ {
+ case XR_SESSION_STATE_SYNCHRONIZED:
+ visible = false;
+ focused = false;
+ changed = hmd.update_presence(false, false);
+ break;
+ case XR_SESSION_STATE_VISIBLE:
+ visible = true;
+ focused = false;
+ changed = hmd.update_presence(true, false);
+ break;
+ case XR_SESSION_STATE_FOCUSED:
+ visible = true;
+ focused = true;
+ changed = hmd.update_presence(true, false);
+ break;
+ default:
+ return;
+ }
+
+ if (changed)
+ {
+ xrt_session_event_user_presence_change event = {
+ .type = XRT_SESSION_EVENT_USER_PRESENCE_CHANGE,
+ };
+ hmd.get_presence(&event.is_user_present);
+ push_event({.presence_change = event});
+ }
+
push_event(
{
- .presence_change = {
- .type = XRT_SESSION_EVENT_USER_PRESENCE_CHANGE,
- .is_user_present = event.present,
+ .state = {
+ .type = XRT_SESSION_EVENT_STATE_CHANGE,
+ .visible = visible,
+ .focused = focused,
},
});
}
+void wivrn_session::operator()(from_headset::user_presence_changed && event)
+{
+ if (hmd.update_presence(event.present, true))
+ push_event(
+ {
+ .presence_change = {
+ .type = XRT_SESSION_EVENT_USER_PRESENCE_CHANGE,
+ .is_user_present = event.present,
+ },
+ });
+}
void wivrn_session::operator()(from_headset::refresh_rate_changed && event)
{
diff --git a/server/driver/wivrn_session.h b/server/driver/wivrn_session.h
index 63ea1168..43930f07 100644
--- a/server/driver/wivrn_session.h
+++ b/server/driver/wivrn_session.h
@@ -179,6 +179,7 @@ public:
void operator()(from_headset::feedback &&);
void operator()(from_headset::battery &&);
void operator()(from_headset::visibility_mask_changed &&);
+ void operator()(from_headset::session_state_changed &&);
void operator()(from_headset::user_presence_changed &&);
void operator()(from_headset::refresh_rate_changed &&);
void operator()(audio_data &&);
From b66ca2e5613dc7c6ec78195ce48916fe6a45da26 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Sat, 5 Jul 2025 19:53:49 +0200
Subject: [PATCH 045/135] Ignore visibility mask errors on connection
---
client/scenes/stream.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp
index a3788579..fc226175 100644
--- a/client/scenes/stream.cpp
+++ b/client/scenes/stream.cpp
@@ -268,9 +268,16 @@ std::shared_ptr scenes::stream::create(std::unique_ptrnetwork_session->send_control(from_headset::visibility_mask_changed{
- .data = get_visibility_mask(self->instance, self->session, view),
- .view_index = view});
+ try
+ {
+ self->network_session->send_control(from_headset::visibility_mask_changed{
+ .data = get_visibility_mask(self->instance, self->session, view),
+ .view_index = view});
+ }
+ catch (std::exception & e)
+ {
+ spdlog::warn("Failed to get visibility mask: ", e.what());
+ }
}
}
From fafe01b76a6d70531790e0816d91812a6fa4bd88 Mon Sep 17 00:00:00 2001
From: Guillaume Meunier
Date: Sat, 5 Jul 2025 21:38:36 +0200
Subject: [PATCH 046/135] Enable passthrough in splash screen
---
AndroidManifest.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index dddc5896..7f9b6505 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -88,6 +88,8 @@
+
+
From c9e078bd476a70e8e453b0ea345694b12677ec62 Mon Sep 17 00:00:00 2001
From: Guillaume Meunier
Date: Sun, 6 Jul 2025 09:09:48 +0200
Subject: [PATCH 047/135] Avoid segfault if xrCreatePassthroughFB fails
---
client/xr/passthrough.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/xr/passthrough.cpp b/client/xr/passthrough.cpp
index 8e7dc568..dbbc0823 100644
--- a/client/xr/passthrough.cpp
+++ b/client/xr/passthrough.cpp
@@ -51,6 +51,7 @@ xr::passthrough_layer_fb::passthrough_layer_fb(instance & inst, session & s, con
static XrPassthroughFB create_passthrough_fb(xr::instance & inst, xr::session & s)
{
PFN_xrCreatePassthroughFB xrCreatePassthroughFB = inst.get_proc("xrCreatePassthroughFB");
+ xrDestroyPassthroughFB = inst.get_proc("xrDestroyPassthroughFB");
XrPassthroughFB id;
XrPassthroughCreateInfoFB info{
@@ -71,7 +72,6 @@ xr::passthrough_fb::passthrough_fb(instance & inst, session & s) :
.purpose = XR_PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION_FB,
})
{
- xrDestroyPassthroughFB = inst.get_proc("xrDestroyPassthroughFB");
xrPassthroughStartFB = inst.get_proc("xrPassthroughStartFB");
xrPassthroughPauseFB = inst.get_proc("xrPassthroughPauseFB");
xrPassthroughLayerPauseFB = inst.get_proc("xrPassthroughLayerPauseFB");
From be504b5944459a26f8976b224187be1b6d746e2a Mon Sep 17 00:00:00 2001
From: Guillaume Meunier
Date: Sun, 6 Jul 2025 09:42:34 +0200
Subject: [PATCH 048/135] Add controller offset for Quest 3
---
client/hardware.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/client/hardware.cpp b/client/hardware.cpp
index c558deff..745be7bf 100644
--- a/client/hardware.cpp
+++ b/client/hardware.cpp
@@ -348,6 +348,24 @@ std::pair controller_offset(std::string_view profile, xr::
default:
break;
}
+ else if (profile == "meta-quest-touch-plus")
+ {
+ switch (space)
+ {
+ case xr::spaces::grip_left:
+ case xr::spaces::grip_right:
+ return {{0, -0.010, -0.025}, glm::angleAxis(glm::radians(-12.f), glm::vec3{1, 0, 0})};
+
+ case xr::spaces::aim_left:
+ return {{0, 0, 0.03}, {1, 0, 0, 0}};
+
+ case xr::spaces::aim_right:
+ return {{0, 0, 0.03}, {1, 0, 0, 0}};
+
+ default:
+ break;
+ }
+ }
else if (profile == "htc-vive-focus-3")
switch (space)
{
From fbe5430dc2b2cd4006d0e46a6e39a668b677b57b Mon Sep 17 00:00:00 2001
From: Sapphire
Date: Sun, 6 Jul 2025 02:31:30 -0500
Subject: [PATCH 049/135] Skip Nix CI step for apk repo
---
.github/workflows/Build.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml
index d6ad8099..df2800ed 100644
--- a/.github/workflows/Build.yml
+++ b/.github/workflows/Build.yml
@@ -153,11 +153,13 @@ jobs:
nix-test:
name: Test Nix package and devshell
runs-on: ubuntu-24.04
+ if: ${{ vars.APK_ONLY == '' }}
+
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
-
+
- uses: cachix/install-nix-action@v31
- run: nix flake check
- run: nix build
From 11cd9235d915709a5eb84927c4da7d7be5abe2a1 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas
Date: Thu, 3 Jul 2025 21:43:49 +0200
Subject: [PATCH 050/135] Allow multiple configuration files
Will merge contents from
@CMAKE_INSTALL_PREFIX@/share/wivrn/config.json
/etc/wivrn/config.json
~/.config/wivrn.config.json (XDG_CONFIG_DIR in fact)
If -f option is provided, just parse that file, don't merge anything
---
docs/configuration.md | 8 ++-
server/active_runtime.cpp | 2 +-
server/driver/configuration.cpp | 99 ++++++++++++++++++++---------
server/driver/configuration.h | 7 +-
server/driver/wivrn_connection.cpp | 2 +-
server/driver/wivrn_controller.cpp | 2 +-
server/driver/wivrn_hmd.cpp | 2 +-
server/driver/wivrn_session.cpp | 2 +-
server/encoder/encoder_settings.cpp | 8 ---
server/main.cpp | 18 ++++--
server/start_application.cpp | 2 +-
11 files changed, 99 insertions(+), 53 deletions(-)
diff --git a/docs/configuration.md b/docs/configuration.md
index 5e52937f..ffc1ec76 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,6 +1,12 @@
# Configurable items
-Configuration is done on server side, in `$XDG_CONFIG_HOME/wivrn/config.json` or if `$XDG_CONFIG_HOME` is not set, `$HOME/.config/wivrn/config.json`.
+Configuration is done on server side.
+Files are read from
+- `/usr/share/wivrn/config.json` (where `/usr` is selected at configure time with `CMAKE_INSTALL_PREFIX`)
+- `/etc/wivrn/config.json`
+- `$XDG_CONFIG_HOME/wivrn/config.json` or if `$XDG_CONFIG_HOME` is not set, `$HOME/.config/wivrn/config.json`.
+
+Files later in the list replace top-level values from previous ones.
All elements are optional and have default values.
diff --git a/server/active_runtime.cpp b/server/active_runtime.cpp
index 84022a88..532f0531 100644
--- a/server/active_runtime.cpp
+++ b/server/active_runtime.cpp
@@ -76,7 +76,7 @@ std::filesystem::path active_runtime::openvr_compat_path()
return std::filesystem::path();
},
},
- configuration::read_user_configuration().openvr_compat_path);
+ configuration().openvr_compat_path);
}
static std::filesystem::path backup_name(std::filesystem::path file)
diff --git a/server/driver/configuration.cpp b/server/driver/configuration.cpp
index 2f7fc4b6..7bcd7a0f 100644
--- a/server/driver/configuration.cpp
+++ b/server/driver/configuration.cpp
@@ -19,6 +19,8 @@
#define JSON_DISABLE_ENUM_SERIALIZATION 1
+#include "configuration.h"
+
#include
#include
#include
@@ -31,10 +33,10 @@
#include "util/u_logging.h"
-#include "configuration.h"
#include "utils/xdg_base_directory.h"
+#include "wivrn_config.h"
-static std::filesystem::path config_file = xdg_config_home() / "wivrn" / "config.json";
+static std::filesystem::path config_file;
static std::filesystem::path known_keys_file = xdg_config_home() / "wivrn" / "known_keys.json";
static std::filesystem::path cookie_file = xdg_config_home() / "wivrn" / "cookie";
@@ -65,12 +67,56 @@ void configuration::set_config_file(const std::filesystem::path & path)
{
config_file = path;
}
-
-const std::filesystem::path & configuration::get_config_file()
+std::filesystem::path configuration::get_config_file()
{
+ if (config_file.empty())
+ return xdg_config_home() / "wivrn" / "config.json";
return config_file;
}
+nlohmann::json configuration::read_configuration()
+{
+ if (config_file.empty())
+ {
+ nlohmann::json merged;
+ for (std::filesystem::path prefix: {
+ std::filesystem::path(WIVRN_INSTALL_PREFIX "/share"),
+ std::filesystem::path("/etc"),
+ xdg_config_home(),
+ })
+ {
+ auto path = prefix / "wivrn" / "config.json";
+ if (std::filesystem::exists(path))
+ {
+ try
+ {
+ for (const auto & [key, value]: nlohmann::json::parse(std::ifstream(path)).get())
+ {
+ merged[key] = value;
+ }
+ }
+ catch (std::exception & e)
+ {
+ U_LOG_E("Invalid configuration file %s: %s", path.c_str(), e.what());
+ }
+ }
+ }
+ return merged;
+ }
+ else
+ {
+ try
+ {
+ return nlohmann::json::parse(std::ifstream(config_file));
+ }
+ catch (std::exception & e)
+ {
+ U_LOG_E("Invalid configuration file %s: %s", config_file.c_str(), e.what());
+ return nlohmann::json();
+ }
+ }
+}
+
configuration::encoder parse_encoder(const nlohmann::json & item)
{
configuration::encoder e;
@@ -94,85 +140,78 @@ configuration::encoder parse_encoder(const nlohmann::json & item)
return e;
}
-configuration configuration::read_user_configuration()
+configuration::configuration()
{
- configuration result;
- if (not std::filesystem::exists(config_file))
- return result;
- std::ifstream file(config_file);
try
{
- auto json = nlohmann::json::parse(file);
+ auto json = read_configuration();
if (auto it = json.find("scale"); it != json.end())
{
if (it->is_number())
- result.scale = std::array{*it, *it};
+ scale = std::array{*it, *it};
else
- result.scale = *it;
+ scale = *it;
}
if (auto it = json.find("grip-surface"); it != json.end())
{
- result.grip_surface = *it;
+ grip_surface = *it;
}
if (auto it = json.find("bitrate"); it != json.end())
- result.bitrate = *it;
+ bitrate = *it;
if (auto it = json.find("encoders"); it != json.end())
{
for (const auto & encoder: *it)
- result.encoders.push_back(parse_encoder(encoder));
+ encoders.push_back(parse_encoder(encoder));
}
if (auto it = json.find("encoder-passthrough"); it != json.end())
- result.encoder_passthrough = parse_encoder(*it);
+ encoder_passthrough = parse_encoder(*it);
if (auto it = json.find("application"); it != json.end())
{
if (it->is_string())
- result.application.push_back(*it);
+ application.push_back(*it);
else
{
for (const auto & i: *it)
- result.application.push_back(i);
+ application.push_back(i);
}
}
if (auto it = json.find("debug-gui"); it != json.end())
- result.debug_gui = *it;
+ debug_gui = *it;
if (auto it = json.find("use-steamvr-lh"); it != json.end())
- result.use_steamvr_lh = *it;
+ use_steamvr_lh = *it;
if (auto it = json.find("tcp-only"); it != json.end())
- result.tcp_only = *it;
+ tcp_only = *it;
else if (auto it = json.find("tcp_only"); it != json.end())
- result.tcp_only = *it;
+ tcp_only = *it;
if (auto it = json.find("publish-service"); it != json.end())
{
- result.publication = *it;
- if (result.publication == service_publication(-1))
+ publication = *it;
+ if (publication == service_publication(-1))
throw std::runtime_error("invalid service publication " + it->get());
}
if (auto it = json.find("openvr-compat-path"); it != json.end())
{
if (it->is_null())
- result.openvr_compat_path = nullptr;
+ openvr_compat_path = nullptr;
else
- result.openvr_compat_path = *it;
+ openvr_compat_path = *it;
}
}
catch (const std::exception & e)
{
- U_LOG_E("Invalid configuration file: %s", e.what());
- return {};
+ U_LOG_E("Configuration file error: %s", e.what());
}
-
- return result;
}
std::string server_cookie()
diff --git a/server/driver/configuration.h b/server/driver/configuration.h
index 86eea9de..53c0ba80 100644
--- a/server/driver/configuration.h
+++ b/server/driver/configuration.h
@@ -23,6 +23,7 @@
#include
#include
#include