Compare commits

...
Author SHA1 Message Date
Vindicus999 731873e16c Merge remote-tracking branch 'upstream/master' 2026-01-17 01:55:50 +00:00
Guillaume Meunier 317cd6bb91 Compress quaternions in hand tracking packets 2026-01-16 18:01:05 +01:00
Vindicus999 665dc3620c Merge remote-tracking branch 'upstream/master' 2026-01-16 02:01:50 +00:00
Patrick Nicolas 3702cc05b8 Fix dissector for big vectors 2026-01-15 09:28:27 +01:00
Patrick Nicolas eeb624875e Fix dissector TCP support 2026-01-15 09:28:27 +01:00
Vindicus999 2fccafd423 Merge remote-tracking branch 'upstream/master' 2026-01-14 02:04:59 +00:00
Patrick Nicolas a49cc3dea8 Cleanup some files during ct-ng build (flatpak) 2026-01-13 19:07:37 +01:00
Patrick Nicolas cd8abacd7b Update crostool-ng 2026-01-13 14:09:42 +01:00
Patrick Nicolas 6a49861b50 Update eigen for Flatpak build 2026-01-12 23:43:49 +01:00
Patrick Nicolas 061039b645 glm hash was changed once again 2026-01-12 23:41:57 +01:00
Patrick Nicolas f963d336ab update Monado 2026-01-12 23:39:32 +01:00
Vindicus999 f5dcc4b70f Merge remote-tracking branch 'upstream/master' 2026-01-12 02:06:15 +00:00
Antti Keränen bf0a1bc184 Update flake to latest nixpkgs
- invalidateFetcherByDrvHash is now under testers
- Trim monado-rev to not break fetchFromGitlab if the file has trailing
  whitespace
2026-01-11 18:02:26 -06:00
Vindicus999 ce89cea248 Merge remote-tracking branch 'upstream/master' 2026-01-11 02:09:54 +00:00
BERADQ cdc4a8f3d6 Update Simplified Chinese localization -> close #599 2026-01-10 09:27:21 +01:00
Vindicus999 48417c5f22 Merge remote-tracking branch 'upstream/master' 2026-01-10 01:57:18 +00:00
Patrick Nicolas 5bb7310093 Fix possible crash on stream init 2026-01-09 18:04:46 +01:00
Patrick Nicolas 1de1b19201 Spawn children using systemd by default 2026-01-09 09:43:49 +01:00
Patrick Nicolas ae740acbb5 Update libnotify 2026-01-09 09:16:13 +01:00
17 changed files with 339 additions and 92 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ FetchContent_Declare(simdjson EXCLUDE_FROM_ALL SYSTEM URL https://github.co
FetchContent_Declare(fastgltf EXCLUDE_FROM_ALL SYSTEM URL https://github.com/spnda/fastgltf/archive/refs/tags/v0.9.0.tar.gz
URL_HASH SHA256=0bb564e127b14c22f062db50f89381dd2e0a20dbaf4987ca138a4ae8728712f9)
FetchContent_Declare(glm EXCLUDE_FROM_ALL SYSTEM URL https://github.com/g-truc/glm/releases/download/1.0.2/glm-1.0.2.zip
URL_HASH SHA256=203b64abc82e4d8697cc5aeedc93117fc1ee52d36e7cdcfc0854fa2c607edaae)
URL_HASH SHA256=77fff075c5ab0caf076fade41558c5458d9a242aba2b2076bb72008bdb51a35e)
FetchContent_Declare(openxr_loader EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-1.1.54.tar.gz
URL_HASH SHA256=2055688081066e37238be996534f349420ac52ed34f8514836704232121ee7f3)
FetchContent_Declare(spdlog EXCLUDE_FROM_ALL SYSTEM URL https://github.com/gabime/spdlog/archive/refs/tags/v1.16.0.tar.gz
+1 -1
View File
@@ -916,7 +916,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
int32_t max_height = 0;
for (size_t i = 0; i < view_count; ++i)
{
extents[i] = defoveator->defoveated_size(foveation[i]);
extents[i] = stream_defoveator::defoveated_size(foveation[i]);
max_width = std::max(max_width, extents[i].width);
max_height = std::max(max_height, extents[i].height);
}
+1 -1
View File
@@ -443,7 +443,7 @@ static uint16_t count_pixels(const std::vector<uint16_t> & param)
return res;
}
XrExtent2Di stream_defoveator::defoveated_size(const wivrn::to_headset::foveation_parameter & view) const
XrExtent2Di stream_defoveator::defoveated_size(const wivrn::to_headset::foveation_parameter & view)
{
return {
count_pixels(view.x),
+1 -1
View File
@@ -87,5 +87,5 @@ public:
const std::array<input, 2> & inputs,
int destination);
XrExtent2Di defoveated_size(const wivrn::to_headset::foveation_parameter &) const;
static XrExtent2Di defoveated_size(const wivrn::to_headset::foveation_parameter &);
};
+2 -1
View File
@@ -207,7 +207,8 @@ static std::optional<std::array<from_headset::hand_tracking::pose, XR_HAND_JOINT
for (int i = 0; i < XR_HAND_JOINT_COUNT_EXT; i++)
{
poses[i] = {
.pose = (*joints)[i].first.pose,
.position = (*joints)[i].first.pose.position,
.orientation = pack((*joints)[i].first.pose.orientation),
.linear_velocity = (*joints)[i].second.linearVelocity,
.angular_velocity = (*joints)[i].second.angularVelocity,
.radius = uint16_t((*joints)[i].first.radius * 10'000),
+105
View File
@@ -0,0 +1,105 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 Guillaume Meunier <guillaume.meunier@centraliens.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <openxr/openxr.h>
struct packed_quaternion
{
uint32_t value;
static packed_quaternion from_quaternion(const XrQuaternionf & q)
{
assert(std::abs(q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z - 1) < 0.01);
float abs_w = std::abs(q.w);
float abs_x = std::abs(q.x);
float abs_y = std::abs(q.y);
float abs_z = std::abs(q.z);
const float scale_factor = 511 * std::sqrt(2);
if (abs_x > std::max({abs_y, abs_z, abs_w}))
{
uint32_t q1 = q.y * std::copysign(scale_factor, q.x) + 512.5;
uint32_t q2 = q.z * std::copysign(scale_factor, q.x) + 512.5;
uint32_t q3 = q.w * std::copysign(scale_factor, q.x) + 512.5;
return {(0 << 30) | (q1 << 20) | (q2 << 10) | q3};
}
else if (abs_y > std::max({abs_x, abs_z, abs_w}))
{
uint32_t q1 = q.x * std::copysign(scale_factor, q.y) + 512.5;
uint32_t q2 = q.z * std::copysign(scale_factor, q.y) + 512.5;
uint32_t q3 = q.w * std::copysign(scale_factor, q.y) + 512.5;
return {(1 << 30) | (q1 << 20) | (q2 << 10) | q3};
}
else if (abs_z > std::max({abs_x, abs_y, abs_w}))
{
uint32_t q1 = q.x * std::copysign(scale_factor, q.z) + 512.5;
uint32_t q2 = q.y * std::copysign(scale_factor, q.z) + 512.5;
uint32_t q3 = q.w * std::copysign(scale_factor, q.z) + 512.5;
return {(2 << 30) | (q1 << 20) | (q2 << 10) | q3};
}
else
{
uint32_t q1 = q.x * std::copysign(scale_factor, q.w) + 512.5;
uint32_t q2 = q.y * std::copysign(scale_factor, q.w) + 512.5;
uint32_t q3 = q.z * std::copysign(scale_factor, q.w) + 512.5;
return {(3 << 30) | (q1 << 20) | (q2 << 10) | q3};
}
}
operator XrQuaternionf() const
{
const float scale_factor = 1. / (511 * std::sqrt(2));
float q1 = (int((value >> 20) & 0x3ff) - 512) * scale_factor;
float q2 = (int((value >> 10) & 0x3ff) - 512) * scale_factor;
float q3 = (int((value >> 0) & 0x3ff) - 512) * scale_factor;
float q0 = std::sqrt(1 - q1 * q1 - q2 * q2 - q3 * q3);
switch (value >> 30)
{
case 0:
return {q0, q1, q2, q3};
case 1:
return {q1, q0, q2, q3};
case 2:
return {q1, q2, q0, q3};
case 3:
return {q1, q2, q3, q0};
}
__builtin_unreachable();
}
};
inline packed_quaternion pack(const XrQuaternionf & q)
{
return packed_quaternion::from_quaternion(q);
}
+3 -1
View File
@@ -32,6 +32,7 @@
#include <vulkan/vulkan_core.h>
#include <openxr/openxr.h>
#include "packed_quaternion.h"
#include "smp.h"
#include "wivrn_serialization_types.h"
@@ -372,7 +373,8 @@ struct hand_tracking
};
struct pose
{
XrPosef pose;
XrVector3f position;
packed_quaternion orientation;
XrVector3f linear_velocity;
XrVector3f angular_velocity;
// In order to avoid packet fragmentation
Generated
+9 -9
View File
@@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1758690382,
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
"lastModified": 1767892417,
"narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
"type": "github"
},
"original": {
@@ -36,11 +36,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1754788789,
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"lastModified": 1765674936,
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
"type": "github"
},
"original": {
+3 -3
View File
@@ -52,13 +52,13 @@
monado = pkgs.applyPatches {
inherit (oldAttrs.monado) patches postPatch;
# Force a refetch when the monado rev changes.
src = pkgs.invalidateFetcherByDrvHash pkgs.fetchFromGitLab {
src = pkgs.testers.invalidateFetcherByDrvHash pkgs.fetchFromGitLab {
inherit (oldAttrs.monado.src) owner repo;
domain = "gitlab.freedesktop.org";
# Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev;
rev = lib.strings.trim (builtins.readFile ./monado-rev);
# Nix will output the correct hash when it doesn't match
hash = "sha256-nlfrx6NRYV9eMs+Rb9JBh+mwucL6v+bB3jBrPsSxh+Q=";
hash = "sha256-zU8TLRzd4pb9KzVT/xana6rArcSu31wlCD54p7PJ9UY=";
};
};
+12 -4
View File
@@ -72,11 +72,19 @@ modules:
sources:
- type: git
url: https://github.com/crosstool-ng/crosstool-ng.git
tag: 70c2b00ad79a0a21a48e5a0eedc9f91c374af21d
tag: 620b909cd0713f68084378b63cf61b5232757b90
- type: shell
commands:
# Make the build lighter:
# don't generate debug symbols at all
- sed -i 's/-O2 -g/-O2/' scripts/crosstool-NG.sh
- sed -i 's/-g -O2/-O2/' scripts/build/cc/gcc.sh
# Delete extracted sources when no longer needed
- sed -i '/# Cleanup/a rm -r "$(readlink "${kernel_path}")"' scripts/build/kernel/linux.sh
# Delete tarballs once extracted
- sed -i '2228i CT_DoExecLog FILE rm "$(readlink -f "${file}")"' scripts/functions
# Delete big test files
- sed -i '/CT_ExtractPatch GCC/a CT_Pushd "${CT_SRC_DIR}/gcc/gcc/testsuite/";CT_DoExecLog ALL rm -rf $(ls -1 | grep -v selftests);CT_Popd' scripts/build/cc/gcc.sh
cleanup:
- '*'
@@ -221,7 +229,7 @@ modules:
sources:
- type: git
url: https://gitlab.com/libeigen/eigen.git
tag: 3.4.0
tag: 5.0.1
cleanup:
- '*'
@@ -258,8 +266,8 @@ modules:
- -Ddocbook_docs=disabled
sources:
- type: archive
url: https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.7.tar.xz
sha256: 4be15202ec4184fce1ac15997ece5530d2be32fe9573875aeb10e3b573858748
url: https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.8.tar.xz
sha256: 23420ef619dc2cb5aebad613f4823a2fa41c07e5a1d05628d40f6ec4b35bfddd
x-checker-data:
type: gnome
name: libnotify
+120 -50
View File
@@ -2,14 +2,14 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the WiVRn-dashboard package.
# Jayden Ha <jayden@jaydenha.uk>, 2025.
# BERADQ <adqber123@outlook.com>, 2025.
# BERADQ <adqber123@outlook.com>, 2025-2026.
#
msgid ""
msgstr ""
"Project-Id-Version: WiVRn-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-13 18:28+0800\n"
"PO-Revision-Date: 2025-12-14 20:11+0800\n"
"POT-Creation-Date: 2026-01-07 16:11+0800\n"
"PO-Revision-Date: 2026-01-10 13:46+0800\n"
"Last-Translator: BERADQ <adqber123@outlook.com>\n"
"Language-Team: Chinese (China)\n"
"Language: zh_CN\n"
@@ -69,10 +69,39 @@ msgstr "'adb install' 执行失败: 终止代码 %1"
msgid "Installation successful"
msgstr "安装成功"
#: dashboard/main.cpp:27 dashboard/qml/Main.qml:12
#: dashboard/main.cpp:26
#, kde-format
msgid "WiVRn dashboard"
msgstr "WiVRn 控制面板"
msgctxt "@title"
msgid "WiVRn"
msgstr "WiVRn"
#: dashboard/main.cpp:28
#, kde-format
msgid "WiVRn server"
msgstr "WiVRn 服务端"
#: dashboard/main.cpp:30
#, kde-format
msgid "(c) 2022-2026 WiVRn development team"
msgstr "(c) 2022-2026 WiVRn 开发团队"
#: dashboard/main.cpp:40
#, kde-format
msgid "Monado"
msgstr "Monado"
#: dashboard/main.cpp:41
#, kde-format
msgid "OpenXR runtime"
msgstr "OpenXR 运行时"
#: dashboard/qml/About.qml:17 dashboard/qml/ApkInstallPage.qml:65
#: dashboard/qml/HeadsetsPage.qml:183 dashboard/qml/HeadsetStatsPage.qml:36
#: dashboard/qml/TroubleshootPage.qml:71
#, kde-format
msgctxt "go back to the home page"
msgid "Back"
msgstr "返回"
#: dashboard/qml/ApkInstallPage.qml:12 dashboard/qml/WizardPage.qml:137
#, kde-format
@@ -90,8 +119,8 @@ msgstr "正在检查最新版本..."
msgid "No APK is available for this version"
msgstr "此版本无预编译 APK"
#: dashboard/qml/ApkInstallPage.qml:45 dashboard/qml/Main.qml:321
#: dashboard/qml/Main.qml:386 dashboard/qml/WizardPage.qml:211
#: dashboard/qml/ApkInstallPage.qml:45 dashboard/qml/Main.qml:350
#: dashboard/qml/Main.qml:408 dashboard/qml/WizardPage.qml:211
#: dashboard/qml/WizardPage.qml:337
#, kde-format
msgid "ADB is not installed"
@@ -112,13 +141,6 @@ msgstr ""
"请按照 <a href=\"https://github.com/WiVRn/WiVRn/blob/master/docs/"
"building.md#client-headset\">文档</a>中的说明构建您自己的客户端。"
#: dashboard/qml/ApkInstallPage.qml:65 dashboard/qml/HeadsetsPage.qml:183
#: dashboard/qml/HeadsetStatsPage.qml:36 dashboard/qml/TroubleshootPage.qml:71
#, kde-format
msgctxt "go back to the home page"
msgid "Back"
msgstr "返回"
#: dashboard/qml/ConnectUsbDialog.qml:11
#, kde-format
msgid "Select your headset"
@@ -139,7 +161,7 @@ msgstr "重新安装 WiVRn"
msgid "Install WiVRn"
msgstr "安装 WiVRn"
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:391
#: dashboard/qml/HeadsetsPage.qml:12 dashboard/qml/Main.qml:413
#, kde-format
msgid "Headsets"
msgstr "头显"
@@ -230,39 +252,44 @@ msgstr "配对新的头显"
msgid "Headset statistics"
msgstr "头显统计信息"
#: dashboard/qml/Main.qml:120
#: dashboard/qml/Main.qml:12
#, kde-format
msgid "WiVRn dashboard"
msgstr "WiVRn 控制面板"
#: dashboard/qml/Main.qml:124
#, kde-format
msgid "Avahi daemon is not installed"
msgstr "Avahi 守护进程未安装"
#: dashboard/qml/Main.qml:128
#: dashboard/qml/Main.qml:132
#, kde-format
msgid "Avahi daemon is not started"
msgstr "Avahi 守护进程未启用"
#: dashboard/qml/Main.qml:135 dashboard/qml/Main.qml:149
#: dashboard/qml/Main.qml:201
#: dashboard/qml/Main.qml:139 dashboard/qml/Main.qml:153
#: dashboard/qml/Main.qml:205
#, kde-format
msgid "Fix it"
msgstr "修复"
#: dashboard/qml/Main.qml:143
#: dashboard/qml/Main.qml:147
#, kde-format
msgid "Firewall may not allow port 9757"
msgstr "防火墙可能禁止了端口 9757"
#: dashboard/qml/Main.qml:157
#: dashboard/qml/Main.qml:161
#, kde-format
msgid ""
"NVIDIA GPUs require at least driver version 565.77, current version is %1"
msgstr "NVIDIA 显卡至少需要驱动程序版本 565.77,目前版本为 %1"
#: dashboard/qml/Main.qml:163
#: dashboard/qml/Main.qml:167
#, kde-format
msgid "More info"
msgstr "更多信息"
#: dashboard/qml/Main.qml:171
#: dashboard/qml/Main.qml:175
#, kde-format
msgid ""
"Use the Mesa (radv) driver for AMD GPUs\n"
@@ -271,7 +298,7 @@ msgstr ""
"AMD 显卡请使用 Mesa (radv) 驱动程序\n"
"使用 vaapi 的硬件编码不适用于 AMDVLK 和 AMDGPU-PRO"
#: dashboard/qml/Main.qml:179
#: dashboard/qml/Main.qml:183
#, kde-format
msgid ""
"No OpenVR compatibility detected, Steam games won't be able to load VR.\n"
@@ -280,95 +307,129 @@ msgstr ""
"系统未检测到 OpenVR 兼容层,Steam 平台上的 VR 游戏无法正常加载。\n"
"请安装 xrizer 或 OpenComposite"
#: dashboard/qml/Main.qml:187
#: dashboard/qml/Main.qml:191
#, kde-format
msgid "Steam is installed as a snap. Snaps are not compatible with WiVRn."
msgstr "Steam 是以 snap 方式安装的。Snap 与 WiVRn 不兼容。"
#: dashboard/qml/Main.qml:195
#: dashboard/qml/Main.qml:199
#, kde-format
msgid ""
"Steam is installed as a flatpak but does not have sufficient permissions."
msgstr "Steam 是以 flatpak 方式安装的,但权限不足。"
#: dashboard/qml/Main.qml:210
#: dashboard/qml/Main.qml:214
#, kde-format
msgid "Restart the server for configuration changes to take effect"
msgstr "重新启动服务器以使配置更改生效。"
#: dashboard/qml/Main.qml:216
#: dashboard/qml/Main.qml:220
#, kde-format
msgctxt "restart the server"
msgid "Restart now"
msgstr "立即重新启动"
#: dashboard/qml/Main.qml:241
#: dashboard/qml/Main.qml:245
#, kde-format
msgid "Server failed to start"
msgstr "服务器启动失败"
#: dashboard/qml/Main.qml:247 dashboard/qml/TroubleshootPage.qml:89
#: dashboard/qml/Main.qml:251 dashboard/qml/TroubleshootPage.qml:89
#, kde-format
msgid "Open server logs"
msgstr "开启服务器日志"
#: dashboard/qml/Main.qml:276
#: dashboard/qml/Main.qml:277
#, kde-format
msgid "Server status"
msgstr "服务器状态"
#: dashboard/qml/Main.qml:283
#, kde-format
msgctxt "whether the server is running, displayed in front of a checkbox"
msgid "Running"
msgstr "运行"
#: dashboard/qml/Main.qml:291
#: dashboard/qml/Main.qml:296
#, kde-format
msgctxt "whether pairing is enabled, displayed in front of a checkbox"
msgid "Pairing"
msgstr "配对"
#: dashboard/qml/Main.qml:304
#: dashboard/qml/Main.qml:316
#, kde-format
msgid "PIN: %1"
msgstr "身份识别码: %1"
msgid "Headset status"
msgstr "头显状态"
#: dashboard/qml/Main.qml:312 dashboard/qml/WizardPage.qml:329
#: dashboard/qml/Main.qml:323
#, kde-format
msgid "Connect by USB"
msgstr "通过 USB 连接"
msgctxt "label for headset name/status under server running switch"
msgid "Headset"
msgstr "头显"
#: dashboard/qml/Main.qml:323 dashboard/qml/WizardPage.qml:339
#: dashboard/qml/Main.qml:326
#, kde-format
msgid "No headset is connected or your headset is not in developer mode"
msgstr "没有检测到头显,或您的头显未启用开发者模式"
msgid "Not connected"
msgstr "未连接"
#: dashboard/qml/Main.qml:331
#: dashboard/qml/Main.qml:330
#, kde-format
msgid "Disconnect"
msgstr "断开连接"
#: dashboard/qml/Main.qml:349
#: dashboard/qml/Main.qml:339 dashboard/qml/Main.qml:347
#: dashboard/qml/Main.qml:354
#, kde-format
msgctxt "label for USB status or connect button"
msgid "USB"
msgstr "USB"
#: dashboard/qml/Main.qml:340
#, kde-format
msgctxt "usb connect button"
msgid "Connect (wired)"
msgstr "链接 (有线)"
#: dashboard/qml/Main.qml:357 dashboard/qml/WizardPage.qml:339
#, kde-format
msgid "No headset is connected or your headset is not in developer mode"
msgstr "没有检测到头显,或您的头显未启用开发者模式"
#: dashboard/qml/Main.qml:378
#, kde-format
msgid "Steam information"
msgstr "Steam 信息"
#: dashboard/qml/Main.qml:370
#: dashboard/qml/Main.qml:394
#, kde-format
msgid "Wizard"
msgstr "向导"
#: dashboard/qml/Main.qml:377
#: dashboard/qml/Main.qml:400
#, kde-format
msgid "Install the app"
msgstr "安装应用程序"
#: dashboard/qml/Main.qml:398 dashboard/qml/SettingsPage.qml:14
#: dashboard/qml/Main.qml:419 dashboard/qml/SettingsPage.qml:14
#, kde-format
msgid "Settings"
msgstr "设置"
#: dashboard/qml/Main.qml:405 dashboard/qml/TroubleshootPage.qml:10
#: dashboard/qml/Main.qml:425
#, kde-format
msgid "About"
msgstr "关于"
#: dashboard/qml/Main.qml:430 dashboard/qml/TroubleshootPage.qml:10
#, kde-format
msgid "Troubleshoot"
msgstr "疑难解答"
#: dashboard/qml/Main.qml:437
#, kde-format
msgid "Version %1"
msgstr "版本 %1"
#: dashboard/qml/SelectGame.qml:14
#, kde-format
msgctxt "don't start an application automatically"
@@ -799,6 +860,11 @@ msgstr ""
msgid "To connect over USB, click on \"Connect by USB\"."
msgstr "要通过 USB 连接,请点击 \"通过 USB 连接\"。"
#: dashboard/qml/WizardPage.qml:329
#, kde-format
msgid "Connect by USB"
msgstr "通过 USB 连接"
#: dashboard/qml/WizardPage.qml:349
#, kde-format
msgid "Troubleshooting"
@@ -845,16 +911,20 @@ msgstr "完成"
msgid "Finished"
msgstr "已完成"
#: dashboard/wivrn_server.cpp:533
#: dashboard/wivrn_server.cpp:538
#, kde-format
msgid "xrizer"
msgstr "xrizer"
#: dashboard/wivrn_server.cpp:534
#: dashboard/wivrn_server.cpp:539
#, kde-format
msgid "Open Composite"
msgstr "Open Composite"
#, kde-format
#~ msgid "PIN: %1"
#~ msgstr "身份识别码: %1"
#, kde-format
#~ msgctxt "automatically started application"
#~ msgid "Application"
+1 -1
View File
@@ -1 +1 @@
86a0ea4d3e396d4d03274252c400ddb62d1049b0
93d5848d2f5f835fe29291dc7e0f094f3e02de78
+1 -1
View File
@@ -3,7 +3,7 @@ Description=OpenXR streaming server
[Service]
Type=simple
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/wivrn-server --systemd
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/wivrn-server
CapabilityBoundingSet=CAP_SYS_NICE
AmbientCapabilities=CAP_SYS_NICE
LockPersonality=true
+4 -1
View File
@@ -80,7 +80,10 @@ static xrt_space_relation to_relation(const from_headset::hand_tracking::pose &
{
return {
.relation_flags = cast_flags(pose.flags),
.pose = xrt_cast(pose.pose),
.pose = xrt_cast(XrPosef{
.orientation = pose.orientation,
.position = pose.position,
}),
.linear_velocity = xrt_cast(pose.linear_velocity),
.angular_velocity = xrt_cast(pose.angular_velocity),
};
+24 -1
View File
@@ -34,7 +34,30 @@ xrt_space_relation pose_list::interpolate(const xrt_space_relation & a, const xr
{
xrt_space_relation result;
xrt_space_relation_flags flags = xrt_space_relation_flags(a.relation_flags & b.relation_flags);
m_space_relation_interpolate(const_cast<xrt_space_relation *>(&a), const_cast<xrt_space_relation *>(&b), t, flags, &result);
if (math_quat_dot(&a.pose.orientation, &b.pose.orientation) > 0)
{
m_space_relation_interpolate(const_cast<xrt_space_relation *>(&a), const_cast<xrt_space_relation *>(&b), t, flags, &result);
}
else
{
xrt_space_relation b2{
.relation_flags = b.relation_flags,
.pose = {
.orientation = {
.x = -b.pose.orientation.x,
.y = -b.pose.orientation.y,
.z = -b.pose.orientation.z,
.w = -b.pose.orientation.w,
},
.position = b.pose.position,
},
.linear_velocity = b.linear_velocity,
.angular_velocity = b.angular_velocity,
};
m_space_relation_interpolate(const_cast<xrt_space_relation *>(&a), &b2, t, flags, &result);
}
return result;
}
+2 -6
View File
@@ -182,7 +182,6 @@ int control_pipe_fds[2];
GMainLoop * main_loop;
const AvahiPoll * poll_api;
bool use_systemd;
guint server_watch;
guint server_kill_watch;
@@ -775,11 +774,11 @@ void on_headset_info_packet(const wivrn::from_headset::headset_info_packet & inf
void on_name_acquired(GDBusConnection * connection, const gchar * name, gpointer user_data)
{
#if WIVRN_USE_SYSTEMD
if (use_systemd)
try
{
children = std::make_unique<systemd_units_manager>(connection, update_fsm);
}
else
catch (...)
#endif
{
children = std::make_unique<forked_children>(update_fsm);
@@ -977,9 +976,6 @@ int main(int argc, char * argv[])
auto no_fork = app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug");
auto no_publish = app.add_flag("--no-publish-service")->description("disable publishing the service through avahi");
auto no_encrypt = app.add_flag("--no-encrypt")->description("disable encryption")->group("Debug");
#if WIVRN_USE_SYSTEMD
app.add_flag("--systemd", use_systemd, "use systemd to launch user-configured application");
#endif
CLI11_PARSE(app, argc, argv);
+49 -10
View File
@@ -35,6 +35,10 @@
#include "wivrn_packets.h"
#if WIRESHARK_VERSION_MAJOR > 4 || (WIRESHARK_VERSION_MAJOR == 4 && WIRESHARK_VERSION_MINOR >= 4)
static inline uint32_t get_uint32(tvbuff_t * tvb, const int offset, const unsigned encoding)
{
return tvb_get_uint32(tvb, offset, encoding);
}
static inline uint16_t get_uint16(tvbuff_t * tvb, const int offset, const unsigned encoding)
{
return tvb_get_uint16(tvb, offset, encoding);
@@ -45,6 +49,10 @@ static inline uint16_t get_uint8(tvbuff_t * tvb, const int offset)
return tvb_get_uint8(tvb, offset);
}
#else
static inline uint32_t get_uint32(tvbuff_t * tvb, const int offset, const unsigned encoding)
{
return tvb_get_guint32(tvb, offset, encoding);
}
static inline uint16_t get_uint16(tvbuff_t * tvb, const int offset, const unsigned encoding)
{
return tvb_get_guint16(tvb, offset, encoding);
@@ -439,6 +447,11 @@ struct tree_traits<abbrev, std::vector<T>>
size_t count = get_uint16(tvb, start, ENC_LITTLE_ENDIAN);
start += sizeof(uint16_t);
if (count & 0x8000)
{
count = (count & 0x7fff) | (get_uint16(tvb, start, ENC_LITTLE_ENDIAN) << 15);
start += sizeof(uint16_t);
}
for (size_t i = 0; i < count; i++)
{
@@ -452,6 +465,13 @@ struct tree_traits<abbrev, std::vector<T>>
start += sizeof(uint16_t);
size_t size = sizeof(uint16_t);
if (count & 0x8000)
{
count = (count & 0x7fff) | (get_uint16(tvb, start, ENC_LITTLE_ENDIAN) << 15);
start += sizeof(uint16_t);
size += sizeof(uint16_t);
}
for (size_t i = 0; i < count; i++)
{
size += tree_traits<details::join(abbrev, details::type_name<T>()), T>::size(tvb, start);
@@ -794,19 +814,38 @@ int dissect_wivrn(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree _U_, vo
/* Clear out stuff in the info column */
col_clear(pinfo->cinfo, COL_INFO);
proto_item * ti = proto_tree_add_item(tree, proto, tvb, 0, -1, ENC_NA);
proto_tree * subtree = proto_item_add_subtree(ti, subtree_handles.at(""));
int start = 0;
int offset = 0;
if (tcp)
start += sizeof(uint16_t);
while (true)
{
proto_item * ti = proto_tree_add_item(tree, proto, tvb, 0, -1, ENC_NA);
proto_tree * subtree = proto_item_add_subtree(ti, subtree_handles.at(""));
if (pinfo->destport == wivrn::default_port)
tree_traits<"wivrn.from_headset", from_headset::packets>::dissect(subtree, tvb, start);
else
tree_traits<"wivrn.to_headset", to_headset::packets>::dissect(subtree, tvb, start);
int remaining = tvb_reported_length_remaining(tvb, offset);
return tvb_captured_length(tvb);
if (tcp)
{
if (remaining < sizeof(uint32_t))
return remaining - sizeof(uint32_t);
remaining -= sizeof(uint32_t);
uint32_t size = get_uint32(tvb, offset, ENC_LITTLE_ENDIAN);
if (remaining < size)
return remaining - size;
offset += sizeof(uint32_t);
}
if (pinfo->destport == wivrn::default_port)
tree_traits<"wivrn.from_headset", from_headset::packets>::dissect(subtree, tvb, offset);
else
tree_traits<"wivrn.to_headset", to_headset::packets>::dissect(subtree, tvb, offset);
if (not tcp)
return offset;
if (tvb_reported_length(tvb) <= offset)
return offset;
}
}
int dissect_wivrn_udp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree _U_, void * data _U_)