Showing preview only (1,141K chars total). Download the full file or copy to clipboard to get everything.
Repository: wheaney/XRLinuxDriver
Branch: main
Commit: 08b3bc93d1df
Files: 187
Total size: 87.0 MB
Directory structure:
gitextract_d2i3_4h7/
├── .fpm
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── release.yml
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── .vscode/
│ └── tasks.json
├── CMakeLists.txt
├── LICENSE
├── README.md
├── bin/
│ ├── build_custom_banner_config.py
│ ├── inject_ua
│ ├── package
│ ├── package_libs
│ ├── setup
│ ├── ua.sh
│ ├── user/
│ │ ├── install
│ │ └── systemd_start
│ ├── xr_driver_cli
│ ├── xr_driver_logs
│ ├── xr_driver_ot_profile_setup
│ ├── xr_driver_setup
│ ├── xr_driver_uninstall
│ └── xr_driver_verify
├── docker-build/
│ ├── Dockerfile
│ ├── Dockerfile.aarch64
│ ├── init.sh
│ ├── run-build.sh
│ └── run-fpm.sh
├── docs/
│ ├── 6dof-from-3dof-opentrack-neuralnet.md
│ ├── development.md
│ ├── index.md
│ ├── mouse-and-joystick-modes.md
│ ├── opentrack-app.md
│ ├── opentrack-listener.md
│ └── requirements.txt
├── fpm/
│ ├── build
│ ├── postinstall
│ ├── postupgrade
│ ├── preinstall
│ └── preuninstall
├── include/
│ ├── buffer.h
│ ├── config.h
│ ├── connection_pool.h
│ ├── curl.h
│ ├── devices/
│ │ ├── rayneo.h
│ │ ├── rokid.h
│ │ ├── viture.h
│ │ └── xreal.h
│ ├── devices.h
│ ├── driver.h
│ ├── epoch.h
│ ├── features/
│ │ ├── breezy_desktop.h
│ │ ├── sbs.h
│ │ └── smooth_follow.h
│ ├── files.h
│ ├── imu.h
│ ├── ipc.h
│ ├── logging.h
│ ├── memory.h
│ ├── multitap.h
│ ├── outputs.h
│ ├── plugins/
│ │ ├── breezy_desktop.h
│ │ ├── custom_banner.h
│ │ ├── device_license.h
│ │ ├── gamescope_reshade_wayland.h
│ │ ├── metrics.h
│ │ ├── neck_saver.h
│ │ ├── opentrack_listener.h
│ │ ├── opentrack_source.h
│ │ ├── sideview.h
│ │ ├── smooth_follow.h
│ │ └── virtual_display.h
│ ├── plugins.h
│ ├── runtime_context.h
│ ├── sdks/
│ │ ├── rayneo.h
│ │ ├── rokid.h
│ │ ├── viture_device.h
│ │ ├── viture_device_carina.h
│ │ ├── viture_glasses_constants.h
│ │ ├── viture_glasses_provider.h
│ │ ├── viture_macros.h
│ │ ├── viture_protocol.h
│ │ └── viture_version.h
│ ├── state.h
│ ├── strings.h
│ ├── system.h
│ ├── version.h.in
│ └── wl_client/
│ └── gamescope_reshade.h
├── lib/
│ ├── aarch64/
│ │ └── viture/
│ │ ├── libopencv_calib3d.so.4.6.0
│ │ ├── libopencv_calib3d.so.406
│ │ ├── libopencv_core.so.4.6.0
│ │ ├── libopencv_core.so.406
│ │ ├── libopencv_features2d.so.4.6.0
│ │ ├── libopencv_features2d.so.406
│ │ ├── libopencv_flann.so.4.6.0
│ │ ├── libopencv_flann.so.406
│ │ ├── libopencv_highgui.so.4.6.0
│ │ ├── libopencv_highgui.so.406
│ │ ├── libopencv_imgcodecs.so.4.6.0
│ │ ├── libopencv_imgcodecs.so.406
│ │ ├── libopencv_imgproc.so.4.6.0
│ │ ├── libopencv_imgproc.so.406
│ │ ├── libopencv_video.so.4.6.0
│ │ ├── libopencv_video.so.406
│ │ ├── libopencv_videoio.so.4.6.0
│ │ └── libopencv_videoio.so.406
│ └── x86_64/
│ └── viture/
│ ├── libopencv_calib3d.so.4.2
│ ├── libopencv_calib3d.so.4.2.0
│ ├── libopencv_core.so.4.2
│ ├── libopencv_core.so.4.2.0
│ ├── libopencv_features2d.so.4.2
│ ├── libopencv_features2d.so.4.2.0
│ ├── libopencv_flann.so.4.2
│ ├── libopencv_flann.so.4.2.0
│ ├── libopencv_highgui.so.4.2
│ ├── libopencv_highgui.so.4.2.0
│ ├── libopencv_imgcodecs.so.4.2
│ ├── libopencv_imgcodecs.so.4.2.0
│ ├── libopencv_imgproc.so.4.2
│ ├── libopencv_imgproc.so.4.2.0
│ ├── libopencv_video.so.4.2
│ ├── libopencv_video.so.4.2.0
│ ├── libopencv_videoio.so.4.2
│ └── libopencv_videoio.so.4.2.0
├── license_public_key.pem
├── mkdocs.yml
├── modules/
│ └── rayneoSDKHeaders/
│ ├── base/
│ │ ├── FXRDebug.h
│ │ ├── FXRError.h
│ │ ├── FXRMacro.h
│ │ └── FXRType.h
│ ├── device/
│ │ ├── XRDevice.h
│ │ └── usb/
│ │ ├── XRDeviceState.h
│ │ └── XRPacket.h
│ ├── interface/
│ │ ├── FXRApi.h
│ │ ├── FXRClient.h
│ │ └── FXRServer.h
│ ├── ipc/
│ │ └── FXRProtocol.h
│ └── openxr/
│ ├── openxr.h
│ ├── openxr_platform.h
│ ├── openxr_platform_defines.h
│ ├── openxr_reflection.h
│ ├── openxr_reflection_parent_structs.h
│ └── openxr_reflection_structs.h
├── src/
│ ├── buffer.c
│ ├── config.c
│ ├── connection_pool.c
│ ├── curl.c
│ ├── devices/
│ │ ├── rayneo.c
│ │ ├── rokid.c
│ │ ├── viture.c
│ │ └── xreal.c
│ ├── devices.c
│ ├── driver.c
│ ├── epoch.c
│ ├── features/
│ │ ├── breezy_desktop.c
│ │ ├── sbs.c
│ │ └── smooth_follow.c
│ ├── files.c
│ ├── imu.c
│ ├── ipc.c
│ ├── logging.c
│ ├── multitap.c
│ ├── outputs.c
│ ├── plugins/
│ │ ├── breezy_desktop.c
│ │ ├── custom_banner.c
│ │ ├── device_license.c
│ │ ├── gamescope_reshade_wayland.c
│ │ ├── metrics.c
│ │ ├── neck_saver.c
│ │ ├── opentrack_listener.c
│ │ ├── opentrack_source.c
│ │ ├── sideview.c
│ │ ├── smooth_follow.c
│ │ └── virtual_display.c
│ ├── plugins.c
│ ├── runtime_context.c
│ ├── state.c
│ ├── strings.c
│ ├── system.c
│ └── wl_client/
│ └── gamescope_reshade.c
├── systemd/
│ └── xr-driver.service
└── udev/
├── 70-rayneo-xr.rules
├── 70-rokid-xr.rules
├── 70-uinput-xr.rules
├── 70-viture-xr.rules
└── 70-xreal-xr.rules
================================================
FILE CONTENTS
================================================
================================================
FILE: .fpm
================================================
--name xr-driver
--description "Linux service for interacting with XR devices"
--iteration 1
--url https://github.com/wheaney/XRLinuxDriver
--maintainer "Wayne Heaney <wayne at xronlinux dot com>"
--license mit
-s dir
-f
--before-install ./fpm/preinstall
--after-install ./fpm/postinstall
--after-upgrade ./fpm/postupgrade
--before-remove ./fpm/preuninstall
--chdir build/xr_driver
bin/xrDriver=/usr/bin/xrDriver
bin/xr_driver_cli=/usr/bin/xr_driver_cli
systemd/xr-driver.service=/usr/lib/systemd/user/xr-driver.service
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: wheaney
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: wheaney
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
workflow_dispatch:
inputs:
force_release:
description: 'Run release even if version did not change'
type: boolean
required: false
default: false
push:
branches:
- main
paths:
- 'CMakeLists.txt'
permissions:
contents: write
jobs:
check-version-change:
runs-on: ubuntu-latest
outputs:
version-changed: ${{ steps.check.outputs.changed }}
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if version changed
id: check
env:
FORCE_RELEASE: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force_release == 'true' }}
run: |
# Get the current version
CURRENT_VERSION=$(grep -oP 'project\(xrDriver VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "Current version: ${CURRENT_VERSION}"
# Get the previous version (from previous commit)
if git rev-parse HEAD~1 >/dev/null 2>&1; then
git show HEAD~1:CMakeLists.txt > /tmp/prev_cmakelists.txt
PREVIOUS_VERSION=$(grep -oP 'project\(xrDriver VERSION \K[0-9]+\.[0-9]+\.[0-9]+' /tmp/prev_cmakelists.txt 2>/dev/null || echo "none")
rm /tmp/prev_cmakelists.txt
else
# This is the first commit
PREVIOUS_VERSION="none"
fi
echo "Previous version: ${PREVIOUS_VERSION}"
if [ "${FORCE_RELEASE}" = "true" ]; then
echo "Force release enabled; proceeding regardless of version change"
echo "changed=true" >> $GITHUB_OUTPUT
exit 0
fi
if [ "${CURRENT_VERSION}" != "${PREVIOUS_VERSION}" ]; then
echo "Version changed from ${PREVIOUS_VERSION} to ${CURRENT_VERSION}"
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "Version unchanged"
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Get version
id: get-version
run: |
VERSION=$(grep -oP 'project\(xrDriver VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Version: ${VERSION}"
build-x86_64:
needs: check-version-change
if: needs.check-version-change.outputs.version-changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image for x86_64
run: |
docker buildx build --platform linux/amd64 --load -f ./docker-build/Dockerfile -t "xr-driver:amd64" .
- name: Build x86_64 binary package
run: |
docker run --rm -t -v ./:/source --platform linux/amd64 -e UA_API_SECRET_INTENTIONALLY_EMPTY=1 "xr-driver:amd64"
sudo chown -R "${USER}":"${USER}" out/
- name: Build x86_64 lib package
run: |
./bin/package_libs
- name: Upload x86_64 artifacts
uses: actions/upload-artifact@v4
with:
name: xrDriver-x86_64
path: |
out/xrDriver-x86_64.tar.gz
out/xrDriver-libs-x86_64.tar.gz
build-aarch64:
needs: check-version-change
if: needs.check-version-change.outputs.version-changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image for aarch64
run: |
docker buildx build --platform linux/arm64 --load -f ./docker-build/Dockerfile.aarch64 -t "xr-driver:arm64" .
- name: Build aarch64 binary package
run: |
docker run --rm -t -v ./:/source --platform linux/arm64 -e UA_API_SECRET_INTENTIONALLY_EMPTY=1 "xr-driver:arm64"
sudo chown -R "${USER}":"${USER}" out/
- name: Build aarch64 lib package
run: |
./bin/package_libs
- name: Upload aarch64 artifacts
uses: actions/upload-artifact@v4
with:
name: xrDriver-aarch64
path: |
out/xrDriver-aarch64.tar.gz
out/xrDriver-libs-aarch64.tar.gz
create-release:
needs: [check-version-change, build-x86_64, build-aarch64]
if: needs.check-version-change.outputs.version-changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download x86_64 artifacts
uses: actions/download-artifact@v4
with:
name: xrDriver-x86_64
path: ./artifacts
- name: Download aarch64 artifacts
uses: actions/download-artifact@v4
with:
name: xrDriver-aarch64
path: ./artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.check-version-change.outputs.version }}
name: Release v${{ needs.check-version-change.outputs.version }}
draft: false
prerelease: false
files: |
artifacts/xrDriver-x86_64.tar.gz
artifacts/xrDriver-libs-x86_64.tar.gz
artifacts/xrDriver-aarch64.tar.gz
artifacts/xrDriver-libs-aarch64.tar.gz
bin/xr_driver_setup
bin/xr_driver_ot_profile_setup
================================================
FILE: .gitignore
================================================
.idea/
.cache/
cmake-build-debug/
cmake-build-release/
build/
out/
xrDriver
/include/custom_banner_config.h
/custom_banner_config.yml
# Packaging artifacts
xr_driver/
xr_driver_lib/
*.tar.gz
================================================
FILE: .gitmodules
================================================
[submodule "modules/xrealInterfaceLibrary"]
path = modules/xrealInterfaceLibrary
url = https://gitlab.com/wheaney/nrealAirLinuxDriver.git
================================================
FILE: .readthedocs.yaml
================================================
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.13"
# Install MkDocs and theme/plugins needed for building.
python:
install:
- requirements: docs/requirements.txt
# Build documentation with Mkdocs
mkdocs:
configuration: mkdocs.yml
================================================
FILE: .vscode/tasks.json
================================================
{
"version": "2.0.0",
"tasks": [
{
"label": "build XRLinuxDriver (cmake)",
"type": "shell",
"command": "bash -lc 'set -euo pipefail; if [ -d build ]; then cmake --build build -j$(nproc); else cmake -S . -B build && cmake --build build -j$(nproc); fi'",
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.16)
project(xrDriver VERSION 2.9.4 LANGUAGES C)
# Emit compile_commands.json for IDEs (VS Code IntelliSense)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
configure_file(include/version.h.in version.h)
include_directories(${PROJECT_BINARY_DIR})
# Build type: default to RelWithDebInfo for useful backtraces unless caller overrides
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel)
set(CMAKE_C_STANDARD 17)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(PkgConfig REQUIRED)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
set (py_cmd "${CMAKE_SOURCE_DIR}/bin/build_custom_banner_config.py")
set (custom_banner_header_file "${CMAKE_SOURCE_DIR}/include/custom_banner_config.h")
set (custom_banner_yaml_file "${CMAKE_SOURCE_DIR}/custom_banner_config.yml")
add_custom_target(run_python_script ALL
COMMAND ${Python3_EXECUTABLE} ${py_cmd} ${custom_banner_yaml_file} ${custom_banner_header_file}
)
if(DEFINED ENV{UA_API_SECRET})
set(UA_API_SECRET $ENV{UA_API_SECRET})
message(STATUS "Using UA_API_SECRET from environment")
add_definitions(-DUA_API_SECRET="${UA_API_SECRET}")
else()
set(UA_API_SECRET "")
message(STATUS "!!! UA_API_SECRET is NOT set")
endif()
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/license_public_key.pem DEVICE_LICENSE_PUBLIC_KEY_RAW)
string(REPLACE "\n" "\\n" DEVICE_LICENSE_PUBLIC_KEY_ESCAPED ${DEVICE_LICENSE_PUBLIC_KEY_RAW})
add_definitions(-DDEVICE_LICENSE_PUBLIC_KEY="${DEVICE_LICENSE_PUBLIC_KEY_ESCAPED}")
find_package(Threads REQUIRED)
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
pkg_check_modules(LIBEVDEV REQUIRED libevdev)
pkg_check_modules(OPENSSL REQUIRED openssl)
pkg_check_modules(JSONC REQUIRED json-c)
pkg_check_modules(CURL REQUIRED libcurl)
pkg_check_modules(LIBWAYLAND_CLIENT REQUIRED wayland-client)
execute_process(COMMAND git submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(modules/xrealInterfaceLibrary/interface_lib)
# Set the library directory based on architecture
set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR})
set(VITURE_LIB_DIR ${LIB_DIR}/viture)
message(STATUS "LIB_DIR: ${LIB_DIR}")
if(EXISTS ${VITURE_LIB_DIR})
message(STATUS "VITURE_LIB_DIR: ${VITURE_LIB_DIR}")
endif()
# Find all .a files in the library directory
file(GLOB STATIC_LIBS ${LIB_DIR}/*.a)
if(EXISTS ${VITURE_LIB_DIR})
file(GLOB VITURE_STATIC_LIBS ${VITURE_LIB_DIR}/*.a)
list(APPEND STATIC_LIBS ${VITURE_STATIC_LIBS})
endif()
message(STATUS "STATIC_LIBS: ${STATIC_LIBS}")
# Add all static libraries
foreach(LIB ${STATIC_LIBS})
get_filename_component(LIB_NAME ${LIB} NAME_WE)
string(REPLACE "lib" "" LIB_NAME ${LIB_NAME})
add_library(${LIB_NAME} STATIC IMPORTED)
set_target_properties(${LIB_NAME} PROPERTIES
IMPORTED_LOCATION ${LIB}
)
endforeach()
# Find all .so files in the library directory
file(GLOB SHARED_LIBS ${LIB_DIR}/*.so)
if(EXISTS ${VITURE_LIB_DIR})
file(GLOB VITURE_SHARED_LIBS ${VITURE_LIB_DIR}/*.so)
list(APPEND SHARED_LIBS ${VITURE_SHARED_LIBS})
endif()
message(STATUS "SHARED_LIBS: ${SHARED_LIBS}")
# Add all shared libraries
foreach(LIB ${SHARED_LIBS})
get_filename_component(LIB_NAME ${LIB} NAME_WE)
string(REPLACE "lib" "" LIB_NAME ${LIB_NAME})
add_library(${LIB_NAME} SHARED IMPORTED)
set_target_properties(${LIB_NAME} PROPERTIES
IMPORTED_LOCATION ${LIB}
IMPORTED_SONAME ${LIB_NAME}.so
)
endforeach()
# Define the mapping of binary names to source files
set(DEVICE_MAPPINGS
"libRayNeoXRMiniSDK.so:src/devices/rayneo.c"
"libGlassSDK.so:src/devices/rokid.c"
)
set(SOURCES
src/buffer.c
src/config.c
src/connection_pool.c
src/curl.c
src/devices/xreal.c
src/devices.c
src/driver.c
src/epoch.c
src/features/breezy_desktop.c
src/features/smooth_follow.c
src/features/sbs.c
src/files.c
src/logging.c
src/imu.c
src/ipc.c
src/multitap.c
src/outputs.c
src/plugins.c
src/plugins/breezy_desktop.c
src/plugins/custom_banner.c
src/plugins/device_license.c
src/plugins/gamescope_reshade_wayland.c
src/plugins/metrics.c
src/plugins/sideview.c
src/plugins/smooth_follow.c
src/plugins/virtual_display.c
src/plugins/neck_saver.c
src/plugins/opentrack_source.c
src/plugins/opentrack_listener.c
src/runtime_context.c
src/state.c
src/strings.c
src/system.c
src/wl_client/gamescope_reshade.c
)
# Function to get the source file from a mapping
function(get_source_file BINARY_NAME RESULT_VAR)
foreach(MAPPING ${DEVICE_MAPPINGS})
string(REPLACE ":" ";" MAPPING_LIST ${MAPPING})
list(GET MAPPING_LIST 0 MAPPED_BINARY)
list(GET MAPPING_LIST 1 MAPPED_SOURCE)
if(${BINARY_NAME} STREQUAL ${MAPPED_BINARY})
set(${RESULT_VAR} ${MAPPED_SOURCE} PARENT_SCOPE)
return()
endif()
endforeach()
set(${RESULT_VAR} "" PARENT_SCOPE)
endfunction()
# Get all targets in the current directory
get_property(ALL_TARGETS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY IMPORTED_TARGETS)
# Iterate over all targets
foreach(TARGET ${ALL_TARGETS})
get_target_property(LIB_TYPE ${TARGET} TYPE)
if(LIB_TYPE STREQUAL "STATIC_LIBRARY" OR LIB_TYPE STREQUAL "SHARED_LIBRARY")
get_target_property(LIB_LOCATION ${TARGET} IMPORTED_LOCATION)
if(LIB_LOCATION)
get_filename_component(LIB_NAME ${LIB_LOCATION} NAME)
get_source_file(${LIB_NAME} SOURCE_FILE)
if(SOURCE_FILE)
list(APPEND SOURCES ${SOURCE_FILE})
string(TOUPPER ${TARGET} TARGET_UPPER)
add_definitions(-D${TARGET_UPPER}_SUPPORTED)
message(STATUS "${TARGET} support enabled, added ${SOURCE_FILE}")
endif()
endif()
endif()
endforeach()
if(EXISTS ${VITURE_LIB_DIR})
list(APPEND SOURCES src/devices/viture.c)
add_definitions(-DVITURE_SUPPORTED)
message(STATUS "VITURE support enabled, added src/devices/viture.c")
endif()
add_executable(xrDriver ${SOURCES})
# Improve crash backtraces and line number resolution
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
# Per-config compile options
target_compile_options(xrDriver PRIVATE
$<$<CONFIG:Debug>:-g3>
$<$<CONFIG:Debug>:-O0>
$<$<CONFIG:Debug>:-fno-omit-frame-pointer>
$<$<CONFIG:RelWithDebInfo>:-g>
$<$<CONFIG:RelWithDebInfo>:-fno-omit-frame-pointer>
)
# Export symbol table for better backtrace_symbols() resolution
target_link_options(xrDriver PRIVATE
$<$<CONFIG:Debug>:-rdynamic>
$<$<CONFIG:RelWithDebInfo>:-rdynamic>
)
endif()
# Optional: AddressSanitizer for clearer reports on memory errors
option(ENABLE_ASAN "Build with AddressSanitizer" OFF)
if(ENABLE_ASAN AND CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(xrDriver PRIVATE -fsanitize=address -fno-omit-frame-pointer -g)
target_link_options(xrDriver PRIVATE -fsanitize=address)
endif()
target_include_directories(xrDriver
SYSTEM BEFORE PRIVATE
${LIBEVDEV_INCLUDE_DIRS}
${JSONC_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/modules/rayneoSDKHeaders
${CMAKE_CURRENT_SOURCE_DIR}/modules/xrealInterfaceLibrary/interface_lib/include
${LIBUSB_INCLUDE_DIRS}
${LIBCURL_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIRS}
${LIBWAYLAND_CLIENT_INCLUDE_DIRS}
)
set(ALL_IMPORTED_LIBS)
get_property(ALL_TARGETS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY IMPORTED_TARGETS)
foreach(TARGET ${ALL_TARGETS})
get_target_property(LIB_TYPE ${TARGET} TYPE)
if(LIB_TYPE STREQUAL "STATIC_LIBRARY" OR LIB_TYPE STREQUAL "SHARED_LIBRARY")
list(APPEND ALL_IMPORTED_LIBS ${TARGET})
endif()
endforeach()
target_link_libraries(xrDriver
PRIVATE
${LIBEVDEV_LIBRARIES}
${JSONC_LIBRARIES}
xrealAirLibrary
Threads::Threads
m
${CURL_LIBRARIES}
${OPENSSL_LIBRARIES}
${ALL_IMPORTED_LIBS}
${LIBUSB_LIBRARIES}
${LIBWAYLAND_CLIENT_LIBRARIES}
)
add_dependencies(xrDriver run_python_script)
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
# XR Linux Driver
[](https://ko-fi.com/U7U8OVC0L)
[](https://discord.gg/azSBTXNXMt)
[](https://xrlinuxdriver.readthedocs.io/en/latest/?badge=latest)
## What is this?
This driver allows your Linux device (including Steam Deck) to automatically recognize supported XR glasses (see [Supported Devices](#supported-devices)) when they're plugged in, and convert the movements of the glasses into mouse movements and an external broadcast that games or any application can utilize.
If you're looking for a 3DoF virtual display, this driver by itself does not provide that functionality; instead, see [Breezy Desktop](https://github.com/wheaney/breezy-desktop) or [use the Steam Deck plugin](#steam-deck-via-decky-loader).
## Supported Devices
Check below to see if your device is supported. **Note: be sure you're on the latest firmware for your device.**
| Brand | Model | Support? | Recommend? | x86_64 (AMD64) | AARCH64 (ARM64) | Firmware updates | Notes |
| -------- | ----------------- | ----------------- | ------------ | -------------- | --------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| VITURE | One<br/>One Lite<br/>Pro XR<br/>Luma<br/>Luma Pro | :heavy_check_mark: | :+1: | :heavy_check_mark: | :heavy_check_mark: | [Official update site](https://static.viture.com/dfu-util/). Requires Chrome on Windows/Mac. | Official collaboration. [Closed source SDK](https://www.viture.com/developer/viture-one-sdk-for-linux). |
| VITURE | Luma Ultra | :heavy_check_mark: | :+1: | :heavy_check_mark: | :heavy_check_mark: | [Official update site](https://static.viture.com/dfu-util/). Requires Chrome on Windows/Mac. | Official collaboration. [Closed source SDK](https://www.viture.com/developer/viture-one-sdk-for-linux). |
| VITURE | Beast | :clock4: Coming soon... | | | | | Support requires updates to the official SDK. |
| TCL/RayNeo | NXTWEAR S/S+<br/>Air 2<br/>2s<br/>3s/Pro | :heavy_check_mark: | :+1: | :heavy_check_mark: | | | Official collaboration, closed source SDK. |
| Rokid | Max<br/>Air | :heavy_check_mark: | :+1: | :heavy_check_mark: | | | Official collaboration, closed source SDK. |
| XREAL | Air<br/>Air 2<br/>Air 2 Pro<br/>Air 2 Ultra | :heavy_check_mark: | :-1: | :heavy_check_mark: | :heavy_check_mark: | [Official update site](https://www.xreal.com/support/update/). Requires Chrome. | Unwilling to collaborate. [Unofficial, open-source SDK](https://gitlab.com/TheJackiMonster/nrealAirLinuxDriver). Exhibits drift. |
| XREAL | One<br/>One Pro | :heavy_check_mark:<br/><br/>**See notes before use** | :-1: | :heavy_check_mark: | :heavy_check_mark: | [Official update site](https://www.xreal.com/support/update/). Requires Chrome. | **Important** - Disable stabilizer/anchor features on glasses. Must be on latest firmware. |
| XREAL | 1S | :heavy_check_mark: XR driver v2.8.x<br/><br/>:heavy_check_mark: Breezy Desktop v2.8.x<br/><br/>:heavy_check_mark: Decky XR Gaming v1.5.x<br/><br/>**See notes before use** | :-1: | :heavy_check_mark: | :heavy_check_mark: | [Official update site](https://www.xreal.com/support/update/). Requires Chrome. | **Important** - Disable stabilizer/anchor features on glasses. Must be on latest firmware. |
## Setup
### Manual installation
*Note: this installation is for just the base driver with mouse/joystick support. If you're looking for virtual display or workspace tools, check out [Breezy Desktop](https://github.com/wheaney/breezy-desktop).*
1. [Download the setup script](https://github.com/wheaney/XRLinuxDriver/releases/latest/download/xr_driver_setup) and set the execute flag (e.g. from the terminal: `chmod +x ~/Downloads/xr_driver_setup`)
2. Run the setup script as root (e.g. `sudo ~/Downloads/xr_driver_setup`)
Your device should now automatically recognize when your glasses are plugged in and translate their movements to mouse movements. If you're not seeing this, check the log at `$XDG_STATE_HOME/xr_driver/driver.log` and report an Issue here with its contents.
#### Turning automatic driver usage on or off
To disable the driver and turn off mouse movements without completely removing it, you can use the config script (e.g. `xr_driver_cli -d` to disable, and `-e` to re-enable). Run this script without arguments to see its usage. Configs are stored in the file `$XDG_CONFIG_HOME/xr_driver/config.ini`.
### Updating
If using Decky, updates are installed through Decky.
Otherwise, just rerun the `xr_driver_setup` file. No need to redownload this script, as it will automatically download the latest installation binary for you.
### Uninstalling
If you wish to completely remove the installation, run the following script as root: `~/.local/bin/xr_driver_uninstall`. For Steam Deck users, you can uninstall the plugin via the Decky interface.
## Data Privacy Notice
Your right to privacy and the protection of your personal data are baked into every decision around how your personal data is collected, handled and stored. Your personal data will never be shared, sold, or distributed in any form.
### Data Collected
In order to provide you with Supporter Tier features, this application and its backend services have to collect the following pieces of personal information:
* Your email address is sent to this application's backend server from either the payment vendor (Ko-fi) or from your device (at your request). Your email address may be used immediately upon receipt in its unaltered form to send you a transactional email, but it is then hashed prior to storage. The unaltered form of your email address is never stored and can no longer be referenced. The hashed value is stored for later reference.
* Other personal data may be sent from the payment vendor, but is never utilized nor stored.
* Your device's MAC address is hashed on your device. It never leaves your device in its original, unaltered form. The hashed value is sent to this application's backend server and stored for later reference.
* Metrics are collected using Google Analytics. No personal information is explicitly collected, and Google Analytics will anonymize the IP address that's sent as part of the HTTP request. You can disable metrics collection using `xr_driver_cli --no-metrics`.
Hashing functions are a one-way process that serve to anonymize your personal data by irreversibly changing them. Once hashed, they can never be unhashed or traced back to their original values.
### Contact
For inquires about data privacy or any related concerns, please contact:
Wayne Heaney - **wayne@xronlinux.com**
## Credits
This driver wouldn't have been possible without the work of Tobias Frisch for his [base Linux driver](https://gitlab.com/TheJackiMonster/nrealAirLinuxDriver) that this uses under the hood, Matt Smith for his [Windows driver](https://github.com/MSmithDev/AirAPI_Windows/), and others that worked to [reverse engineer the glasses](https://github.com/edwatt/real_utilities/).
================================================
FILE: bin/build_custom_banner_config.py
================================================
import sys
import os
import yaml
start_date = 0
end_date = 0
target_device_vendor_id = 0
target_device_product_id = 0
yaml_file_path = sys.argv[1]
output_file_path = sys.argv[2]
if os.path.isfile(yaml_file_path):
with open(yaml_file_path, 'r') as stream:
try:
yaml_data = yaml.safe_load(stream)
except yaml.YAMLError as exc:
print(exc)
sys.exit(1)
try:
start_date = int(yaml_data.get("start_date", 0))
except ValueError:
print("ERROR: start_date is not an int")
sys.exit(1)
try:
end_date = int(yaml_data.get("end_date", 0))
except ValueError:
print("ERROR: end_date is not an int")
sys.exit(1)
try:
target_device_vendor_id = int(yaml_data.get("target_device_vendor_id", 0))
if target_device_vendor_id != 0:
try:
target_device_product_id = int(yaml_data.get("target_device_product_id", 0))
except ValueError:
print("ERROR: target_device_product_id is not an int")
sys.exit(1)
except ValueError:
print("ERROR: target_device_vendor_id is not an int")
sys.exit(1)
if end_date != 0 and start_date != 0 and start_date > end_date:
print("ERROR: start_date is after end_date")
sys.exit(1)
with open(output_file_path, "w") as f:
f.write("#pragma once\n")
f.write("// This file is autogenerated by bin/custom_banner_build.py\n")
f.write("// Do not edit this file directly\n")
f.write("#define CUSTOM_BANNER_START_DATE {}\n".format(start_date))
f.write("#define CUSTOM_BANNER_END_DATE {}\n".format(end_date))
f.write("#define CUSTOM_BANNER_TARGET_DEVICE_VENDOR_ID {}\n".format(target_device_vendor_id))
f.write("#define CUSTOM_BANNER_TARGET_DEVICE_PRODUCT_ID {}\n".format(target_device_product_id))
================================================
FILE: bin/inject_ua
================================================
#!/bin/bash
# Function to copy and replace code in scripts. Allows for code reuse without needing multiple bash files.
copy_and_inject_ua() {
# Source file containing the code to be injected
local source_file=$1
# Directory where the scripts will be copied to
local copy_to_dir=$2
# Keyword in the destination file where the code will be injected
local keyword="#INJECT_UA_CALL"
# List of scripts to be copied and modified
local scripts=("${@:3}")
for script in "${scripts[@]}"; do
# Copy the script to the package directory
cp -p $script $copy_to_dir
# Get the filename of the script
local filename=$(basename $script)
# Destination file where the code will be injected
local destination_file="$copy_to_dir/$filename"
# Replace the keyword with the content of the source file
sed -i -e "/$keyword/r $source_file" -e "s/$keyword/UA_API_SECRET=\"${UA_API_SECRET}\"/g" $destination_file
done
}
================================================
FILE: bin/package
================================================
#!/usr/bin/env bash
# exit when any command fails
set -e
USER=${SUDO_USER:-$USER}
GROUP=$(id -gn $USER)
source bin/inject_ua
if [ -z "$UA_API_SECRET" ] && [ -z "$UA_API_SECRET_INTENTIONALLY_EMPTY" ]; then
echo "UA_API_SECRET isn't set. If this is intentional, set UA_API_SECRET_INTENTIONALLY_EMPTY to a non-empty value."
exit 1
fi
ARCH=$(uname -m)
echo "Building for $ARCH"
# build the driver
BUILD_PATH=build
if [ ! -d "$BUILD_PATH" ]; then
mkdir $BUILD_PATH
fi
pushd $BUILD_PATH
cmake ..
make
# create package
PACKAGE_DIR=xr_driver
PACKAGE_BIN_DIR=$PACKAGE_DIR/bin
PACKAGE_USER_BIN_DIR=$PACKAGE_BIN_DIR/user
mkdir -p $PACKAGE_USER_BIN_DIR
mv xrDriver $PACKAGE_BIN_DIR
# copy setup and user-relevant scripts
copy_and_inject_ua "../bin/ua.sh" "$PACKAGE_DIR" "../bin/setup"
copy_and_inject_ua "../bin/ua.sh" "$PACKAGE_BIN_DIR" "../bin/xr_driver_verify" "../bin/xr_driver_cli" "../bin/xr_driver_uninstall" "../bin/xr_driver_logs"
copy_and_inject_ua "../bin/ua.sh" "$PACKAGE_USER_BIN_DIR" "../bin/user/install" "../bin/user/systemd_start"
# copy the systemd files needed to run our service
cp -r ../systemd $PACKAGE_DIR
cp -r ../udev $PACKAGE_DIR
# create manifest file for verifying installed file checksums against the originally packaged versions
# include any file that doesn't get modified during setup (e.g. the systemd service file)
pushd $PACKAGE_BIN_DIR
BIN_MANIFEST=$(sha256sum xrDriver xr_driver_cli xr_driver_uninstall xr_driver_logs)
popd
echo $BIN_MANIFEST > $PACKAGE_DIR/manifest
# bundle up the driver directory (without lib files)
BUILD_ARTIFACT_NAME="xrDriver-$ARCH.tar.gz"
tar -zcvf $BUILD_ARTIFACT_NAME $PACKAGE_DIR
popd
mkdir -p out
cp $BUILD_PATH/$BUILD_ARTIFACT_NAME out/
rm -rf $BUILD_PATH
================================================
FILE: bin/package_libs
================================================
#!/usr/bin/env bash
# exit when any command fails
set -e
# Package libraries for both architectures
ARCHITECTURES=("x86_64" "aarch64")
echo "Building lib packages for all architectures"
# build the lib package
BUILD_PATH=build
if [ ! -d "$BUILD_PATH" ]; then
mkdir $BUILD_PATH
fi
pushd $BUILD_PATH > /dev/null
for ARCH in "${ARCHITECTURES[@]}"; do
echo "Packaging libraries for $ARCH"
# create separate lib package
PACKAGE_LIB_DIR=xr_driver_lib
mkdir -p $PACKAGE_LIB_DIR
cp ../lib/$ARCH/*.so* $PACKAGE_LIB_DIR || true
cp ../lib/$ARCH/viture/*.so* $PACKAGE_LIB_DIR || true
LIB_ARTIFACT_NAME="xrDriver-libs-$ARCH.tar.gz"
tar -zcvf $LIB_ARTIFACT_NAME $PACKAGE_LIB_DIR
# Clean up for next iteration
rm -rf $PACKAGE_LIB_DIR
done
popd > /dev/null
mkdir -p out
cp $BUILD_PATH/*.tar.gz out/
rm -rf $BUILD_PATH
================================================
FILE: bin/setup
================================================
#!/usr/bin/env bash
set -e
# This script gets packaged with the release and should do the bulk of the setup work. This allows this setup to be tied
# to a specific release of the code, and guarantees it will never run along-side newer or older binaries.
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# some distros don't have systemd enabled by default.
if [[ -z "${SKIP_SYSTEMD:-}" ]]; then
if [[ $(ps -p 1 -o comm=) != "systemd" ]]; then
echo "systemd is required for this installation. Please enable it, then rerun the setup."
exit 1
fi
else
if [[ $(ps -p 1 -o comm=) != "systemd" ]]; then
echo "SKIP_SYSTEMD is set and systemd is not detected as PID 1; continuing without systemd integration."
fi
fi
if ! find /usr/lib* -name 'libcurl.so*' -print -quit | grep -q .; then
echo "The libcurl library is not found. It's typically provided by the package libcurl4 (Debian/Ubuntu), libcurl (Fedora), or curl (Arch). \
Please install it and rerun setup."
exit 1
fi
if ! find /usr/lib* -name 'libwayland-client.so*' -print -quit | grep -q .; then
echo -e "\n\n!!! WARNING: The Wayland client library was not found, which will disable the gamescope integration. \
To enable this, install the appropriate library. It's typically provided by the package libwayland-client0 \
(Debian/Ubuntu), wayland (Fedora), or wayland (Arch).\n\n"
fi
USER=${SUDO_USER:-$USER}
GROUP=$(id -g $USER)
USER_HOME=$(getent passwd $USER | cut -d: -f6)
function create_and_chown() {
if [ ! -d "$1" ]; then
mkdir -p $1
fi
# XDG dir can be provided as the second argument, we want to make sure it's owned by the user
# but don't recursively chown it since other programs may put files in there
if [ -n "$2" ]; then
chown $USER:$GROUP $2
fi
# only recursively chown the directory if it's not an XDG dir
if [ -z "$2" ] || [ "$1" != "$2" ]; then
chown -R $USER:$GROUP $1
fi
}
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$USER_HOME/.local/share"
fi
SYSTEMD_DATA_DIR="$XDG_DATA_HOME/systemd"
SYSTEMD_USER_DIR="$SYSTEMD_DATA_DIR/user"
mkdir -p $SYSTEMD_USER_DIR # this will get chowned by the recursive call triggered next
create_and_chown $SYSTEMD_DATA_DIR $XDG_DATA_HOME
DATA_DIR="$XDG_DATA_HOME/xr_driver"
create_and_chown $DATA_DIR $XDG_DATA_HOME
if [ -z "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$USER_HOME/.config"
fi
CONFIG_DIR="$XDG_CONFIG_HOME/xr_driver"
create_and_chown $CONFIG_DIR $XDG_CONFIG_HOME
if [ -z "$XDG_BIN_HOME" ]; then
XDG_BIN_HOME="$USER_HOME/.local/bin"
fi
OLD_BIN_DIR="$USER_HOME/bin"
BIN_DIR="$XDG_BIN_HOME"
create_and_chown $OLD_BIN_DIR
create_and_chown $BIN_DIR $XDG_BIN_HOME
if [ -z "$XDG_STATE_HOME" ]; then
XDG_STATE_HOME="$USER_HOME/.local/state"
fi
STATE_DIR="$XDG_STATE_HOME/xr_driver"
create_and_chown $STATE_DIR $XDG_STATE_HOME
if [ -e "$OLD_BIN_DIR/xreal_driver_uninstall" ]; then
echo "Cleaning up the previous installation"
# ` || true` will ensure that this can't cause a failure, even with `set -e`
$OLD_BIN_DIR/xreal_driver_uninstall --for-install || true
UA_EVENT_NAME="update"
fi
if [ -e "$BIN_DIR/xr_driver_uninstall" ]; then
echo "Cleaning up the previous installation"
# ` || true` will ensure that this can't cause a failure, even with `set -e`
$BIN_DIR/xr_driver_uninstall --for-install || true
UA_EVENT_NAME="update"
fi
if command -v jq >/dev/null 2>&1 && [ -e "$STATE_DIR/license.json" ]; then
HWID=$(jq -r '.license | fromjson | .hardwareId' "$STATE_DIR/license.json" | cut -c 1-8)
if [ "$HWID" != "null" ]; then
echo "Moving your license file to $STATE_DIR/${HWID}_license.json"
mv "$STATE_DIR/license.json" "$STATE_DIR/${HWID}_license.json"
fi
fi
current_path=$(pwd)
if [[ "$current_path" == /tmp/* ]]; then
target_dir=$(echo "$current_path" | sed -E 's|^(/tmp/[^/]+).*|\1|')
echo "Changing ownership of $target_dir to $USER:$GROUP"
chown -R $USER:$GROUP "$target_dir"
fi
# this part of the setup should be run as the user, not root
XDG_RUNTIME_DIR="/run/user/$(id -u $USER)"
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
# On non-systemd systems /run/user/<uid> may not exist. Fall back to a private runtime dir in /tmp.
XDG_RUNTIME_DIR="/tmp/xr_driver_runtime_$(id -u $USER)"
mkdir -p "$XDG_RUNTIME_DIR"
chown "$USER:$GROUP" "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR"
fi
export XDG_RUNTIME_DIR
su -c "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR $(realpath bin/user/install)" $USER
###############################
### BEGIN sudo required section
if ! { lsmod | grep -q uinput || [[ -c /dev/uinput ]]; }; then
echo "Setting up uinput kernel module"
modprobe uinput
fi
# if steamos is detected, we need to install the udev rules to /etc since /usr is on the readonly FS
UDEV_RULES_DIR="/usr/lib/udev/rules.d"
UDEV_RULES_DIR_CHANGED=0
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" == "steamos" ]; then
UDEV_RULES_DIR="/etc/udev/rules.d"
UDEV_RULES_DIR_CHANGED=1
fi
fi
if [ $UDEV_RULES_DIR_CHANGED -eq 0 ]; then
if touch "$UDEV_RULES_DIR/100-xr-driver-test-rule" 2>/dev/null; then
rm "$UDEV_RULES_DIR/100-xr-driver-test-rule"
else
UDEV_RULES_DIR="/etc/udev/rules.d"
fi
fi
mkdir -p $UDEV_RULES_DIR
echo "Copying the udev rules to ${UDEV_RULES_DIR}"
cp udev/* $UDEV_RULES_DIR
udevadm control --reload-rules >/dev/null 2>&1
for subsystem in usb hidraw input; do
udevadm trigger --action=add --subsystem-match="$subsystem" >/dev/null 2>&1 || true
done
udevadm settle >/dev/null 2>&1 || true
# remove temporary files that may be left behind, sometimes they cause problems
rm -f /tmp/shader_runtime_*
rm -f /dev/shm/xr_*
rm -f /dev/shm/breezy_desktop_imu
### END sudo required section
###############################
if [ -n "$SKIP_SYSTEMD" ]; then
printf "\n\033[1;33m!!! IMPORTANT !!!\033[0m\n"
echo "SKIP_SYSTEMD set; skipping systemd service startup."
echo "You are responsible for starting the driver manually when needed:"
printf "\tLD_LIBRARY_PATH=\"${DATA_DIR}/lib\" ${BIN_DIR}/xrDriver\n\n"
else
# this part of the setup should be run as the user, not root
su -l -c "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR $(realpath bin/user/systemd_start)" $USER
###############################
### BEGIN sudo required section
# Ensure the user service persists after logout
loginctl enable-linger $USER
### END sudo required section
###############################
fi
================================================
FILE: bin/ua.sh
================================================
MEASUREMENT_ID="G-Z94MXP18T6"
# if UA_EVENT_VERSION is set, copy its value and replace any dots in the value with underscores, then append it to UA_EVENT_NAME
if [ -n "$UA_EVENT_VERSION" ]; then
UA_EVENT_NAME="$(echo $UA_EVENT_NAME)_$(echo $UA_EVENT_VERSION | sed 's/\./_/g')"
fi
POST_DATA=$(cat <<EOF
{
"client_id": "$UA_CLIENT_ID",
"events": [
{
"name": "$UA_EVENT_NAME"
}
]
}
EOF
)
# make sure this is always silent and can't cause failures
curl -X POST -H "Content-Type: application/json" -d "$POST_DATA" "https://www.google-analytics.com/mp/collect?api_secret=$UA_API_SECRET&measurement_id=$MEASUREMENT_ID" >/dev/null 2>&1 || true
================================================
FILE: bin/user/install
================================================
#!/usr/bin/env bash
set -e
# this part of the setup should be run as the user, not root
if [ "$(id -u)" == "0" ]; then
echo "This script must NOT be run as root" 1>&2
exit 1
fi
GROUP=$(id -gn $USER)
USER_HOME=$(getent passwd $USER | cut -d: -f6)
UA_EVENT_NAME="install"
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$USER_HOME/.local/share"
fi
SYSTEMD_USER_DIR="$XDG_DATA_HOME/systemd/user"
DATA_DIR="$XDG_DATA_HOME/xr_driver"
if [ -z "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$USER_HOME/.config"
fi
CONFIG_DIR="$XDG_CONFIG_HOME/xr_driver"
if [ -z "$XDG_BIN_HOME" ]; then
XDG_BIN_HOME="$USER_HOME/.local/bin"
fi
OLD_BIN_DIR="$USER_HOME/bin"
BIN_DIR="$XDG_BIN_HOME"
if [ -z "$XDG_STATE_HOME" ]; then
XDG_STATE_HOME="$USER_HOME/.local/state"
fi
STATE_DIR="$XDG_STATE_HOME/xr_driver"
if [ -e "$OLD_BIN_DIR/xreal_driver_uninstall" ]; then
echo "Cleaning up the previous installation"
# ` || true` will ensure that this can't cause a failure, even with `set -e`
$OLD_BIN_DIR/xreal_driver_uninstall --for-install || true
UA_EVENT_NAME="update"
fi
if [ -e "$BIN_DIR/xr_driver_uninstall" ]; then
echo "Cleaning up the previous installation"
# ` || true` will ensure that this can't cause a failure, even with `set -e`
$BIN_DIR/xr_driver_uninstall --for-install || true
UA_EVENT_NAME="update"
fi
UA_CLIENT_ID="ARLinuxDriver"
UA_EVENT_VERSION="$1"
#INJECT_UA_CALL
# make sure the systemd service isn't already running from a previous install
systemctl --user is-active --quiet xr-driver && systemctl --user stop xr-driver
echo "Copying shared libraries to ${DATA_DIR}/lib"
mkdir -p $DATA_DIR/lib
cp lib/* "$DATA_DIR/lib" 2>/dev/null || true
if [ -e "$USER_HOME/.xreal_driver_config" ]; then
echo "Migrating config file to ${CONFIG_DIR}/config.ini"
mv $USER_HOME/.xreal_driver_config $CONFIG_DIR/config.ini
fi
if [ -e "$USER_HOME/.xreal_driver_log" ]; then
echo "Migrating log file to ${STATE_DIR}/driver.log"
mv $USER_HOME/.xreal_driver_log ${STATE_DIR}/driver.log
fi
if [ -e "/var/lib/xr_driver/device_license" ]; then
echo "Migrating device license to ${STATE_DIR}/license.json"
pushd /var/lib/xr_driver > /dev/null
# since the file has root ownership, rename it before moving to a user directory
mv "device_license" "license.json"
mv "license.json" "${STATE_DIR}/license.json"
popd > /dev/null
fi
# escaping sed replace: https://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern
ESCAPED_USER_HOME=$(printf '%s\n' "$USER_HOME" | sed -e 's/[\/&]/\\&/g')
ESCAPED_LD_LIBRARY_PATH=$(printf '%s\n' "$DATA_DIR/lib" | sed -e 's/[\/&]/\\&/g')
ESCAPED_BIN_DIR=$(printf '%s\n' "$BIN_DIR" | sed -e 's/[\/&]/\\&/g')
echo "Copying driver binary and scripts to ${BIN_DIR} and ${DATA_DIR}"
pushd bin > /dev/null
sed -i -e "s/{bin_dir}/$ESCAPED_BIN_DIR/g" xr_driver_verify
cp xrDriver $BIN_DIR
cp xr_driver_cli $BIN_DIR
cp xr_driver_uninstall $BIN_DIR
cp xr_driver_logs $BIN_DIR
cp xr_driver_verify $BIN_DIR
# keep putting this in the old location in case an older version of the script tries to find it
cp xr_driver_uninstall $OLD_BIN_DIR/xreal_driver_uninstall
popd > /dev/null
cp manifest $DATA_DIR
echo "Copying the systemd service to ${SYSTEMD_USER_DIR}"
sed -i -e "s/{user_home}/$ESCAPED_USER_HOME/g" \
-e "s/{user}/$USER/g" \
-e "s/{ld_library_path}/$ESCAPED_LD_LIBRARY_PATH/g" \
-e "s/{bin_dir}/$ESCAPED_BIN_DIR/g" systemd/xr-driver.service
cp systemd/xr-driver.service $SYSTEMD_USER_DIR
# clear bash's cache of executable locations, so it can find the newly installed scripts
hash -r
================================================
FILE: bin/user/systemd_start
================================================
#!/usr/bin/env bash
set -e
# this part of the setup should be run as the user, not root
if [ "$(id -u)" == "0" ]; then
echo "This script must NOT be run as root" 1>&2
exit 1
fi
if ! command -v systemctl >/dev/null 2>&1; then
printf '\n\033[31mERROR\033[0m systemd was not found on this system. If you would still like to proceed without the background service, rerun this script with SKIP_SYSTEMD=1.\n'
exit 1
fi
echo "Setting up the systemd service"
systemctl --user daemon-reload
systemctl --user start xr-driver
# check if systemd startup was successful
if ! systemctl --user is-active --quiet xr-driver; then
echo "systemd startup failed"
exit 1
fi
# set it to run on startup
systemctl --user enable xr-driver
================================================
FILE: bin/xr_driver_cli
================================================
#!/usr/bin/env bash
if ! systemctl --user --quiet is-active xr-driver >/dev/null 2>&1; then
if [ -z "$IGNORE_SYSTEMD_ERRORS" ]; then
echo "xr-driver service is not active. Start it with:" >&2
echo " systemctl --user start xr-driver" >&2
echo ""
echo "If the issue persists, please create an issue on the wheaney/XRLinuxDriver repository."
echo ""
echo "To ignore this error, rerun with IGNORE_SYSTEMD_ERRORS=1"
exit 1
else
echo "Warning: xr-driver service is not active, most actions will be ineffective until this is resolved. Continuing due to IGNORE_SYSTEMD_ERRORS..." >&2
fi
fi
USER=${SUDO_USER:-$USER}
USER_HOME=$(getent passwd $USER | cut -d: -f6)
if [ -z "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$USER_HOME/.config"
fi
CONFIG_DIR="$XDG_CONFIG_HOME/xr_driver"
if [ ! -d "$CONFIG_DIR" ]; then
mkdir -p $CONFIG_DIR
fi
if [ -z "$XDG_STATE_HOME" ]; then
XDG_STATE_HOME="$USER_HOME/.local/state"
fi
LOG_FILE="$XDG_STATE_HOME/xr_driver/driver.log"
ensure_config_file() {
local file="$1"
if [ ! -f "$file" ]; then
touch "$file"
fi
}
write_config_value() {
local file="$1"
local key="$2"
local value="$3"
if grep -q "^$key=" "$file"; then
sed -i "s/^$key=.*/$key=$value/" "$file"
else
echo "$key=$value" >> "$file"
fi
}
read_config_value() {
local file="$1"
local key="$2"
local type="$3"
local value
if [ "$type" == "string" ]; then
value="Not set"
else
value="enabled"
fi
while read -r line; do
if [[ $line == "$key="* ]]; then
local raw_value=${line#*=}
if [ "$type" == "string" ]; then
value=$raw_value
else
if [ "$raw_value" == "true" ]; then
value="disabled"
fi
fi
break
fi
done < "$file"
echo "$value"
}
process_config() {
local file="$1"
local key="$2"
local value="$3"
local type="$4"
local key2="$5"
local value2="$6"
local token_action="$7"
local token_arg="$8"
ensure_config_file "$file"
if [[ -n $value ]]; then
write_config_value "$file" "$key" "$value"
if [[ -n $key2 ]]; then
write_config_value "$file" "$key2" "$value2"
fi
return 0
fi
local read_value
read_value=$(read_config_value "$file" "$key" "$type")
if [[ -n $token_action ]]; then
local hardware_id="$read_value"
local url="https://eu.driver-backend.xronlinux.com/tokens/v1"
local message=""
if [[ "$token_action" == "request" || "$token_action" == "verify" ]] && ! command -v jq >/dev/null 2>&1; then
echo "Error: jq utility not found. Install jq to use this feature." >&2
exit 1
fi
if [ "$token_action" == "request" ]; then
postbody=$(jq -n \
--arg hardwareId "$hardware_id" \
--arg email "$token_arg" \
'{hardwareId: $hardwareId, email: $email}')
message=$(curl -s -X POST -H "Content-Type: application/json" -d "$postbody" "$url" | jq -r '.message')
elif [ "$token_action" == "verify" ]; then
postbody=$(jq -n \
--arg hardwareId "$hardware_id" \
--arg token "$token_arg" \
'{hardwareId: $hardwareId, token: $token}')
message=$(curl -s -X PUT -H "Content-Type: application/json" -d "$postbody" "$url" | jq -r '.message')
elif [ "$token_action" == "refresh" ]; then
echo "refresh_device_license=true" > /dev/shm/xr_driver_control
message="License refresh requested"
elif [ "$token_action" == "get" ]; then
message="$hardware_id"
fi
if [ -n "$message" ]; then
echo "$message"
fi
else
echo "$read_value"
fi
}
require_arg() {
local opt="$1"
local arg="$2"
if [ -z "$arg" ] || [ "$arg" == "--" ]; then
echo "Error: $opt requires an argument." >&2
exit 1
fi
}
print_usage() {
echo "Usage: $0 [options]
Options:
-h, --help
-l, --view-log
-d, --disable
-e, --enable
-s, --status
-j, --use-joystick
-m, --use-mouse
--vr-lite-invert-x, --no-vr-lite-invert-x
--vr-lite-invert-y, --no-vr-lite-invert-y
--gamescope-reshade-wayland, --no-gamescope-reshade-wayland
-ms, --mouse-sensitivity [sensitivity_value]
--look-ahead-ms [milliseconds]
-dz, --deadzone-threshold-degrees [threshold_degrees]
--multi-tap, --no-multi-tap
-ds, --display-size [display_size]
-dd, --display-distance [display_distance]
-em, --external-mode
-de, --disable-external
-vd, --virtual-display
-bd, --breezy-desktop
--opentrack-app
-sv, --sideview
-svp, --sideview-position [top_left|top_right|bottom_left|bottom_right]
--smooth-follow, --no-smooth-follow
-sft, --smooth-follow-threshold [threshold_value]
--curved-display, --no-curved-display
--smooth-follow-track-roll, --no-smooth-follow-track-roll
--smooth-follow-track-pitch, --no-smooth-follow-track-pitch
--smooth-follow-track-yaw, --no-smooth-follow-track-yaw
-sbsms, --sbs-mode-stretched, --no-sbs-mode-stretched
-sbs3d, --sbs-content-3d, --no-sbs-content-3d
-nsh, --neck-saver-horizontal [multiplier]
-nsv, --neck-saver-vertical [multiplier]
--opentrack-app-ip [ip]
--opentrack-app-port [port]
--opentrack-listener, --no-opentrack-listener
--opentrack-listen-ip [ip]
--opentrack-listen-port [port]
--metrics, --no-metrics
--request-token [email]
--verify-token [token]
--refresh-license
--get-hardware-id"
}
if [ $# -eq 0 ]; then
print_usage
exit 0
fi
if [ -n "$1" ]; then
if ! command -v getopt >/dev/null 2>&1; then
echo "Error: getopt utility not found. Install getopt to use this CLI." >&2
exit 1
fi
normalized_args=()
for arg in "$@"; do
case "$arg" in
-ms) normalized_args+=("--mouse-sensitivity") ;;
-dz) normalized_args+=("--deadzone-threshold-degrees") ;;
-ds) normalized_args+=("--display-size") ;;
-dd) normalized_args+=("--display-distance") ;;
-em) normalized_args+=("--external-mode") ;;
-de) normalized_args+=("--disable-external") ;;
-vd) normalized_args+=("--virtual-display") ;;
-bd) normalized_args+=("--breezy-desktop") ;;
-sv) normalized_args+=("--sideview") ;;
-svp) normalized_args+=("--sideview-position") ;;
-sft) normalized_args+=("--smooth-follow-threshold") ;;
-sbsms) normalized_args+=("--sbs-mode-stretched") ;;
-sbs3d) normalized_args+=("--sbs-content-3d") ;;
-nsh) normalized_args+=("--neck-saver-horizontal") ;;
-nsv) normalized_args+=("--neck-saver-vertical") ;;
*) normalized_args+=("$arg") ;;
esac
done
PARSED=$(getopt -o hldesjm --long help,view-log,disable,enable,status,use-joystick,use-mouse,vr-lite-invert-x,no-vr-lite-invert-x,vr-lite-invert-y,no-vr-lite-invert-y,gamescope-reshade-wayland,no-gamescope-reshade-wayland,mouse-sensitivity:,look-ahead-ms:,deadzone-threshold-degrees:,debug:,display-size:,display-distance:,external-mode,disable-external,virtual-display,breezy-desktop,opentrack-app,sideview,sideview-position:,smooth-follow,no-smooth-follow,smooth-follow-threshold:,curved-display,no-curved-display,smooth-follow-track-roll,no-smooth-follow-track-roll,smooth-follow-track-pitch,no-smooth-follow-track-pitch,smooth-follow-track-yaw,no-smooth-follow-track-yaw,sbs-mode-stretched,no-sbs-mode-stretched,sbs-content-3d,no-sbs-content-3d,multi-tap,no-multi-tap,neck-saver-horizontal:,neck-saver-vertical:,opentrack-app-ip:,opentrack-app-port:,opentrack-listener,no-opentrack-listener,opentrack-listen-ip:,opentrack-listen-port:,metrics,no-metrics,request-token:,verify-token:,refresh-license,get-hardware-id -- "${normalized_args[@]}")
if [ $? -ne 0 ]; then
exit 1
fi
eval set -- "$PARSED"
default_config_file="$CONFIG_DIR/config.ini"
state_config_file="/dev/shm/xr_driver_state"
while true; do
case "$1" in
-h|--help)
print_usage
exit 0
;;
-l|--view-log)
less +F "$LOG_FILE"
exit 0
;;
-d|--disable)
process_config "$default_config_file" "disabled" "true"
shift
;;
-e|--enable)
process_config "$default_config_file" "disabled" "false"
shift
;;
-s|--status)
process_config "$default_config_file" "disabled" "" ""
shift
;;
-j|--use-joystick)
process_config "$default_config_file" "output_mode" "joystick" "string" "external_mode" "none"
shift
;;
-m|--use-mouse)
process_config "$default_config_file" "output_mode" "mouse" "string" "external_mode" "none"
shift
;;
--vr-lite-invert-x)
process_config "$default_config_file" "vr_lite_invert_x" "true"
shift
;;
--no-vr-lite-invert-x)
process_config "$default_config_file" "vr_lite_invert_x" "false"
shift
;;
--vr-lite-invert-y)
process_config "$default_config_file" "vr_lite_invert_y" "true"
shift
;;
--no-vr-lite-invert-y)
process_config "$default_config_file" "vr_lite_invert_y" "false"
shift
;;
--gamescope-reshade-wayland)
process_config "$default_config_file" "gamescope_reshade_wayland_disabled" "false"
shift
;;
--no-gamescope-reshade-wayland)
process_config "$default_config_file" "gamescope_reshade_wayland_disabled" "true"
shift
;;
--mouse-sensitivity)
require_arg "$1" "$2"
process_config "$default_config_file" "mouse_sensitivity" "$2" "string"
shift 2
;;
--look-ahead-ms)
require_arg "$1" "$2"
process_config "$default_config_file" "look_ahead" "$2" "string"
shift 2
;;
--deadzone-threshold-degrees)
require_arg "$1" "$2"
process_config "$default_config_file" "dead_zone_threshold_deg" "$2" "string"
shift 2
;;
--debug)
require_arg "$1" "$2"
process_config "$default_config_file" "debug" "$2" "string"
shift 2
;;
--display-size)
require_arg "$1" "$2"
process_config "$default_config_file" "display_size" "$2" "string"
shift 2
;;
--display-distance)
require_arg "$1" "$2"
process_config "$default_config_file" "display_distance" "$2" "string"
shift 2
;;
--external-mode)
process_config "$default_config_file" "external_mode" "" "string"
shift
;;
--disable-external)
process_config "$default_config_file" "external_mode" "none" "string"
shift
;;
--virtual-display)
process_config "$default_config_file" "output_mode" "external_only" "string" "external_mode" "virtual_display"
shift
;;
--breezy-desktop)
process_config "$default_config_file" "output_mode" "external_only" "string" "external_mode" "breezy_desktop"
shift
;;
--opentrack-app)
process_config "$default_config_file" "output_mode" "external_only" "string" "external_mode" "opentrack"
shift
;;
--sideview)
process_config "$default_config_file" "output_mode" "external_only" "string" "external_mode" "sideview"
shift
;;
--sideview-position)
require_arg "$1" "$2"
process_config "$default_config_file" "sideview_position" "$2" "string"
shift 2
;;
--smooth-follow)
process_config "$default_config_file" "sideview_smooth_follow_enabled" "true"
shift
;;
--no-smooth-follow)
process_config "$default_config_file" "sideview_smooth_follow_enabled" "false"
shift
;;
--smooth-follow-threshold)
require_arg "$1" "$2"
process_config "$default_config_file" "sideview_follow_threshold" "$2" "string"
shift 2
;;
--curved-display)
process_config "$default_config_file" "curved_display" "true"
shift
;;
--no-curved-display)
process_config "$default_config_file" "curved_display" "false"
shift
;;
--smooth-follow-track-roll)
process_config "$default_config_file" "smooth_follow_track_roll" "true"
shift
;;
--no-smooth-follow-track-roll)
process_config "$default_config_file" "smooth_follow_track_roll" "false"
shift
;;
--smooth-follow-track-pitch)
process_config "$default_config_file" "smooth_follow_track_pitch" "true"
shift
;;
--no-smooth-follow-track-pitch)
process_config "$default_config_file" "smooth_follow_track_pitch" "false"
shift
;;
--smooth-follow-track-yaw)
process_config "$default_config_file" "smooth_follow_track_yaw" "true"
shift
;;
--no-smooth-follow-track-yaw)
process_config "$default_config_file" "smooth_follow_track_yaw" "false"
shift
;;
--sbs-mode-stretched)
process_config "$default_config_file" "sbs_mode_stretched" "true" "string"
shift
;;
--no-sbs-mode-stretched)
process_config "$default_config_file" "sbs_mode_stretched" "false" "string"
shift
;;
--sbs-content-3d)
process_config "$default_config_file" "sbs_content" "true" "string"
shift
;;
--no-sbs-content-3d)
process_config "$default_config_file" "sbs_content" "false" "string"
shift
;;
--neck-saver-horizontal)
require_arg "$1" "$2"
process_config "$default_config_file" "neck_saver_horizontal_multiplier" "$2" "string"
shift 2
;;
--neck-saver-vertical)
require_arg "$1" "$2"
process_config "$default_config_file" "neck_saver_vertical_multiplier" "$2" "string"
shift 2
;;
--opentrack-app-ip)
require_arg "$1" "$2"
process_config "$default_config_file" "opentrack_app_ip" "$2" "string"
shift 2
;;
--opentrack-app-port)
require_arg "$1" "$2"
process_config "$default_config_file" "opentrack_app_port" "$2" "string"
shift 2
;;
--opentrack-listener)
process_config "$default_config_file" "opentrack_listener_enabled" "true"
shift
;;
--no-opentrack-listener)
process_config "$default_config_file" "opentrack_listener_enabled" "false"
shift
;;
--opentrack-listen-ip)
require_arg "$1" "$2"
process_config "$default_config_file" "opentrack_listen_ip" "$2" "string"
shift 2
;;
--opentrack-listen-port)
require_arg "$1" "$2"
process_config "$default_config_file" "opentrack_listen_port" "$2" "string"
shift 2
;;
--multi-tap)
process_config "$default_config_file" "multi_tap_enabled" "true"
shift
;;
--no-multi-tap)
process_config "$default_config_file" "multi_tap_enabled" "false"
shift
;;
--metrics)
process_config "$default_config_file" "metrics_disabled" "false"
shift
;;
--no-metrics)
process_config "$default_config_file" "metrics_disabled" "true"
shift
;;
--request-token)
require_arg "$1" "$2"
process_config "$state_config_file" "hardware_id" "" "string" "" "" "request" "$2"
shift 2
;;
--verify-token)
require_arg "$1" "$2"
process_config "$state_config_file" "hardware_id" "" "string" "" "" "verify" "$2"
shift 2
;;
--refresh-license)
process_config "$state_config_file" "hardware_id" "" "string" "" "" "refresh"
shift
;;
--get-hardware-id)
process_config "$state_config_file" "hardware_id" "" "string" "" "" "get"
shift
;;
--)
shift
break
;;
*)
break
;;
esac
done
fi
================================================
FILE: bin/xr_driver_logs
================================================
#!/usr/bin/env bash
# exit when any command fails
set -e
if [ "$(id -u)" == "0" ]; then
echo "This script must not be run as root" 1>&2
exit 1
fi
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
# Determine the directory containing this script as invoked.
# This makes the script packaging-friendly (e.g. distro/AUR installs), since
# companion scripts are expected to be installed alongside it.
script_ref="$0"
if [[ "$script_ref" != */* ]]; then
script_ref="$(command -v -- "$script_ref" 2>/dev/null || echo "$script_ref")"
fi
script_dir="$(cd -P -- "$(dirname -- "$script_ref")" && pwd -P)"
# Create a temp directory to gather logs
tmp_dir=$(mktemp -d -t xr-driver-logs-XXXXXXXXXX)
echo "Gathering logs into temp directory: ${tmp_dir}"
mkdir -p "$tmp_dir/xr_driver_logs"
# Copy XR driver log
if [ -f "$XDG_STATE_HOME/xr_driver/driver.log" ]; then
cp "$XDG_STATE_HOME/xr_driver/driver.log" "$tmp_dir/xr_driver_logs/driver.log"
else
echo "Warning: XR driver log not found at $XDG_STATE_HOME/xr_driver/driver.log"
fi
# Copy XR driver config
if [ -f "$HOME/.config/xr_driver/config.ini" ]; then
cp "$HOME/.config/xr_driver/config.ini" "$tmp_dir/xr_driver_logs/config.ini"
else
echo "Warning: XR driver config not found at $HOME/.config/xr_driver/config.ini"
fi
copy_breezy_logs() {
if [ ! -d "$script_dir" ]; then
return 0
fi
local breezy_scripts
breezy_scripts=$(find "$script_dir" -maxdepth 1 -type f -name 'breezy_*_logs' -perm -u+x -print 2>/dev/null || true)
if [ -z "$breezy_scripts" ]; then
return 0
fi
while IFS= read -r script_path; do
[ -z "$script_path" ] && continue
local script_name
script_name=$(basename "$script_path")
echo "Running $script_name to collect Breezy logs"
local run_dir
run_dir=$(mktemp -d -p "$tmp_dir" breezy-run-XXXXXXXXXX)
set +e
(cd "$run_dir" && "$script_path")
local rc=$?
set -e
if [ "$rc" -ne 0 ]; then
echo "Warning: $script_name exited with code $rc"
rm -rf "$run_dir"
continue
fi
local archive
archive=$(find "$run_dir" -maxdepth 1 -type f -name '*.tar.gz' -printf '%T@ %p\n' 2>/dev/null | sort -nr | head -n 1 | cut -d' ' -f2-)
if [ -z "$archive" ]; then
echo "Warning: $script_name did not produce a .tar.gz archive"
rm -rf "$run_dir"
continue
fi
cp "$archive" "$tmp_dir/xr_driver_logs/"
rm -rf "$run_dir"
done <<< "$breezy_scripts"
}
copy_breezy_logs
# Create archive
archive_name="xr_driver_logs_$(date +%Y%m%d_%H%M%S).tar.gz"
tar -czf "$archive_name" -C "$tmp_dir" xr_driver_logs
echo "Created log archive: $(pwd)/$archive_name"
rm -rf "$tmp_dir"
================================================
FILE: bin/xr_driver_ot_profile_setup
================================================
#!/usr/bin/env bash
set -euo pipefail
default_ini=""
# Pick the newest ~/.config/opentrack-*/default.ini.
shopt -s nullglob
candidates=("${HOME}/.config"/opentrack-*/default.ini)
shopt -u nullglob
if [[ ${#candidates[@]} -gt 0 ]]; then
# Sort naturally (version-like) and take the last.
default_ini="$(printf '%s\n' "${candidates[@]}" | sort -V | tail -n 1)"
fi
if [[ -z "$default_ini" ]]; then
cat >&2 <<EOF
error: opentrack config not found
Looked for:
${HOME}/.config/opentrack-*/default.ini
If you haven't already, run opentrack once to generate the config, then re-run this script.
If issues persist, please open an Issue on this Github repository.
EOF
exit 2
fi
cfg_dir="$(dirname "$default_ini")"
dst="${cfg_dir}/xr-driver.ini"
tmp="$(mktemp "${cfg_dir}/.xr-driver.ini.tmp.XXXXXX")"
cat >"$tmp" <<'EOF'
[modules]
filter-dll=nm
protocol-dll=udp
tracker-dll=neuralnet
[opentrack-mappings]
x-max-output-value=-100
x-max-value=100
y-max-output-value=-100
y-max-value=100
z-max-output-value=-100
z-max-value=100
[opentrack-ui]
pitch-invert-sign=true
roll-invert-sign=true
x-invert-sign=true
x-source-index=0
y-source-index=1
yaw-invert-sign=true
z-source-index=2
[udp-proto]
ip1=127
ip2=0
ip3=0
ip4=1
EOF
chmod 0644 "$tmp" 2>/dev/null || true
mv -f "$tmp" "$dst"
echo "xr-driver profile created. Launch opentrack and choose "xr-driver.ini" from the Profile menu."
================================================
FILE: bin/xr_driver_setup
================================================
#!/usr/bin/env bash
# This setup script should do the minimum work required to download the release package, unzip it, and kick off the
# setup script contained within.
# exit when any command fails
set -e
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
check_command() {
if ! command -v "$1" &>/dev/null; then
echo "Please install \"$1\" and make sure it's available in your \$PATH, then rerun the setup."
exit 1
fi
}
check_command "curl"
ARCH=$(uname -m)
start_dir=$(pwd)
# create temp directory
tmp_dir=$(mktemp -d -t xr-driver-XXXXXXXXXX)
pushd $tmp_dir > /dev/null
echo "Created temp directory: ${tmp_dir}"
binary_download_url="https://github.com/wheaney/XRLinuxDriver/releases/latest/download/xrDriver-$ARCH.tar.gz"
lib_download_url="https://github.com/wheaney/XRLinuxDriver/releases/latest/download/xrDriver-libs-$ARCH.tar.gz"
if [ "$1" = "-v" ]
then
metrics_version="$2"
local_dir_arg="$3"
elif [ "$1" = "--tag" ] && [ -n "$2" ]
then
binary_download_url="https://github.com/wheaney/XRLinuxDriver/releases/download/$2/xrDriver-$ARCH.tar.gz"
lib_download_url="https://github.com/wheaney/XRLinuxDriver/releases/download/$2/xrDriver-libs-$ARCH.tar.gz"
else
local_dir_arg="$1"
fi
# Handle local directory if provided
if [ -n "$local_dir_arg" ]
then
# Convert relative path to absolute path
if [[ "$local_dir_arg" = /* ]]; then
local_dir="$local_dir_arg"
else
local_dir=$(realpath "$start_dir/$local_dir_arg")
fi
# Check for driver archive in the local directory
binary_path_arg="$local_dir/xrDriver-$ARCH.tar.gz"
if [ ! -f "$binary_path_arg" ]; then
echo "Error: Driver archive not found at $binary_path_arg"
exit 1
fi
# Check for lib archive in the local directory
lib_path_arg="$local_dir/xrDriver-libs-$ARCH.tar.gz"
if [ ! -f "$lib_path_arg" ]; then
echo "Error: Lib archive not found at $lib_path_arg"
YELLOW='\e[1;33m'
RESET='\e[0m'
echo -e "\n${YELLOW}IMPORTANT${RESET}: Be sure you're using the latest version of the setup script\n"
exit 1
fi
fi
if [ -z "$binary_path_arg" ]
then
# download and unzip the latest driver
binary_path_arg="xrDriver-$ARCH.tar.gz"
echo "Downloading to: ${tmp_dir}/$binary_path_arg"
curl -L "$binary_download_url" > "$binary_path_arg"
else
cp $binary_path_arg $tmp_dir
fi
echo "Extracting to: ${tmp_dir}/xr_driver"
tar -xf $(basename $binary_path_arg)
# Handle lib archive
if [ -z "$lib_path_arg" ]
then
# download and unzip the latest lib archive
lib_path_arg="xrDriver-libs-$ARCH.tar.gz"
echo "Downloading to: ${tmp_dir}/$lib_path_arg"
curl -L "$lib_download_url" > "$lib_path_arg"
else
cp $lib_path_arg $tmp_dir
fi
echo "Extracting lib to: ${tmp_dir}/xr_driver/lib"
tar -xf $(basename $lib_path_arg)
# Move lib files to xr_driver/lib subdirectory
mkdir -p xr_driver/lib
mv xr_driver_lib/* xr_driver/lib/
rmdir xr_driver_lib
pushd xr_driver > /dev/null
# run the setup script that comes with this release, pass in the metrics version
./setup $metrics_version
echo "Deleting temp directory: ${tmp_dir}"
rm -rf $tmp_dir
cd "$(dirs -l -0)" && dirs -c
================================================
FILE: bin/xr_driver_uninstall
================================================
#!/usr/bin/env bash
for_install=0
if [[ -n "$1" ]] && [[ "$1" == "--for-install" ]]; then
for_install=1
fi
# we don't want the uninstall script to be able to cause a failure if being triggered by the setup script
[ "$for_install" -eq 0 ] && set -e
# Get the directory of the current script
script_dir=$(dirname "$0")
USER=${SUDO_USER:-$USER}
USER_HOME=$(getent passwd $USER | cut -d: -f6)
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$USER_HOME/.local/share"
fi
SYSTEMD_DATA_DIR="$XDG_DATA_HOME/systemd"
SYSTEMD_USER_DIR="$SYSTEMD_DATA_DIR/user"
DATA_DIR="$XDG_DATA_HOME/xr_driver"
if [ -z "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$USER_HOME/.config"
fi
CONFIG_DIR="$XDG_CONFIG_HOME/xr_driver"
if [ -z "$XDG_BIN_HOME" ]; then
XDG_BIN_HOME="$USER_HOME/.local/bin"
fi
OLD_BIN_DIR="$USER_HOME/bin"
BIN_DIR="$XDG_BIN_HOME"
if [ -z "$XDG_STATE_HOME" ]; then
XDG_STATE_HOME="$USER_HOME/.local/state"
fi
STATE_DIR="$XDG_STATE_HOME/xr_driver"
[ "$for_install" -eq 0 ] && echo "Removing the systemd service"
# if this is root
if [ "$(id -u)" == "0" ]; then
export XDG_RUNTIME_DIR=/run/user/$(id -u $USER)
if su -l -c "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR systemctl --user is-active --quiet xr-driver" $USER; then
su -l -c "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR systemctl --user stop xr-driver" $USER
fi
else
if systemctl --user is-active --quiet xr-driver; then
systemctl --user stop xr-driver
fi
fi
[ "$for_install" -eq 0 ] && echo "Removing the systemd service from ${SYSTEMD_USER_DIR}"
rm -f $SYSTEMD_USER_DIR/xr-driver.service
UDEV_RULES_DIR="/usr/lib/udev/rules.d"
ALT_UDEV_RULES_DIR="/etc/udev/rules.d"
[ "$for_install" -eq 0 ] && echo "Removing the udev rules from ${UDEV_RULES_DIR} or ${ALT_UDEV_RULES_DIR}"
sudo rm $UDEV_RULES_DIR/70-*-xr.rules > /dev/null 2>&1 || true
sudo rm $ALT_UDEV_RULES_DIR/70-*-xr.rules > /dev/null 2>&1 || true
if [ "$for_install" -eq 0 ]; then
echo "Removing installed files from $STATE_DIR, $CONFIG_DIR, $DATA_DIR, and $BIN_DIR"
UA_EVENT_NAME="uninstall"
UA_CLIENT_ID="ARLinuxDriver"
#INJECT_UA_CALL
rm -rf $STATE_DIR
rm -rf $CONFIG_DIR
fi
rm -rf $DATA_DIR
rm -f $BIN_DIR/xrDriver
rm -f $BIN_DIR/xr_driver_cli
rm -f $BIN_DIR/xr_driver_verify
rm -f $BIN_DIR/xr_driver_logs
rm -f /tmp/shader_runtime_*
rm -f /dev/shm/xr_*
rm -f /dev/shm/breezy_desktop_imu
# this script is self-deleting, leave this as the last command
# remove the one we're not using first
if [ "$script_dir" = "$OLD_BIN_DIR" ]; then
rm -f "$BIN_DIR/xr_driver_uninstall"
rm -f "$OLD_BIN_DIR/xreal_driver_uninstall"
else
rm -f "$OLD_BIN_DIR/xreal_driver_uninstall"
rm -f "$BIN_DIR/xr_driver_uninstall"
fi
================================================
FILE: bin/xr_driver_verify
================================================
#!/usr/bin/env bash
set -e
USER=${SUDO_USER:-$USER}
USER_HOME=$(getent passwd $USER | cut -d: -f6)
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$USER_HOME/.local/share"
fi
DATA_DIR="$XDG_DATA_HOME/xr_driver"
if [ ! -e "$DATA_DIR/manifest" ]; then
echo "Verification failed" >&2
exit 1
fi
# Get the directory of the current script
script_dir=$(dirname "$0")
# create a string to string mapping, file name to expected file location
declare -A file_paths
file_paths=(
["xrDriver"]="{bin_dir}/xrDriver"
["xr_driver_cli"]="{bin_dir}/xr_driver_cli"
["xr_driver_uninstall"]="{bin_dir}/xr_driver_uninstall"
["xr_driver_logs"]="{bin_dir}/xr_driver_logs"
)
# verify the file hashes in ./manifest
while IFS= read -r line
do
# split the line into hash and filename
manifest_hash=$(echo $line | awk '{print $1}')
file=$(echo $line | awk '{print $2}')
actual_file_path=${file_paths[$file]}
# compute the SHA256 hash of the actual file
actual_hash=$(sha256sum $actual_file_path | awk '{print $1}')
# compare the hashes
if ! [ "$manifest_hash" = "$actual_hash" ]; then
echo "Verification failed" >&2
exit 1
fi
done < "$DATA_DIR/manifest"
echo "Verification succeeded"
================================================
FILE: docker-build/Dockerfile
================================================
# To run the build from the package root:
# docker buildx build --platform linux/amd64,linux/arm64 -f ./docker-build/Dockerfile -t "xr-driver" .
# docker run --rm -t -v ./:/source -v --platform linux/amd64 "xr-driver:amd64"
# docker run --rm -t -v ./:/source -v --platform linux/arm64 "xr-driver:arm64"
FROM --platform=$TARGETPLATFORM debian:stable-20250428-slim
ARG TARGETPLATFORM
RUN echo "Target platform: $TARGETPLATFORM"
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
pkg-config \
libudev-dev \
libusb-1.0-0-dev \
libcurl4-openssl-dev \
libevdev-dev \
libssl-dev \
libjson-c-dev \
python3 \
python3-yaml \
libwayland-dev \
cargo \
rustc \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /source
CMD bin/package
================================================
FILE: docker-build/Dockerfile.aarch64
================================================
# To run the build from the package root:
# docker buildx build --platform linux/amd64,linux/arm64 -f ./docker-build/Dockerfile -t "xr-driver" .
# docker run --rm -t -v ./:/source -v --platform linux/amd64 "xr-driver:amd64"
# docker run --rm -t -v ./:/source -v --platform linux/arm64 "xr-driver:arm64"
# Support Raspberry Pi OS Bookworm (64-bit) and later
FROM --platform=$TARGETPLATFORM debian:bookworm-slim
ARG TARGETPLATFORM
RUN echo "Target platform: $TARGETPLATFORM"
ARG RUST_TOOLCHAIN=stable
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
pkg-config \
libudev-dev \
libusb-1.0-0-dev \
libcurl4-openssl-dev \
libevdev-dev \
libssl-dev \
libjson-c-dev \
python3 \
python3-yaml \
libwayland-dev \
ca-certificates \
curl \
xz-utils \
git \
&& rm -rf /var/lib/apt/lists/*
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN set -eux; \
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain "${RUST_TOOLCHAIN}"; \
rustc --version; \
cargo --version
WORKDIR /source
CMD bin/package
================================================
FILE: docker-build/init.sh
================================================
#!/bin/bash
# might be needed on a fresh docker setup:
# install qemu and qemu-user-static packages
# sudo docker context rm default
docker run --privileged --rm tonistiigi/binfmt --install all
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
if [[ "$1" == "--init" || ! $(docker buildx inspect xrdriverbuilder &>/dev/null; echo $?) -eq 0 ]]; then
# start fresh
echo "Creating new docker builder instance"
docker buildx rm xrdriverbuilder 2>/dev/null || true
docker buildx create --use --name xrdriverbuilder --driver docker-container --driver-opt image=moby/buildkit:latest
else
echo "Using existing docker builder instance"
docker buildx use xrdriverbuilder
fi
echo "Building docker image"
docker buildx build --platform linux/amd64 -f ./docker-build/Dockerfile -t "xr-driver:amd64" --load .
docker buildx build --platform linux/arm64 -f ./docker-build/Dockerfile.aarch64 -t "xr-driver:arm64" --load .
================================================
FILE: docker-build/run-build.sh
================================================
#!/bin/bash
set -e
USER=${SUDO_USER:-$USER}
GROUP=$(id -gn $USER)
# Run containers for each architecture
if [[ "$1" == "x86_64" || -z "$1" ]]; then
sudo rm -rf build/
docker run --rm -t -v ./:/source --platform linux/amd64 -e STEAMOS -e UA_API_SECRET -e UA_API_SECRET_INTENTIONALLY_EMPTY "xr-driver:amd64"
sudo chown -R $USER:$GROUP out/
fi
if [[ "$1" == "aarch64" || -z "$1" ]]; then
sudo rm -rf build/
docker run --rm -t -v ./:/source --platform linux/arm64 -e UA_API_SECRET -e UA_API_SECRET_INTENTIONALLY_EMPTY "xr-driver:arm64"
sudo chown -R $USER:$GROUP out/
fi
# build directory structure is all owned by root because of docker, delete it all now
sudo rm -rf build/
================================================
FILE: docker-build/run-fpm.sh
================================================
#!/usr/bin/env bash
set -e
function libs_to_fpm_args {
local lib_dir=$1
local fpm_args=""
for lib in $(ls $lib_dir); do
fpm_args="$fpm_args lib/$lib=/usr/lib/$lib"
done
echo $fpm_args
}
function udev_files_to_fpm_args {
local udev_dir=$1
local fpm_args=""
for udev_file in $(ls $udev_dir); do
fpm_args="$fpm_args udev/$udev_file=/usr/lib/udev/rules.d/$udev_file"
done
echo $fpm_args
}
# parse the version from the CMakeLists.txt file
version=$(grep -oP 'project\(xrDriver VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
# Run containers for each architecture
if [[ "$1" == "x86_64" || -z "$1" ]]; then
sudo rm -rf build/
docker run --rm -t -v ./:/source --platform linux/amd64 -e UA_API_SECRET -e UA_API_SECRET_INTENTIONALLY_EMPTY "xr-driver:amd64" ./fpm/build
lib_args=$(libs_to_fpm_args "build/xr_driver/lib")
udev_args=$(udev_files_to_fpm_args "build/xr_driver/udev")
fpm --architecture x86_64 --version $version \
-t deb \
--no-auto-depends \
--depends libssl3 \
--depends libevdev2 \
--depends libusb-1.0-0 \
--depends libjson-c5 \
--depends libcurl4 \
--depends libwayland-client0 \
--depends libsystemd0 \
$lib_args $udev_args
# this fails without my fix in https://github.com/jordansissel/fpm/pull/2082
fpm --architecture x86_64 --version $version \
-t rpm \
--no-auto-depends \
--depends openssl-libs \
--depends libevdev \
--depends libusbx \
--depends json-c \
--depends libcurl \
--depends libwayland-client \
--depends systemd-libs \
$lib_args $udev_args
fi
if [[ "$1" == "aarch64" || -z "$1" ]]; then
sudo rm -rf build/
docker run --rm -t -v ./:/source --platform linux/arm64 -e UA_API_SECRET -e UA_API_SECRET_INTENTIONALLY_EMPTY "xr-driver:arm64" ./fpm/build
lib_args=$(libs_to_fpm_args "build/xr_driver/lib")
udev_args=$(udev_files_to_fpm_args "build/xr_driver/udev")
fpm --architecture aarch64 --version $version \
-t deb \
--no-auto-depends \
--depends libssl3 \
--depends libevdev2 \
--depends libusb-1.0-0 \
--depends libjson-c5 \
--depends libcurl4 \
--depends libwayland-client0 \
--depends libsystemd0 \
$lib_args $udev_args
# this fails without my fix in https://github.com/jordansissel/fpm/pull/2082
fpm --architecture aarch64 --version $version \
-t rpm \
--no-auto-depends \
--depends openssl-libs \
--depends libevdev \
--depends libusbx \
--depends json-c \
--depends libcurl \
--depends libwayland-client \
--depends systemd-libs \
$lib_args $udev_args
fi
mv xr-driver*.deb out/
mv xr-driver*.rpm out/
# build directory structure is all owned by root because of docker, delete it all now
sudo rm -rf build/
================================================
FILE: docs/6dof-from-3dof-opentrack-neuralnet.md
================================================
# Getting 6DoF from 3DoF glasses (OpenTrack + NeuralNet)
This guide describes how to get **6DoF positional tracking** from any supported **3DoF glasses** by combining:
- **XR Linux Driver** (for the glasses’ 3DoF IMU + runtime)
- **OpenTrack** (for filtering/mapping and UDP output)
- **NeuralNet Tracker** (OpenTrack input, for camera-based position tracking)
The high-level idea:
1. Have XR Linux Driver consume a pose orientation from a set of 3DoF glasses acting as a "primary" device.
2. Use a webcam + NeuralNet in OpenTrack to estimate a 6DoF pose, including **position** (XYZ).
3. Have XR Linux Driver’s **OpenTrack listener** ingest that pose as a synthetic "supplemental" device.
4. Merge the glasses' 3DoF orientation + OpenTrack's 6DoF position for use with Breezy Desktop, XR Gaming, or other external applications.
## Prereqs
- A working XR Linux Driver install (if you're installed Breezy Desktop or XR Gaming, you already have this)
- A webcam (for NeuralNet position tracking)
## Install OpenTrack (+ NeuralNet input)
### Use the experimental AppImage
I have an experimental AppImage CI build that may prevent the need for a more complicated installation on your system.
1. Visit [the latest wheaney/opentrack-appimage-ci Release](https://github.com/wheaney/opentrack-appimage-ci/releases/latest) and download the ONNX-GPU build.
2. If you've ever launched another version of OpenTrack on this machine before, you may want to delete (backup first, if you want) the config files found with `find ~/.config/opentrack-*`.
3. If you plan on kicking it off from the command line (better to see log output, if debugging), first set the execute flag on the file: `chmod +x ~/Downloads/OpenTrack-*.AppImage`
4. Run it.
5. If it doesn't work (or the `Start` button causes an error later on in the instructions), you might want to try the ONNX-CPU build. Otherwise, you'll need to try to install via your package manager.
### Setup via package manager
OpenTrack won't typically come with NeuralNet out of the box. You'll need to make sure the appropriate `onnxruntime` is installed. Look up the necessary OpenTrack and ONNX runtime package names for your package manager and install them. For ONNX you may be able to choose between CPU and GPU variants; it's up to you which to choose but CPU is the easiest choice and it won't typically be very demanding from a resource perspective.
#### Arch Linux installation example
```bash
sudo pacman -S onnxruntime
yay -S opentrack
```
## Apply the recommended OpenTrack profile (one-liner)
This script configures an OpenTrack profile tuned for the XR Linux Driver listener. Before running this script, you will need to launch OpenTrack at least once to create the default profile.
```bash
curl -fsSL https://github.com/wheaney/XRLinuxDriver/releases/latest/download/xr_driver_ot_profile_setup | bash
```
Note: piping a remote script to `bash` trades convenience for auditability. If you prefer to review it first, download it and inspect before running.
## Enable the XR Linux Driver OpenTrack listener
Enable the listener (input):
```bash
xr_driver_cli --opentrack-listener
```
If you changed the OpenTrack UDP output port, update the listener to match:
```bash
xr_driver_cli --opentrack-listen-port 4242
```
## Run it
1. Plug in your glasses first (confirm normal **3DoF** tracking is working).
2. Launch OpenTrack and select the Profile named "xr-driver.ini". Hit the settings icon next to the NeuralNet input and make sure the appropriate camera is selected, set the `Diagonal FOV` and `Resolution` values to match your camera.
3. Click **Start** in OpenTrack.
4. Launch Breezy Desktop and enable the effect. You should now be able to lean in to see a closer view of your screens.
**Note** - This will also be available in a future update of XR Gaming, if you've set up your deck with a webcam or you're sending the UDP data over the network.
## Troubleshooting
- View XR Linux Driver logs:
```bash
xr_driver_cli --view-log
```
- Confirm the listener is bound:
```bash
ss -u -lpn | grep 4242
```
- If OpenTrack is running but the listener never “connects”, double-check:
- OpenTrack output is **UDP over network**
- remote IP/port match the listener’s bind port
- you didn’t accidentally enable XR Linux Driver’s OpenTrack **app/output** mode at the same time (see the feedback-loop guard notes in the listener page)
================================================
FILE: docs/development.md
================================================
# Development (Docker Buildx)
This repo includes a Docker-based build pipeline that produces release artifacts for multiple architectures using Docker **Buildx**.
The main scripts are:
- `docker-build/init.sh`: sets up a Buildx builder and builds the per-arch build images
- `docker-build/run-build.sh`: runs the build inside those images and writes artifacts to `out/`
- *Needs work* `docker-build/run-fpm.sh`: runs the build and produces `.deb` / `.rpm` packages (written to `out/`)
## Requirements
- Docker
- Docker Buildx (`docker buildx version` should work)
For cross-arch builds (e.g. building `linux/arm64` on an x86_64 machine), you also need binfmt/qemu emulation enabled. The init script will attempt to install this via privileged containers.
## 1) Initialize Buildx + build the build images
Run from the repo root:
```bash
./docker-build/init.sh --init
```
This will:
- install binfmt/qemu handlers (for cross-arch builds)
- create or recreate a Buildx builder named `xrdriverbuilder`
- build and `--load` two images locally:
- `xr-driver:amd64`
- `xr-driver:arm64`
If you already have the builder and just want to reuse it, you can run:
```bash
./docker-build/init.sh
```
## 2) Build artifacts (tarball output)
After the images exist, run:
```bash
./docker-build/run-build.sh
```
To build only one architecture:
```bash
./docker-build/run-build.sh x86_64
./docker-build/run-build.sh aarch64
```
Build outputs are written under `out/`.
Notes:
- The build runs in containers, so intermediate files under `build/` may be owned by root; the script cleans `build/` afterwards.
- The build passes through `UA_API_SECRET` (and `UA_API_SECRET_INTENTIONALLY_EMPTY`) as environment variables when running containers.
## 3) Build distro packages (.deb / .rpm)
If you want Debian/RPM packages, run:
```bash
./docker-build/run-fpm.sh
```
Or per-arch:
```bash
./docker-build/run-fpm.sh x86_64
./docker-build/run-fpm.sh aarch64
```
The resulting packages are moved to `out/`.
## Troubleshooting
- If `linux/arm64` builds fail on x86_64, rerun init:
```bash
./docker-build/init.sh --init
```
- Confirm Buildx sees the builder:
```bash
docker buildx ls
docker buildx inspect xrdriverbuilder
```
================================================
FILE: docs/index.md
================================================
# XR Linux Driver Docs
This site documents selected XR Linux Driver features and integrations.
## OpenTrack integrations
There are two separate OpenTrack-related components:
- **OpenTrack app (output/source):** the driver **sends** pose data over UDP to an OpenTrack instance.
- **OpenTrack listener (input):** the driver **receives** pose data over UDP (in the OpenTrack payload format) and exposes it as a synthetic IMU device.
### Quick links
- [Mouse / joystick modes](mouse-and-joystick-modes.md)
- [OpenTrack app (output/source)](opentrack-app.md)
- [OpenTrack listener (input)](opentrack-listener.md)
- [6DoF with any supported 3DoF glasses + a webcam (OpenTrack + NeuralNet)](6dof-from-3dof-opentrack-neuralnet.md)
- [Development](development.md)
## Where settings live
Most configuration is written by `xr_driver_cli` into:
- `$XDG_CONFIG_HOME/xr_driver/config.ini` (usually `~/.config/xr_driver/config.ini`)
Logs are written to:
- `$XDG_STATE_HOME/xr_driver/driver.log` (usually `~/.local/state/xr_driver/driver.log`)
Tip: `xr_driver_cli --view-log` tails the log in `less`.
================================================
FILE: docs/mouse-and-joystick-modes.md
================================================
# Mouse / joystick modes
XR Linux Driver turns head movement into input that games and apps can use.
Most commonly that’s **mouse movement**, but you can also switch to a **virtual joystick** mode.
## Mouse mode (default)
Since device movements are converted to mouse movements, they should be recognized by any PC game that supports keyboard/mouse input. This will work most naturally for games where mouse movements is used to control "look"/camera movements. For point-and-click style games, you may want to disable the driver so your glasses act as just a simple display.
To adjust sensitivity, use the Decky UI on Steam Deck, or:
```bash
xr_driver_cli --mouse-sensitivity 20
```
If you're using keyboard and mouse to control your games, then the mouse movements from this driver will simply add to your own mouse movements and they should work naturally together.
If you're using a game controller, Valve pushes pretty heavily for PC games support mouse input *in addition to* controller input, so you should find that most modern games will just work with this driver straight out of the box.
## Controller mappings (Steam)
1. Open your game's controller configuration in Steam
2. Open the Layouts view
3. Choose a keyboard/mouse template (e.g. "Keyboard (WASD) and Mouse"). Be sure to edit the configuration and set "Gyro Behavior" to "As Mouse" for any games where you want to use gyro.
## Controller mappings (non-Steam)
You'll probably want to use a utility that does what Steam's controller layouts are doing behind the scenes: mapping controller buttons, joystick, and gyro inputs to keyboard/mouse inputs. One popular tool is [JoyShockMapper](https://github.com/Electronicks/JoyShockMapper).
## Joystick mode
If mouse input just won't work for a specific game, you can enable joystick mode using the Decky UI on Steam Deck, or:
```bash
xr_driver_cli --use-joystick
```
Revert back to mouse mode with:
```bash
xr_driver_cli --use-mouse
```
Joystick mode creates a virtual gamepad whose right joystick is driven by movements from the glasses.
Notes:
- Joystick movement is capped (you can only move a joystick so far).
- This creates a *second* controller on your PC.
- If the game interprets another controller as a second player, its movements won't get combined with your real controller's movements.
================================================
FILE: docs/opentrack-app.md
================================================
# OpenTrack app (output/source)
The **OpenTrack app** integration makes the driver send pose data over UDP in an OpenTrack-compatible payload format.
This is useful when you want to consume the driver’s tracking in other applications via OpenTrack’s ecosystem (mappings, output protocols, etc.).
## Enable it (via `xr_driver_cli`)
Enable the OpenTrack external mode (this sets `output_mode=external_only` and `external_mode=opentrack`):
```bash
xr_driver_cli --opentrack-app
```
Configure the UDP target (where OpenTrack is listening):
```bash
xr_driver_cli --opentrack-app-ip 127.0.0.1
xr_driver_cli --opentrack-app-port 4242
## OpenTrack side setup
On the OpenTrack machine:
1. Configure OpenTrack to **receive** UDP pose data (exact UI wording varies by OpenTrack version).
2. Set the listening **port** to match `--opentrack-app-port` (default: `4242`).
3. If OpenTrack is on a different machine, make sure firewalls allow inbound UDP on that port.
## Data format and notes
The driver sends a UDP packet containing:
- 6 × `double`: `(x, y, z, yaw, pitch, roll)`
- 1 × `uint32`: frame number
Angles are in **degrees**.
The implementation converts the driver’s coordinate system into what OpenTrack expects (see the implementation in the OpenTrack source plugin).
## Troubleshooting
- Confirm the driver is running: `systemctl --user status xr-driver`
- Check logs: `xr_driver_cli --view-log`
- Verify packets are being sent (localhost example):
```bash
sudo tcpdump -n -i lo udp port 4242
```
- If nothing arrives in OpenTrack, verify:
- the IP/port in `xr_driver_cli --opentrack-app-ip/--opentrack-app-port`
- OpenTrack is actually listening on that port
- you’re not trying to “receive from yourself” through the listener at the same time (see the listener page for the feedback-loop guard)
================================================
FILE: docs/opentrack-listener.md
================================================
# OpenTrack listener (input)
The **OpenTrack listener** integration makes the driver listen for OpenTrack UDP packets and expose them as a **synthetic IMU device** or as a **supplemental device** if a primary IMU device is already connected (see [6DoF from 3DoF](6dof-from-3dof-opentrack-neuralnet.md)).
This is primarily useful for:
- Feeding externally-tracked pose data into the XR Linux Driver for use with Breezy Desktop or XR Gaming
- Testing/debugging pose ingestion without relying on a physical glasses IMU
## Enable it (via `xr_driver_cli`)
Turn the listener on:
```bash
xr_driver_cli --opentrack-listener
```
Bind address / port:
```bash
# Listen on all interfaces (default is typically 0.0.0.0)
xr_driver_cli --opentrack-listen-ip 0.0.0.0
# Default port used by the OpenTrack integrations
xr_driver_cli --opentrack-listen-port 4242
```
Disable it:
```bash
xr_driver_cli --no-opentrack-listener
```
### What do these flags change?
`xr_driver_cli` writes these keys into `~/.config/xr_driver/config.ini`:
- `opentrack_listener_enabled=true|false`
- `opentrack_listen_ip=...`
- `opentrack_listen_port=...`
## OpenTrack side setup
On the machine that will **send** tracking:
1. Configure OpenTrack to **output** pose data via UDP.
2. Set the destination IP to the machine running XR Linux Driver.
3. Set the destination port to match `--opentrack-listen-port` (default: `4242`).
If you are sending from another host, ensure UDP traffic on that port is allowed.
## Payload expectations
The listener expects packets containing at least:
- 6 × `double`: `(x, y, z, yaw, pitch, roll)`
It will ignore packets smaller than that. (If your sender includes a trailing frame number, that’s fine — it will be ignored.)
Angles are treated as **degrees**.
## Feedback-loop guard (important)
The driver also has an OpenTrack **app/output** mode that can send UDP packets.
To prevent an accidental “send → receive → send …” feedback loop when both features are enabled on the same machine, the listener will **discard all packets** when:
- the listener is enabled, **and**
- OpenTrack app/output mode is enabled (`external_mode` includes `opentrack`), **and**
- `opentrack_app_ip` is set to a localhost/unspecified address (e.g. `127.0.0.1`, `localhost`, `0.0.0.0`, `::1`, `::`), **and**
- `opentrack_app_port` matches `opentrack_listen_port` (both default to `4242`).
If you want to use the listener, typically you should:
- disable OpenTrack app/output mode: `xr_driver_cli --disable-external`
…or run the sender on a different machine.
## Troubleshooting
- Check logs: `xr_driver_cli --view-log`
- Confirm the socket is bound (example):
```bash
ss -u -lpn | grep 4242
```
- If it binds but never connects, confirm OpenTrack is actually sending UDP packets to the correct IP/port.
================================================
FILE: docs/requirements.txt
================================================
mkdocs>=1.6.0
mkdocs-material>=9.5.0
pymdown-extensions>=10.8
================================================
FILE: fpm/build
================================================
#!/usr/bin/env bash
# exit when any command fails
set -e
USER=${SUDO_USER:-$USER}
GROUP=$(id -gn $USER)
source bin/inject_ua
if [ -z "$UA_API_SECRET" ] && [ -z "$UA_API_SECRET_INTENTIONALLY_EMPTY" ]; then
echo "UA_API_SECRET isn't set. If this is intentional, set UA_API_SECRET_INTENTIONALLY_EMPTY to a non-empty value."
exit 1
fi
ARCH=$(uname -m)
echo "Building for $ARCH"
# build the driver
BUILD_PATH=build
if [ ! -d "$BUILD_PATH" ]; then
mkdir $BUILD_PATH
fi
pushd $BUILD_PATH
cmake ..
make
# create package
PACKAGE_DIR=xr_driver
PACKAGE_BIN_DIR=$PACKAGE_DIR/bin
mkdir -p $PACKAGE_BIN_DIR
# copy bin files
mv xrDriver $PACKAGE_BIN_DIR
cp ../bin/xr_driver_cli $PACKAGE_BIN_DIR
# copy the systemd files needed to run our service
cp -r ../systemd $PACKAGE_DIR
sed -i -e '/ExecStart/c\ExecStart=xrDriver' \
-e '/WantedBy/c\WantedBy=default.target' \
-e '/Environment/d' \
$PACKAGE_DIR/systemd/xr-driver.service
cp -r ../udev $PACKAGE_DIR
# copy the shared library files
if [ ! -d "$PACKAGE_DIR/lib" ]; then
mkdir $PACKAGE_DIR/lib
fi
cp ../lib/$ARCH/*.so $PACKAGE_DIR/lib || true
popd
exit 0
================================================
FILE: fpm/postinstall
================================================
#!/usr/bin/env bash
if ! lsmod | grep -q uinput; then
echo "Setting up uinput kernel module"
modprobe uinput
fi
if [ -x "$(command -v udevadm)" ]; then
udevadm control --reload-rules
udevadm trigger
fi
# Try multiple methods to detect the real user
SUDO_USER="${SUDO_USER:-}"
DBUS_USER="${DBUS_SESSION_BUS_ADDRESS%%,*}"
DBUS_USER="${DBUS_USER#unix:user=}"
X11_USER=$(who | grep -F '(:0)' | head -n1 | cut -d' ' -f1)
# Try each method in order of preference
REAL_USER="${SUDO_USER:-${X11_USER:-$DBUS_USER}}"
if [ -n "$REAL_USER" ] && [ -x "$(command -v systemctl)" ]; then
REAL_UID=$(id -u "$REAL_USER")
XDG_RUNTIME_DIR="/run/user/$REAL_UID"
echo "Setting up the systemd service for $REAL_USER ($XDG_RUNTIME_DIR)"
OUTPUT=$(su -l --shell /bin/sh -c "export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR; systemctl --user daemon-reload && systemctl --user start xr-driver" "$REAL_USER" 2>&1)
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "Command failed with exit code $EXIT_CODE. Output was:"
echo "$OUTPUT"
exit $EXIT_CODE
fi
else
echo "Unable to detect user, skipping systemd service restart"
echo "Debug info: SUDO_USER=$SUDO_USER, X11_USER=$X11_USER, DBUS_USER=$DBUS_USER"
fi
exit 0
================================================
FILE: fpm/postupgrade
================================================
#!/usr/bin/env bash
if [ -x "$(command -v udevadm)" ]; then
udevadm control --reload-rules
udevadm trigger
fi
# Try multiple methods to detect the real user
SUDO_USER="${SUDO_USER:-}"
DBUS_USER="${DBUS_SESSION_BUS_ADDRESS%%,*}"
DBUS_USER="${DBUS_USER#unix:user=}"
X11_USER=$(who | grep -F '(:0)' | head -n1 | cut -d' ' -f1)
# Try each method in order of preference
REAL_USER="${SUDO_USER:-${X11_USER:-$DBUS_USER}}"
if [ -n "$REAL_USER" ] && [ -x "$(command -v systemctl)" ]; then
REAL_UID=$(id -u "$REAL_USER")
XDG_RUNTIME_DIR="/run/user/$REAL_UID"
echo "Setting up the systemd service for $REAL_USER ($XDG_RUNTIME_DIR)"
OUTPUT=$(su -l --shell /bin/sh -c "export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR; systemctl --user daemon-reload && systemctl --user restart xr-driver" "$REAL_USER" 2>&1)
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "Command failed with exit code $EXIT_CODE. Output was:"
echo "$OUTPUT"
exit $EXIT_CODE
fi
else
echo "Unable to detect user, skipping systemd service restart"
fi
exit 0
================================================
FILE: fpm/preinstall
================================================
#!/usr/bin/env bash
# Try multiple methods to detect the real user
SUDO_USER="${SUDO_USER:-}"
DBUS_USER="${DBUS_SESSION_BUS_ADDRESS%%,*}"
DBUS_USER="${DBUS_USER#unix:user=}"
X11_USER=$(who | grep -F '(:0)' | head -n1 | cut -d' ' -f1)
# Try each method in order of preference
REAL_USER="${SUDO_USER:-${X11_USER:-$DBUS_USER}}"
if [ -n "$REAL_USER" ]; then
REAL_UID=$(id -u "$REAL_USER")
USER_HOME=$(getent passwd $REAL_USER | cut -d: -f6)
if [ -f "$USER_HOME/.local/bin/breezy_gnome_uninstall" ]; then
echo "Uninstalling old Breezy GNOME setup"
$USER_HOME/.local/bin/breezy_gnome_uninstall
fi
if [ -f "$USER_HOME/.local/bin/breezy_vulkan_uninstall" ]; then
echo "Uninstalling old Breezy Vulkan setup"
$USER_HOME/.local/bin/breezy_vulkan_uninstall
fi
if [ -f "$USER_HOME/.local/bin/xr_driver_uninstall" ]; then
echo "Uninstalling old XR Driver setup"
$USER_HOME/.local/bin/xr_driver_uninstall
fi
else
echo "Unable to detect user, skipping xr_driver_uninstall check"
echo "Debug info: SUDO_USER=$SUDO_USER, X11_USER=$X11_USER, DBUS_USER=$DBUS_USER"
fi
exit 0
================================================
FILE: fpm/preuninstall
================================================
#!/usr/bin/env bash
# Try multiple methods to detect the real user
SUDO_USER="${SUDO_USER:-}"
DBUS_USER="${DBUS_SESSION_BUS_ADDRESS%%,*}"
DBUS_USER="${DBUS_USER#unix:user=}"
X11_USER=$(who | grep -F '(:0)' | head -n1 | cut -d' ' -f1)
# Try each method in order of preference
REAL_USER="${SUDO_USER:-${X11_USER:-$DBUS_USER}}"
if [ -n "$REAL_USER" ] && [ -x "$(command -v systemctl)" ]; then
REAL_UID=$(id -u "$REAL_USER")
XDG_RUNTIME_DIR="/run/user/$REAL_UID"
echo "Stopping the systemd service for $REAL_USER ($XDG_RUNTIME_DIR)"
OUTPUT=$(su -l --shell /bin/sh -c "export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR; systemctl --user stop xr-driver && systemctl --user disable xr-driver" "$REAL_USER" 2>&1)
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "Command failed with exit code $EXIT_CODE. Output was:"
echo "$OUTPUT"
exit $EXIT_CODE
fi
else
echo "Unable to detect user, skipping systemd service restart"
fi
rm -f /tmp/shader_runtime_*
rm -f /dev/shm/xr_*
rm -f /dev/shm/breezy_desktop_imu
exit 0
================================================
FILE: include/buffer.h
================================================
#pragma once
#include <imu.h>
#include <stdbool.h>
#define GYRO_BUFFERS_COUNT 5 // quat values: x, y, z, w, timestamp
struct buffer_t {
int size;
float* values;
int index;
int count;
};
typedef struct buffer_t buffer_type;
struct imu_buffer_t {
buffer_type **stage_1;
buffer_type **stage_2;
};
typedef struct imu_buffer_t imu_buffer_type;
struct imu_buffer_response_t {
bool ready;
float *data;
};
typedef struct imu_buffer_response_t imu_buffer_response_type;
buffer_type *create_buffer(int size);
void free_buffer(buffer_type *buffer);
bool is_full(buffer_type *buffer);
// push a new value, pop the oldest value and return it
float push(buffer_type *buffer, float next_value);
imu_buffer_type *create_imu_buffer(int buffer_size);
void free_imu_buffer(imu_buffer_type *gyro_buffer);
int imu_buffer_size(imu_buffer_type *gyro_buffer);
imu_buffer_response_type *push_to_imu_buffer(imu_buffer_type *gyro_buffer, imu_quat_type quat, float timestamp_ms);
================================================
FILE: include/config.h
================================================
#pragma once
#include <stdbool.h>
#include <stdio.h>
struct driver_config_t {
bool disabled;
bool mouse_mode;
bool joystick_mode;
bool external_mode;
bool use_roll_axis;
bool vr_lite_invert_x;
bool vr_lite_invert_y;
int mouse_sensitivity;
char *output_mode;
bool multi_tap_enabled;
bool metrics_disabled;
float dead_zone_threshold_deg;
bool debug_threads;
bool debug_joystick;
bool debug_multi_tap;
bool debug_ipc;
bool debug_license;
bool debug_device;
bool debug_connections;
};
typedef struct driver_config_t driver_config_type;
extern const char *joystick_output_mode;
extern const char *mouse_output_mode;
extern const char *external_only_output_mode;
driver_config_type *default_config();
void update_config(driver_config_type *config, driver_config_type *new_config);
driver_config_type* parse_config_file(FILE *fp);
void boolean_config(char* key, char *value, bool *config_value);
void float_config(char* key, char *value, float *config_value);
void int_config(char* key, char *value, int *config_value);
void string_config(char* key, char *value, char **config_value);
================================================
FILE: include/connection_pool.h
================================================
#pragma once
#include "devices.h"
#include "imu.h"
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
typedef struct connection_t {
const device_driver_type* driver;
device_properties_type* device; // owned by pool
bool supplemental;
bool active;
pthread_t thread;
bool thread_running;
} connection_t;
struct connection_pool_t {
pthread_mutex_t mutex;
connection_t** list;
int count;
int capacity;
int primary_index; // index in list or -1
int supplemental_index; // index in list or -1
};
// Connection pool type that manages multiple device connections.
typedef struct connection_pool_t connection_pool_type;
// Create/destroy a connection pool instance
typedef void (*pose_handler_t)(imu_pose_type pose);
typedef bool (*reference_pose_getter_t)(imu_pose_type* out_pose, bool* pose_updated);
void connection_pool_init(pose_handler_t pose_handler_callback, reference_pose_getter_t reference_pose_getter);
// Append a new connection (driver + device). The pool retains the driver pointer and
// takes ownership of the device pointer. It will decide whether to make it the primary
// (non-supplemental) or use it as a supplemental connection.
void connection_pool_handle_device_added(const device_driver_type* driver, device_properties_type* device);
// Delegate helpers the main driver uses (these generally forward to the primary connection)
bool connection_pool_is_connected();
bool connection_pool_device_is_sbs_mode();
bool connection_pool_device_set_sbs_mode(bool enabled);
void connection_pool_disconnect_all(bool soft);
// Start blocking on active connections (primary and at most one supplemental). This function
// will create per-connection threads and return when the primary connection stops blocking
// (e.g., due to disconnect).
void connection_pool_block_on_active();
// Attempt to connect active connections (primary and, if present, supplemental). Returns true
// if the primary connection connected successfully (supplemental is best-effort).
bool connection_pool_connect_active();
// Get the current primary device properties (borrowed; do not free). Returns NULL if none.
device_properties_type* connection_pool_primary_device();
device_properties_type* connection_pool_supplemental_device();
// Get the primary driver pointer (borrowed; do not free). Returns NULL if none.
const device_driver_type* connection_pool_primary_driver();
// Remove a connection by its unique source id. If the removed connection is currently
// primary or supplemental, the pool will re-evaluate selection. If a thread is running for the
// removed connection, it will be disconnected; cleanup occurs when the thread exits.
void connection_pool_handle_device_removed(const char* driver_id);
connection_t* connection_pool_find_hid_connection(uint16_t id_vendor, int16_t id_product);
connection_t* connection_pool_find_driver_connection(const char* driver_id);
void connection_pool_ingest_pose(const char* driver_id, imu_pose_type pose);
// Returns true if the given driver id is currently the primary connection
bool connection_pool_is_primary_driver_id(const char* driver_id);
================================================
FILE: include/curl.h
================================================
#pragma once
void curl_init();
void curl_cleanup();
================================================
FILE: include/devices/rayneo.h
================================================
#pragma once
extern const device_properties_type rayneo_properties;
extern const device_driver_type rayneo_driver;
================================================
FILE: include/devices/rokid.h
================================================
#pragma once
extern const device_properties_type rokid_properties;
extern const device_driver_type rokid_driver;
================================================
FILE: include/devices/viture.h
================================================
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "devices.h"
#include "imu.h"
extern const device_properties_type viture_one_properties;
extern const device_driver_type viture_driver;
================================================
FILE: include/devices/xreal.h
================================================
#pragma once
extern const device_properties_type xreal_air_properties;
extern const device_driver_type xreal_driver;
================================================
FILE: include/devices.h
================================================
#pragma once
#include <stdbool.h>
#include <stdint.h>
enum calibration_setup_t {
CALIBRATION_SETUP_AUTOMATIC,
CALIBRATION_SETUP_INTERACTIVE
};
typedef enum calibration_setup_t calibration_setup_type;
// Standard display resolutions
#define RESOLUTION_1080P_W 1920
#define RESOLUTION_1080P_H 1080
#define RESOLUTION_1200P_W 1920
#define RESOLUTION_1200P_H 1200
// distance from the pivot point (neck) to the lenses, in cm, typically ~5 inches
#define LENS_TO_PIVOT_CM (5.0f * 2.54f)
struct device_properties_t {
char* brand;
char* model;
// USB information
int hid_vendor_id;
int hid_product_id;
uint8_t usb_bus;
uint8_t usb_address;
calibration_setup_type calibration_setup;
// resolution width and height
int resolution_w;
int resolution_h;
// FOV for diagonal, in degrees
float fov;
// ratio representing (from the center of the axes of rotation): lens distance / perceived display distance
float lens_distance_ratio;
int calibration_wait_s;
int imu_cycles_per_s;
// how many events to buffer for velocity smoothing
int imu_buffer_size;
// look-ahead = look_ahead_ftm * frametime + look_ahead_constant
// where frametime is the duration of a frame e.g. 33ms for 30Hz framerate
float look_ahead_constant;
float look_ahead_frametime_multiplier;
// if top and bottom rows of the display require different look-ahead
float look_ahead_scanline_adjust;
// maximum look-ahead for best experience, the shader may also provide an upper bound
float look_ahead_ms_cap;
bool sbs_mode_supported;
bool firmware_update_recommended;
// Tracking capabilities exposed by this device
bool provides_orientation; // 3DoF available
bool provides_position; // 6DoF available
// Whether this device may be used as a supplemental device alongside a primary one.
// When true, the driver may be run in a supplemental mode and will not be registered
// as the primary runtime device in the global context.
bool can_be_supplemental;
};
typedef struct device_properties_t device_properties_type;
// if this driver supports the device, return the device properties, otherwise NULL
typedef device_properties_type* (*supported_device_func)(uint16_t id_vendor, uint16_t id_product, uint8_t usb_bus, uint8_t usb_address);
// open device connection, expected to perform cleanup on failure
typedef bool (*device_connect_func)();
// hold open the connection while the device is present and disconnect_func has not been called
typedef void (*block_on_device_func)();
// return true if device is in SBS mode
typedef bool (*device_is_sbs_mode_func)();
// set SBS mode on device, return true on success
typedef bool (*device_set_sbs_mode_func)(bool enabled);
// whether the driver is currently holding open a connection to the device
typedef bool (*is_connected_func)();
// tells the driver to release its connection to the device, `soft` describes whether this is a
// software-only disconnect, true means the device is still physically connected
typedef void (*disconnect_func)(bool soft);
struct device_driver_t {
char* id;
supported_device_func supported_device_func;
device_connect_func device_connect_func;
block_on_device_func block_on_device_func;
device_is_sbs_mode_func device_is_sbs_mode_func;
device_set_sbs_mode_func device_set_sbs_mode_func;
is_connected_func is_connected_func;
disconnect_func disconnect_func;
};
typedef struct device_driver_t device_driver_type;
struct connected_device_t {
const device_driver_type* driver;
device_properties_type* device;
};
typedef struct connected_device_t connected_device_type;
bool device_equal(device_properties_type* device, device_properties_type* device2);
void handle_device_connection_changed(bool is_added, connected_device_type* device);
void init_devices();
void deinit_devices();
connected_device_type* find_connected_device();
void handle_device_connection_events();
================================================
FILE: include/driver.h
================================================
#pragma once
#include "devices.h"
#include "imu.h"
#include <stdbool.h>
#include <stdint.h>
bool driver_reference_pose(imu_pose_type* out_pose, bool* pose_updated);
void driver_handle_pose(imu_pose_type pose);
bool driver_disabled();
================================================
FILE: include/epoch.h
================================================
#pragma once
#include <stdint.h>
uint64_t get_epoch_time_ms();
================================================
FILE: include/features/breezy_desktop.h
================================================
#include <stdbool.h>
extern const char* productivity_basic_feature_name;
extern const char* productivity_pro_feature_name;
bool is_productivity_basic_granted();
bool is_productivity_pro_granted();
bool is_productivity_granted();
void reset_productivity_features();
================================================
FILE: include/features/sbs.h
================================================
#include <stdbool.h>
extern const char* sbs_feature_name;
bool is_sbs_granted();
void reset_sbs_features();
================================================
FILE: include/features/smooth_follow.h
================================================
#include <stdbool.h>
extern const char* smooth_follow_feature_name;
bool is_smooth_follow_granted();
void reset_smooth_follow_features();
================================================
FILE: include/files.h
================================================
#pragma once
#include <stdio.h>
#include <stdbool.h>
#include <sys/stat.h>
extern const char* XDG_STATE_ENV_VAR;
extern const char* XDG_RUNTIME_ENV_VAR;
extern const char* XDG_CONFIG_ENV_VAR;
extern const char* XDG_DATA_ENV_VAR;
extern const char* XDG_STATE_FALLBACK_DIR;
extern const char* XDG_CONFIG_FALLBACK_DIR;
extern const char* XDG_RUNTIME_FALLBACK_DIR;
extern const char* XDG_DATA_FALLBACK_DIR;
char* get_xdg_file_path_for_app(const char *app_name, const char *filename, const char *xdg_env_var, const char *xdg_fallback_dir);
char* get_state_file_path(const char *filename);
char* get_runtime_file_path(const char *filename);
char* get_config_file_path(const char *filename);
FILE* get_or_create_file(const char *full_path, mode_t directory_mode, const char *file_mode, bool *file_created);
FILE* get_or_create_state_file(const char *filename, const char *mode, char **full_path, bool *created);
FILE* get_or_create_runtime_file(const char *filename, const char *mode, char **full_path, bool *created);
FILE* get_or_create_config_file(const char *filename, const char *mode, char **full_path, bool *created);
================================================
FILE: include/imu.h
================================================
#pragma once
#include <stdbool.h>
#include <stdint.h>
struct imu_euler_t {
float roll;
float pitch;
float yaw;
};
struct imu_quat_t {
float x;
float y;
float z;
float w;
};
struct imu_vec3_t {
float x;
float y;
float z;
};
struct imu_pose_t {
struct imu_quat_t orientation;
struct imu_vec3_t position;
struct imu_euler_t euler;
bool has_orientation;
bool has_position;
uint32_t timestamp_ms;
};
extern const float pose_orientation_reset_data[16];
extern const float pose_position_reset_data[3];
typedef struct imu_euler_t imu_euler_type;
typedef struct imu_quat_t imu_quat_type;
typedef struct imu_vec3_t imu_vec3_type;
typedef struct imu_pose_t imu_pose_type;
float degree_to_radian(float deg);
float radian_to_degree(float rad);
imu_quat_type normalize_quaternion(imu_quat_type q);
imu_quat_type conjugate(imu_quat_type q);
imu_quat_type multiply_quaternions(imu_quat_type q1, imu_quat_type q2);
imu_quat_type euler_to_quaternion_xyz(imu_euler_type euler);
imu_quat_type euler_to_quaternion_zyx(imu_euler_type euler);
imu_quat_type euler_to_quaternion_zxy(imu_euler_type euler);
imu_euler_type quaternion_to_euler_xyz(imu_quat_type q);
imu_euler_type quaternion_to_euler_zyx(imu_quat_type q);
imu_euler_type quaternion_to_euler_zxy(imu_quat_type q);
imu_quat_type device_pitch_adjustment(float adjustment_degrees);
imu_vec3_type vector_rotate(imu_vec3_type v, imu_quat_type q);
bool quat_equal(imu_quat_type q1, imu_quat_type q2);
static inline void imu_pose_sync_euler_from_orientation(imu_pose_type *p) {
if (!p) return;
if (p->has_orientation) {
p->euler = quaternion_to_euler_zyx(p->orientation);
}
}
static inline void imu_pose_sync_orientation_from_euler(imu_pose_type *p) {
if (!p) return;
if (p->has_orientation) {
p->orientation = euler_to_quaternion_zyx(p->euler);
}
}
float quat_small_angle_rad(imu_quat_type q1, imu_quat_type q2);
================================================
FILE: include/ipc.h
================================================
#pragma once
#include <pthread.h>
#include <stdbool.h>
#include <stdio.h>
// TODO - this is specific to the sombrero integration, either provide no default or move to a plug-in system where
// the plug-in library would be expected to provide this default, if this functionality is used
extern const char *sombrero_ipc_file_prefix;
extern const char *display_res_ipc_name;
extern const char *disabled_ipc_name;
extern const char *date_ipc_name;
extern const char *pose_orientation_ipc_name;
extern const char *pose_orientation_mutex_ipc_name;
extern const char *pose_position_data_ipc_name;
// deprecated - can be removed once this version is widely distributed
extern const char *display_fov_ipc_name;
extern const char *lens_distance_ratio_ipc_name;
struct ipc_values_t {
float *display_res;
bool *disabled;
float *date;
float *pose_orientation;
float *pose_position;
pthread_mutex_t *pose_orientation_mutex;
float *display_fov;
float *lens_distance_ratio;
};
typedef struct ipc_values_t ipc_values_type;
bool setup_ipc_values(ipc_values_type *ipc_values, bool debug);
void setup_ipc_value(const char *name, void **shmemValue, size_t size, bool debug);
void cleanup_ipc(char* file_prefix, bool debug);
================================================
FILE: include/logging.h
================================================
#pragma once
void log_init();
void log_message(const char* format, ...);
void log_error(const char* format, ...);
void log_debug(const char* format, ...);
================================================
FILE: include/memory.h
================================================
#pragma once
#include <stdlib.h>
#define free_and_clear(ptr) do { \
if (ptr != NULL && *ptr != NULL) { \
free(*ptr); \
*ptr = NULL; \
} \
} while(0)
// Free an array of strings
static inline void free_string_array(char** array, int count) {
if (!array) return;
for (int i = 0; i < count; i++) {
free(array[i]);
}
free(array);
}
================================================
FILE: include/multitap.h
================================================
#pragma once
#include "imu.h"
#include <stdbool.h>
#include <stdint.h>
void init_multi_tap(int init_imu_cycles_per_s);
int detect_multi_tap(imu_euler_type velocities, uint32_t timestamp, bool debug);
================================================
FILE: include/outputs.h
================================================
#pragma once
#include "imu.h"
#include "ipc.h"
#include <stdbool.h>
#include <stdint.h>
#define MS_PER_SEC 1000
#define IMU_CHECKPOINT_MS MS_PER_SEC / 4
void init_outputs();
void deinit_outputs();
void reinit_outputs();
// return the rate-of-change of the euler value against the previous euler value, in degrees/sec
imu_euler_type get_euler_velocities(imu_euler_type* previous, imu_euler_type current, int imu_cycles_per_sec);
void handle_imu_update(imu_pose_type pose, imu_euler_type velocities, bool imu_calibrated, ipc_values_type *ipc_values);
void reset_pose_data(ipc_values_type *ipc_values);
bool wait_for_imu_start();
bool is_imu_alive();
================================================
FILE: include/plugins/breezy_desktop.h
================================================
#pragma once
#include "plugins.h"
struct breezy_desktop_config_t {
bool enabled;
float look_ahead_override;
float display_distance;
float display_size;
bool sbs_content;
bool sbs_mode_stretched;
};
typedef struct breezy_desktop_config_t breezy_desktop_config;
extern const plugin_type breezy_desktop_plugin;
================================================
FILE: include/plugins/custom_banner.h
================================================
#pragma once
#include "plugins.h"
struct custom_banner_ipc_values_t {
bool *enabled;
};
typedef struct custom_banner_ipc_values_t custom_banner_ipc_values_type;
extern custom_banner_ipc_values_type *custom_banner_ipc_values;
extern const plugin_type custom_banner_plugin;
================================================
FILE: include/plugins/device_license.h
================================================
#pragma once
#include "plugins.h"
extern const plugin_type device_license_plugin;
================================================
FILE: include/plugins/gamescope_reshade_wayland.h
================================================
#pragma once
#include "plugins.h"
#include <stdbool.h>
#include <stddef.h>
struct gamescope_reshade_wayland_config_t {
bool disabled;
};
typedef struct gamescope_reshade_wayland_config_t gamescope_reshade_wayland_config;
typedef void (*gamescope_reshade_effect_ready_callback)();
bool is_gamescope_reshade_ipc_connected();
void set_gamescope_reshade_effect_uniform_variable(const char *variable_name, const void *data, int entries, size_t size, bool flush);
// will skip if there's already a lock on the wayland client, for values that are set repeatedly, like IMU data
void set_skippable_gamescope_reshade_effect_uniform_variable(const char *variable_name, const void *data, int entries, size_t size, bool flush);
extern const plugin_type gamescope_reshade_wayland_plugin;
================================================
FILE: include/plugins/metrics.h
================================================
#pragma once
#include "plugins.h"
extern const plugin_type metrics_plugin;
================================================
FILE: include/plugins/neck_saver.h
================================================
#pragma once
#include "plugins.h"
typedef struct neck_saver_config_t {
float horizontal_multiplier; // applied to yaw (rotation about up axis)
float vertical_multiplier; // applied to pitch (rotation about east/west axis)
} neck_saver_config_type;
extern const plugin_type neck_saver_plugin;
================================================
FILE: include/plugins/opentrack_listener.h
================================================
#pragma once
#include <stdbool.h>
#include "plugins.h"
struct opentrack_listener_config_t {
bool enabled;
char *ip;
int port;
};
typedef struct opentrack_listener_config_t opentrack_listener_config;
extern const plugin_type opentrack_listener_plugin;
================================================
FILE: include/plugins/opentrack_source.h
================================================
#pragma once
#include <stdbool.h>
#include "plugins.h"
struct opentrack_source_config_t {
bool enabled;
char *ip;
int port;
};
typedef struct opentrack_source_config_t opentrack_source_config;
extern const plugin_type opentrack_source_plugin;
================================================
FILE: include/plugins/sideview.h
================================================
#pragma once
#include "plugins.h"
#define SIDEVIEW_POSITION_COUNT 5
extern const char *sideview_position_names[SIDEVIEW_POSITION_COUNT];
struct sideview_ipc_values_t {
bool *enabled;
float *position;
};
typedef struct sideview_ipc_values_t sideview_ipc_values_type;
struct sideview_config_t {
bool enabled;
int position;
bool smooth_follow_enabled;
};
typedef struct sideview_config_t sideview_config;
extern const plugin_type sideview_plugin;
================================================
FILE: include/plugins/smooth_follow.h
================================================
#pragma once
#include "plugins.h"
#include <stdint.h>
struct smooth_follow_ipc_values_t {
bool *enabled;
};
typedef struct smooth_follow_ipc_values_t smooth_follow_ipc_values_type;
struct smooth_follow_config_t {
bool virtual_display_enabled;
bool virtual_display_follow_enabled;
bool sideview_enabled;
bool sideview_follow_enabled;
float sideview_follow_threshold;
bool breezy_desktop_enabled;
float display_distance;
float display_size;
bool track_roll;
bool track_pitch; // vertical
bool track_yaw; // horizontal
};
typedef struct smooth_follow_config_t smooth_follow_config;
struct smooth_follow_params_t {
// The distance threshold at which a time-delayed trigger will begin counting down
float lower_angle_threshold;
uint32_t delay_ms;
// The distance threshold at which movement is immediately triggered
float upper_angle_threshold;
// The angle to slerp to once a threshold is triggered
float return_to_angle;
// value is compounding, so 1.0 - pow(1.0 - interpolation_ratio_ms, 1000) is the effective ratio for a full second,
// closer to 1.0 means faster acceleration towards the current position
float interpolation_ratio_ms;
};
typedef struct smooth_follow_params_t smooth_follow_params;
extern const plugin_type smooth_follow_plugin;
================================================
FILE: include/plugins/virtual_display.h
================================================
#pragma once
#include "plugins.h"
extern const char *virtual_display_look_ahead_cfg_ipc_name;
extern const char *virtual_display_display_size_ipc_name;
extern const char *virtual_display_display_north_offset_ipc_name;
extern const char *virtual_display_sbs_enabled_ipc_name;
extern const char *virtual_display_sbs_content_ipc_name;
extern const char *virtual_display_sbs_mode_stretched_ipc_name;
extern const char *virtual_display_curved_display_ipc_name;
extern const char *virtual_display_half_fov_z_rads_ipc_name;
extern const char *virtual_display_half_fov_y_rads_ipc_name;
extern const char *virtual_display_fov_half_widths_ipc_name;
extern const char *virtual_display_fov_widths_ipc_name;
extern const char *virtual_display_texcoord_x_limits_ipc_name;
extern const char *virtual_display_texcoord_x_limits_r_ipc_name;
extern const char *virtual_display_lens_vector_ipc_name;
extern const char *virtual_display_lens_vector_r_ipc_name;
struct virtual_display_ipc_values_t {
bool *enabled;
bool *show_banner;
float *look_ahead_cfg;
float *display_size;
float *display_north_offset;
bool *sbs_enabled;
bool *sbs_content;
bool *sbs_mode_stretched;
bool *curved_display;
float *half_fov_z_rads;
float *half_fov_y_rads;
float *fov_half_widths;
float *fov_widths;
float *texcoord_x_limits;
float *texcoord_x_limits_r;
float *lens_vector;
float *lens_vector_r;
};
typedef struct virtual_display_ipc_values_t virtual_display_ipc_values_type;
struct virtual_display_config_t {
bool enabled;
float look_ahead_override;
float display_size;
float display_distance;
bool sbs_content;
bool sbs_mode_stretched;
bool follow_mode_enabled;
bool passthrough_smooth_follow_enabled;
bool curved_display;
};
typedef struct virtual_display_config_t virtual_display_config;
extern const plugin_type virtual_display_plugin;
================================================
FILE: include/plugins.h
================================================
#pragma once
#include "imu.h"
#include "ipc.h"
#include <stdbool.h>
#include <stdint.h>
// config and control flag parsing/handling functions
typedef void* (*default_config_func)();
typedef void (*handle_config_line_func)(void* config, char* key, char* value);
typedef void (*handle_control_flag_line_func)(char* key, char* value);
typedef void (*set_config_func)(void* config);
// hook functions
typedef void (*start_func)();
typedef bool (*setup_ipc_func)();
typedef void (*handle_ipc_change_func)();
typedef bool (*modify_reference_pose_func)(imu_pose_type pose, imu_pose_type* ref_pose);
typedef void (*handle_reference_pose_updated_func)(imu_pose_type old_reference_pose, imu_pose_type new_reference_pose);
typedef void (*modify_pose_func)(imu_pose_type* pose);
typedef void (*handle_pose_data_func)(imu_pose_type pose, imu_euler_type velocities, bool imu_calibrated, ipc_values_type *ipc_values);
typedef void (*reset_pose_data_func)();
typedef void (*handle_state_func)();
typedef void (*handle_device_connect_func)();
typedef void (*handle_device_disconnect_func)();
struct plugin_t {
char* id;
start_func start;
default_config_func default_config;
handle_config_line_func handle_config_line;
handle_control_flag_line_func handle_control_flag_line;
set_config_func set_config;
setup_ipc_func setup_ipc;
handle_ipc_change_func handle_ipc_change;
modify_reference_pose_func modify_reference_pose;
handle_reference_pose_updated_func handle_reference_pose_updated;
modify_pose_func modify_pose;
handle_pose_data_func handle_pose_data;
reset_pose_data_func reset_pose_data;
handle_state_func handle_state;
handle_device_connect_func handle_device_connect;
handle_device_disconnect_func handle_device_disconnect;
// TODO handle feature access change
};
typedef struct plugin_t plugin_type;
extern const plugin_type plugins;
================================================
FILE: include/runtime_context.h
================================================
#pragma once
#include "config.h"
#include "connection_pool.h"
#include "devices.h"
#include "state.h"
struct runtime_context_t {
// user-controlled, read-only driver configurations (plugin configs not present), persistent
driver_config_type *config;
// properties of the currently connected device, modified only by the device driver module
device_properties_type *device;
// live view of the state of the driver, reflects real-world state, not intentions
driver_state_type *state;
connection_pool_type *conn_pool;
};
typedef struct runtime_context_t runtime_context;
// Global runtime context instance.
// This is intentionally exposed so the most frequently-called accessors below can be
// `static inline` and compile down to a single load/store even without LTO.
extern runtime_context g_runtime_context;
static inline void set_state(driver_state_type *state) {
g_runtime_context.state = state;
}
static inline driver_state_type* state(void) {
return g_runtime_context.state;
}
static inline void set_config(driver_config_type *config) {
g_runtime_context.config = config;
}
static inline driver_config_type* config(void) {
return g_runtime_context.config;
}
static inline void set_connection_pool(connection_pool_type *pool) {
g_runtime_context.conn_pool = pool;
}
static inline connection_pool_type* connection_pool(void) {
return g_runtime_context.conn_pool;
}
// device is so heavily used across threads that it becomes difficult to find a good time to free() it,
// so the below functions keep a reference count and free it when the count reaches 0
//
// if a device is already set, this will queue it and set it after the current device is released.
// once set, it's considered checked out by the setting thread and the reference count is initialized at 1
void set_device_and_checkout(device_properties_type *device);
// returns the current device properties and increments the reference count
device_properties_type* device_checkout();
// decrements the reference count for the current device properties, releasing the device if the count reaches 0
void device_checkin(device_properties_type* device);
bool device_present();
typedef void (*on_device_change_callback)();
void set_on_device_change_callback(on_device_change_callback callback);
================================================
FILE: include/sdks/rayneo.h
================================================
#ifndef XR_MINI_SDK_H
#define XR_MINI_SDK_H
#include "base/FXRError.h"
#include "base/FXRMacro.h"
#include "device/usb/XRDeviceState.h"
void RegisterIMUEventCallback(IMUEventCallback callback);
void UnregisterIMUEventCallback(IMUEventCallback callback);
void RegisterStateEventCallback(StateEventCallback callback);
void UnregisterStateEventCallback(StateEventCallback callback);
int EstablishUsbConnection(int32_t vid, int32_t pid);
int ResetUsbConnection();
void NotifyDeviceConnected();
void NotifyDeviceDisconnected();
void StartXR();
void StopXR();
void SwitchTo2D();
void SwitchTo3D();
void OpenIMU();
void CloseIMU();
void Recenter();
void GetHeadTrackerPose(float rotation[4], float position[3], uint64_t* timeNsInDevice);
uint64_t ConvertHostTime2DeviceTime(uint64_t timeNsInHost);
void GetDeviceType(char* device);
void AcquireDeviceInfo();
int8_t GetSideBySideStatus();
#endif
================================================
FILE: include/sdks/rokid.h
================================================
//
// Created by 曾滔 on 6/8/21.
//
#ifndef _GLASS_SDK_H_
#define _GLASS_SDK_H_
#define GLASS_SDK_NATIVE_VERSION "2.1.9"
#define ROKID_GLASS_VID (1234)
/*
* Sensor Event Type.
*/
enum EVENT_TYPE{
ACC_EVENT = 0x1<<0,
GYRO_EVENT = 0x1<<1,
FUSION_EVENT= 0x1<<2,
KEY_EVENT= 0x1<<3,
P_SENSOR_EVENT= 0x1<<4,
TOUCH_EVENT = 0x1<<5,
ROTATION_EVENT=0x1<<6,
GAME_ROTATION_EVENT=0x1<<7,
L_SENSOR_EVENT = 0x1<<8,
MAGNET_EVENT = 0x1<<9,
VSYNC_EVENT = 0x1<<10,
RAW_EVENT=0x1<<31,
};
/*
* Represent a vector in 3D space.
*/
typedef struct Axes{
double x;
double y;
double z;
}_Axes;
/*
* Sensor Data Type.
*/
typedef struct SensorData {
uint64_t system_timestamp; // timestamp in nanoseconds when it's received (phone clock)
uint64_t sensor_timestamp_ns; // sensor timestamp in nanoseconds (glass clock)
uint32_t sequence; // reserved
struct Axes data; // sensor data
}_SensorData;
/*
* Represent fusion data, including accelerometer, gyroscope, and magnetometer data.
* deprecated
*/
typedef struct FusionData{
uint64_t system_timestamp;
uint64_t sensor_timestamp_ns;
uint32_t sequence;
struct Axes acc;
struct Axes gyro;
struct Axes magnet;
}_FusionData;
/*
* Represent rotation vector and game rotation vector
*/
typedef struct RotationData{
uint64_t system_timestamp; // timestamp in nanoseconds when it's received (phone clock)
uint64_t sensor_timestamp_ns; // sensor timestamp in nanoseconds (glass clock)
uint32_t sequence; // reserved
float Q[4]; // sensor data in quaternion
int status; // reserved
}_RotationData;
/*
* Represent key data
* deprecated
*/
typedef struct KeyData{
int keyCode;
bool status;
}_KeyData;
/*
* Represent event data
* deprecated
*/
typedef struct EventData{
uint32_t type;
union{
struct SensorData acc; // Accelerometer data
struct SensorData gyro; // Gyroscope data
struct SensorData magnet; // Magnetometer data
struct FusionData imu; // FusionData, reserved
struct RotationData rotation; // Rotation data
uint64_t vsync_timestamp_ns; // VSync timestamp in nanoseconds
int KeyData; // Key data, reserved
bool pSensor; // Proximity sensor data, reserved
uint8_t raw_data[64]; // Raw data in 64 bytes
};
}_EventData;
/* Get usb context
* Call after GlassEventInit or GlassControlInit
*
* \returns libusb_context*
*/
void* _Z21GlassSDKGetUsbContextv();
/* Init glass event and create instance
*
* \returns glass event instance
*/
void* _Z14GlassEventInitv(void);
/*
* Open glass event instance with fd
*
* \param handle a glass event instance
* \param fd the new file descriptor
* \returns true on success, false on failure
*/
bool _Z14GlassEventOpenPvi(void* handle, int fd);
/*
* Open glass event instance with vid and pid
*
* \param handle a glass event instance
* \param vid usb vendor id
* \param pid usb product id
* \returns true on success, false on failure
*/
bool _Z14GlassEventOpenPvii(void* handle, int vid, int pid);
/*
* Close glass event instance
*
* \param handle a glass event instance
* \returns true on success, false on failure
*/
bool _Z15GlassEventClosePv(void* handle);
/*
* Release glass event instance
*
* \param handle a glass event instance
* \returns true on success, false on failure
*/
bool _Z17GlassEventReleasePv(void* handle);
/*event queue interface*/
/*
* Register sensor event with required type
*
* \param handle a glass event instance
* \param EVENT_TYPE the sensor event type
* \returns a registered event
*/
void *GlassRegisterEvent(void* handle, enum EVENT_TYPE type);
/*
* Register sensor event with required type and size
*
* \param handle a glass event instance
* \param type the sensor event type
* \param size the event number
* \returns a registered event
*/
void *_Z26GlassRegisterEventWithSizePv10EVENT_TYPEi(void* handle, enum EVENT_TYPE type, int size);
/*
* UnRegister sensor event
*
* \param handle a glass event instance
* \param type the sensor event type
* \returns true on success, false on failure
*/
bool _Z20GlassUnRegisterEventPvS_(void* handle, void* eventHandle);
/*
* Get sensor event
*
* \param handle a glass event instance
* \param eventHandle the sensor event handle
* \param data the event data
* \param timeout operation timed out
* \returns true on success, false on failure
*/
bool _Z14GlassWaitEventPvS_P9EventDatai(void* handle, void* eventHandle, struct EventData* data, int timeout);
/*
* Get sensor event
*
* \param handle a glass event instance
* \param eventHandle the sensor event handle
* \param data the event data
* \param timeout operation timed out
* \returns 0 get event success
* 1 timeout
* -1 GlassEvent closed
* -2 invalid param or GlassEventRelease
*/
int _Z14GlassWaitEventPvS_P9EventDatai2(void* handle, void* ehandle, struct EventData* data, int timeout);
/*
* enable or close fusion event
*
* \param handle a glass event instance
* \param enable whether enable the fusion event or not
*/
void _Z14AddFusionEventPvi(void* handle, int enable);
/* Init glass control and create instance
*
* \returns glass control instance
*/
void* _Z16GlassControlInitv (void);
/*
* Open glass control instance with fd
*
* \param handle a glass control instance
* \param fd the new file descriptor
* \returns true on success, false on failure
*/
bool _Z16GlassControlOpenPvi (void* handle, int fd);
/*
* Open glass control instance with fd
*
* \param handle a glass control instance
* \param vid usb vendor id
* \param pid usb product id
* \returns true on success, false on failure
*/
bool _Z16GlassControlOpenPvii (void* handle, int vid, int pid);
/*
* Close glass control instance
*
* \param handle a glass control instance
* \returns true on success, false on failure
*/
bool _Z17GlassControlClosePv (void* handle);
/*
* Release glass control instance
*
* \param handle a glass control instance
* \returns true on success, false on failure
*/
bool _Z19GlassControlReleasePv(void* handle);
/*
* Glass control interface
*/
/*
* Set glass display mode
*
* \param handle a glass control instance
* \param mode
* 0 2D_3840*1080_60Hz
* 1 3D_3840*1080_60Hz
* 2 SBS //deprecated in some devices
* 3 deprecated
* 4 3D_3840*1200_90Hz
* 5 3D_3840*1200_60Hz
* \returns true on success, false on failure
*/
bool _Z19GlassSetDisplayModePvi(void*handle, int mode);
/*
* Set glass volume
*
* \param handle a glass control instance
* \param volume range from 0 to 100
* \returns true on success, false on failure
*/
bool SetVolume (void*handle, int level);
/*
* Set glass brightness
*
* \param handle a glass control instance
* \param channel always 0
* \param level range from 0 to 100
* \returns true on success, false on failure
*/
bool SetBrightness (void*handle, int channel, int level);
/*
* Get glass vsync status
*
* \param handle a glass control instance
* \returns
* true glass display is on
* false glass display is off
*/
bool GetVsyncStatus (void*handle);
/*
* Sync glass timestamp in us (glass clock) with target device(phone clock)
* deprecated
*
* \param handle a glass control instance
* \returns true on success, false on failure
*/
bool GlassSyncTimeStamp (void*handle);
/*
* Get glass brightness
*
* \param handle a glass control instance
* \param channel always 0
* \returns brightness, see \ref SetBrightness
*/
int GetBrightness (void*handle, int channel);
/*
* Get glass volume
*
* \param handle a glass control instance
* \returns volume, see \ref SetVolume
*/
int GetVolume (void*handle);
/*
* Get glass display mode
*
* \param handle a glass control instance
* \returns display mode, see \ref GetDisplayMode
*/
int _Z14GetDisplayModePv (void*handle);
/*
* Get glass serial number
*
* \param handle a glass control instance
* \returns serial number in char*
*/
char* GetSerialNumber (void*handle);
/*
* Get glass seed
*
* \param handle a glass control instance
* \returns seed in char*
*/
char* GetSeed (void*handle);
/*
* Get glass firmware version
*
* \param handle a glass control instance
* \returns firmware version in char*
*/
char* GetFirmwareVersion(void*handle);
/*
* Get glass hardware version
*
* \param handle a glass control instance
* \returns hardware version in char*
*/
char* GetHardwareVersion(void*handle);
/*
* Get glass product name
*
* \param handle a glass control instance
* \returns product name in char*
*/
char* _Z14GetProductNamePv(void* handle);
/*
* Get glass product id
*
* \param handle a glass control instance
* \returns product id in char*
*/
int GetProductId(void* handle);
/*
* Get glass vendor id
*
* \param handle a glass control instance
* \returns vendor id in char*
*/
int GetVendorId(void* handle);
/*
* Get timestamp in nano to sync glass time & phone time
*
* for example:
* long long delta_t_glass_to_phone = sysTimestamp - hmdTimestamp;
* long long timestamp = curTimestamp + detla_t_glass_to_phone;
*
* curTimestamp means actual timestamp in nano (imu or camera on phone clock)
* timestamp means calculated timestamp in nano, reflect glass clock sensor data to phone clock
*
* \param handle a glass control instance
* \param hmdTimestamp [out] glass timestamp in nano
* \param sysTimestamp [out] phone timestamp in nano
* \returns true on success, false on failure
*/
int GlassGetTimeNano(void *handle, long long *hmdTimestamp, long long *sysTimestamp);
// redefine the mangled function names here so we can use the API as intended
typedef bool (*GlassControlCloseFunc)(void* handle);
typedef bool (*GlassControlReleaseFunc)(void* handle);
typedef void* (*GlassControlInitFunc)(void);
typedef bool (*GlassControlOpenFunc)(void* handle, int vid, int pid);
typedef bool (*GlassSetDisplayModeFunc)(void* handle, int mode);
typedef void* (*GlassEventInitFunc)(void);
typedef void* (*GlassRegisterEventWithSizeFunc)(void* handle, enum EVENT_TYPE type, int size);
typedef bool (*GlassUnRegisterEventFunc)(void* handle, void* eventHandle);
typedef bool (*GlassWaitEventFunc)(void* handle, void* eventHandle, struct EventData* data, int timeout);
typedef void* (*GlassSDKGetUsbContextFunc)(void);
typedef void (*GlassAddFusionEventFunc)(void* handle, int enable);
typedef bool (*GlassEventOpenFunc)(void* handle, int vid, int pid);
typedef bool (*GlassEventCloseFunc)(void* handle);
typedef int (*GetDisplayModeFunc)(void* handle);
typedef char* (*GetProductNameFunc)(void* handle);
extern GlassControlCloseFunc GlassControlClose;
extern GlassControlReleaseFunc GlassControlRelease;
extern GlassControlInitFunc GlassControlInit;
extern GlassControlOpenFunc GlassControlOpen;
extern GlassSetDisplayModeFunc GlassSetDisplayMode;
extern GlassEventInitFunc GlassEventInit;
extern GlassRegisterEventWithSizeFunc GlassRegisterEventWithSize;
extern GlassUnRegisterEventFunc GlassUnRegisterEvent;
extern GlassWaitEventFunc GlassWaitEvent;
extern GlassSDKGetUsbContextFunc GlassSDKGetUsbContext;
extern GlassAddFusionEventFunc GlassAddFusionEvent;
extern GlassEventOpenFunc GlassEventOpen;
extern GlassEventCloseFunc GlassEventClose;
extern GetDisplayModeFunc GetDisplayMode;
extern GetProductNameFunc GetProductName;
// retrieved using readelf (e.g. `readelf -W -s lib/x86_64/libGlassSDK.so | grep GlassControlClose`)
#define GlassControlClose ((GlassControlCloseFunc)_Z17GlassControlClosePv)
#define GlassControlRelease ((GlassControlReleaseFunc)_Z19GlassControlReleasePv)
#define GlassControlInit ((GlassControlInitFunc)_Z16GlassControlInitv)
#define GlassControlOpen ((GlassControlOpenFunc)_Z16GlassControlOpenPvii)
#define GlassSetDisplayMode ((GlassSetDisplayModeFunc)_Z19GlassSetDisplayModePvi)
#define GlassEventInit ((GlassEventInitFunc)_Z14GlassEventInitv)
#define GlassRegisterEventWithSize ((GlassRegisterEventWithSizeFunc)_Z26GlassRegisterEventWithSizePv10EVENT_TYPEi)
#define GlassUnRegisterEvent ((GlassUnRegisterEventFunc)_Z20GlassUnRegisterEventPvS_)
#define GlassWaitEvent ((GlassWaitEventFunc)_Z14GlassWaitEventPvS_P9EventDatai)
#define GlassSDKGetUsbContext ((GlassSDKGetUsbContextFunc)_Z21GlassSDKGetUsbContextv)
#define GlassAddFusionEvent ((GlassAddFusionEventFunc)_Z14AddFusionEventPvi)
#define GlassEventOpen ((GlassEventOpenFunc)_Z14GlassEventOpenPvii)
#define GlassEventClose ((GlassEventCloseFunc)_Z15GlassEventClosePv)
#define GetDisplayMode ((GetDisplayModeFunc)_Z14GetDisplayModePv)
#define GetProductName ((GetProductNameFunc)_Z14GetProductNamePv)
#endif //_GLASS_SDK_H_
================================================
FILE: include/sdks/viture_device.h
================================================
/**
* @file
* @brief Non-carina device API and callback types.
* @copyright 2025 VITURE Inc. All rights reserved.
*
* These callbacks are only applicable when the provider was created
* for `XR_DEVICE_TYPE_VITURE_GEN1` or `XR_DEVICE_TYPE_VITURE_GEN2`.
*/
#ifndef VITURE_DEVICE_H
#define VITURE_DEVICE_H
#include "viture_glasses_provider.h"
/**
* @brief Callback function type for imu raw data.
*
* @param data Pointer to raw data buffer (device-defined layout).
* @param timestamp Timestamp in device timebase for IMU sample.
* @param vsync VSync timestamp associated with the sample.
*
* Should be set before calling open_imu with Imu::Mode::MODE_RAW
* Data format:
* 1. Viture One / Pro / Lite: [gyroscope_raw_x, gyroscope_raw_y, gyroscope_raw_z,
* accelerometer_raw_x, accelerometer_raw_y, accelerometer_raw_z,
* 0, 0, 0,
* temperature]
* 2. Viture Luma / Luma Pro / Beast: [gyroscope_raw_x, gyroscope_raw_y, gyroscope_raw_z,
* accelerometer_raw_x, accelerometer_raw_y, accelerometer_raw_z,
* magnetometer_raw_x, magnetometer_raw_y, magnetometer_raw_z,
* temperature]
*/
typedef void (*VitureImuRawCallback)(float* data, uint64_t timestamp, uint64_t vsync);
/**
* @brief Callback function type for imu pose data.
*
* @param data Pointer to pose data buffer
* @param timestamp Timestamp in device timebase for IMU sample.
*
* Should be set before calling open_imu with Imu::Mode::MODE_POSE
* Data format: [roll, pitch, yaw, quaternion_0, quaternion_1, quaternion_2, quaternion_3]
*/
typedef void (*VitureImuPoseCallback)(float* data, uint64_t timestamp);
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Register imu raw data callback.
*
* This function associates a user-provided callback with the device
* identified by `handle`. The callback will be invoked from the internal
* imu read thread when imu raw data is available.
*
* @param handle Handle to the `XRDeviceProvider` instance.
* @param imu_raw_callback Callback function pointer.
* @return 0 on success, -1 on failure.
*/
VITURE_API int register_raw_callback(XRDeviceProviderHandle handle, VitureImuRawCallback imu_raw_callback);
/**
* @brief Register a combined IMU + VSync callback for a Viture device.
*
* This function associates a user-provided callback with the device
* identified by `handle`. The callback will be invoked from the internal
* imu read thread when imu pose data is available.
*
* @param handle Handle to the `XRDeviceProvider` instance.
* @param imu_pose_callback Callback function pointer.
* @return 0 on success, -1 on failure.
*/
VITURE_API int register_pose_callback(XRDeviceProviderHandle handle, VitureImuPoseCallback imu_pose_callback);
/**
* @brief Open imu (no effect for carina device)
* @param handle Handle to the XRDeviceProvider instance
* @param imu_mode viture::protocol::imu::Mode
* @param imu_report_frequency viture::protocol::imu::Frequency
* @return 0: Success, -1: Param error, -2: USB execution error
* @return -3: Device type not supported, -4: Other error
*/
VITURE_API int open_imu(XRDeviceProviderHandle handle, uint8_t imu_mode, uint8_t imu_report_frequency);
/**
* @brief Close IMU (no effect for Carina device)
* @param handle Handle to the XRDeviceProvider instance
* @param imu_mode viture::protocol::imu::Mode
* @return 0: Success, -1: Param error, -2: USB execution error
* @return -3: Device type not supported, -4: Other error
*/
VITURE_API int close_imu(XRDeviceProviderHandle handle, uint8_t imu_mode);
#ifdef __cplusplus
}
#endif
#endif // VITURE_DEVICE_H
================================================
FILE: include/sdks/viture_device_carina.h
================================================
/**
* @file
* @brief Carina-specific device API and callback types.
* @copyright 2025 VITURE Inc. All rights reserved.
*
* The Carina device (Viture Luma Ultra) provides higher-level callbacks for
* pose, IMU, VSync and camera frames. These callbacks are only applicable
* when the provider was created for `XR_DEVICE_TYPE_VITURE_CARINA`.
*/
#ifndef VITURE_DEVICE_CARINA_H
#define VITURE_DEVICE_CARINA_H
#include "viture_glasses_provider.h"
/**
* @brief Callback invoked when a new pose sample is available.
*
* @param pose Array of 7 floats: position (x,y,z) and quaternion (w,x,y,z).
* @param timestamp Monotonic timestamp in seconds.
*/
typedef void (*XRPoseCallback)(float* pose, double timestamp);
/**
* @brief VSync notification callback.
*
* @param timestamp Monotonic timestamp in seconds when VSync occurred.
*/
typedef void (*XRVSyncCallback)(double timestamp);
/**
* @brief IMU data callback for Carina device.
*
* @param imu Pointer to IMU buffer (device-defined layout).
* @param timestamp Timestamp in seconds for the IMU sample.
*/
typedef void (*XRImuCallback)(float* imu, double timestamp);
/**
* @brief Camera frame callback for stereo frames.
*
* @param image_left0 Pointer to left image buffer (frame 0).
* @param image_right0 Pointer to right image buffer (frame 0).
* @param image_left1 Pointer to left image buffer (frame 1).
* @param image_right1 Pointer to right image buffer (frame 1).
* @param timestamp Frame timestamp.
* @param width Frame width in pixels.
* @param height Frame height in pixels.
*/
typedef void (*XRCameraCallback)(char* image_left0,
char* image_right0,
char* image_left1,
char* image_right1,
double timestamp,
int width,
int height);
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Register callbacks for a Carina device instance.
*
* Callbacks registered here are ignored for devices that are not
* `XR_DEVICE_TYPE_VITURE_CARINA`.
*
* @param handle Opaque device provider handle.
* @param pose_callback Callback for pose samples.
* @param vsync_callback Callback for VSync events.
* @param imu_callback Callback for IMU samples.
* @param camera_callback Callback for stereo camera frames.
* @return 0 on success, -1 on failure.
*/
VITURE_API int register_callbacks_carina(XRDeviceProviderHandle handle,
XRPoseCallback pose_callback,
XRVSyncCallback vsync_callback,
XRImuCallback imu_callback,
XRCameraCallback camera_callback);
/**
* @brief Reset position
* @param handle Handle to the XRDeviceProvider instance
* @return 0 on success, -1 on failure
*/
VITURE_API int reset_pose_carina(XRDeviceProviderHandle handle);
/**
* @brief Get IMU pose data with prediction time (Twb matrix in OpenGL coordinate system: x -> right, y -> up, z -> backward)
* @param handle Handle to the XRDeviceProvider instance
* @param pose Array to store pose data (7 floats for position and quaternion)
* @param predict_time Prediction time in nanoseconds, 0 for current pose data
* @return 0 on success, -1 on failure
*/
VITURE_API int get_gl_pose_carina(XRDeviceProviderHandle handle, float* pose, double predict_time);
/**
* Toggle glasses status report
* @param handle Handle to the XRDeviceProvider instance
* @param toggle Enable / disable
* @return 0 on success
*/
VITURE_API int toggle_status_report_carina(XRDeviceProviderHandle handle, bool toggle);
#ifdef __cplusplus
}
#endif
#endif // VITURE_DEVICE_CARINA_H
================================================
FILE: include/sdks/viture_glasses_constants.h
================================================
#ifndef VITURE_GLASSES_CONSTANTS_H
#define VITURE_GLASSES_CONSTANTS_H
#include <cstdint>
namespace viture {
namespace product {
namespace VendorId {
constexpr std::uint16_t VITURE = 0x35CA;
} // namespace VendorId
} // namespace product
} // namespace viture
#endif // VITURE_GLASSES_CONSTANTS_H
================================================
FILE: include/sdks/viture_glasses_provider.h
================================================
/**
* @file
* @brief Public C API for Viture Glasses device providers.
* @copyright 2025 VITURE Inc. All rights reserved.
*
* This header defines the public C API used to create, control and query
* XR device provider instances. It provides lifecycle functions, command
* submission entry points, and callback registration for external clients.
*/
#ifndef VITURE_GLASSES_PROVIDER_H
#define VITURE_GLASSES_PROVIDER_H
#include "viture_macros.h"
/**
* @brief Handle type for XRDeviceProvider instances. This is an opaque pointer
* returned by `xr_device_provider_create` and consumed by other API calls.
*/
typedef void* XRDeviceProviderHandle;
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Callback for reporting glass state changes (brightness, volume, display mode, etc.)
*
* See `viture::protocol::Callback::ID` for detailed id and values
*
* @param glass_state_id Identifier for the state being reported.
* @param glass_value Integer value associated with the state.
*/
typedef void (*GlassStateCallback)(int glass_state_id, int glass_value);
/**
* @brief Device types supported by the SDK.
*
* Use these values to determine device-specific behavior after creating an
* `XRDeviceProvider` instance, e.g. registering callbacks.
*/
typedef enum {
XR_DEVICE_TYPE_VITURE_GEN1 = 0,
XR_DEVICE_TYPE_VITURE_GEN2 = 1,
XR_DEVICE_TYPE_VITURE_CARINA = 2
} XRDeviceType;
#ifdef __ANDROID__
/**
* @brief Android variant: Create an XRDeviceProvider instance
*
* Due to Android restrictions, detailed usb information is needed for creation
*
* @param product_id Product ID of the opened usb device
* @param file_descriptor File descriptor of the opened usb device
* @param bus_num Bus number for viture carina device
* @param dev_addr Device address for viture carina device
* @return Handle to the created instance, or NULL on failure
*/
VITURE_API XRDeviceProviderHandle xr_device_provider_create(int product_id,
int file_descriptor,
int bus_num,
int dev_addr);
#else
/**
* @brief Non-Android variant: Create an XRDeviceProvider instance
*
* The non-Android signature accepts only `product_id`
*
* @param product_id Product ID of the opened usb device
* @return Handle to the created instance, or NULL on failure
*/
VITURE_API XRDeviceProviderHandle xr_device_provider_create(int product_id);
#endif
/**
* @brief Initialize the XRDeviceProvider
* @param handle Handle to the XRDeviceProvider instance
* @param custom_config Optional custom configuration string (can be NULL)
* @return 0: Success, -1: Param error, -2: Other error
*/
VITURE_API int xr_device_provider_initialize(XRDeviceProviderHandle handle, const char* custom_config);
/**
* @brief Start the XRDeviceProvider
* @param handle Handle to the XRDeviceProvider instance
* @return 0: Success, -1: Param error, -2: Other error
*/
VITURE_API int xr_device_provider_start(XRDeviceProviderHandle handle);
/**
* @brief Stop the XRDeviceProvider
* @param handle Handle to the XRDeviceProvider instance
* @return 0: Success, -1: Param error, -2: Other error
*/
VITURE_API int xr_device_provider_stop(XRDeviceProviderHandle handle);
/**
* @brief Shutdown the XRDeviceProvider
* @param handle Handle to the XRDeviceProvider instance
* @return 0: Success, -1: Param error, -2: Other error
*/
VITURE_API int xr_device_provider_shutdown(XRDeviceProviderHandle handle);
/**
* @brief Destroy the XRDeviceProvider instance
* @param handle Handle to the XRDeviceProvider instance
*/
VITURE_API void xr_device_provider_destroy(XRDeviceProviderHandle handle);
/**
* @brief Register glass state callback
* @param handle Handle to the XRDeviceProvider instance
* @param callback Called when glass state changes
* @return 0: Success, -1: Param error, -2: USB not available, -3: Other error
*/
VITURE_API int xr_device_provider_register_state_callback(XRDeviceProviderHandle handle, GlassStateCallback callback);
/**
* @brief Execute a USB control command synchronously
* @param handle Handle to the XRDeviceProvider instance
* @param msgId Message ID for the command
* @param data Command data to send
* @param length Length of the command data
* @return 0: Success, -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: Other error
*/
VITURE_API int xr_device_provider_execute_usb_command(XRDeviceProviderHandle handle,
int msgId,
const char* data,
int length);
/**
* @brief Execute a USB control command synchronously and return response data
* @param handle Handle to the XRDeviceProvider instance
* @param msgId Message ID for the command
* @param data Command data to send
* @param length Length of the command data
* @param response_data Buffer to store response data
* @param response_length Pointer to store the length of response data
* @return 0: Success, -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: Result cast success but execution is not success
* @return -5: Result not casteded and execution is not success, -6: Other error
*/
VITURE_API int xr_device_provider_execute_usb_command_with_response(
XRDeviceProviderHandle handle, int msgId, const char* data, int length, char* response_data, int* response_length);
/**
* @brief Get electrochomic film mode synchronously
* @param handle Handle to the XRDeviceProvider instance
* @param voltage Pointer to store voltage data.
* Gen1 devices: 0.0F / 1.0F;
* Gen2 devices: 0F / 0.125F ... / 0.875F / 1.0F.
* @return 0: Success, -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: Other error
*/
VITURE_API int xr_device_provider_get_film_mode(XRDeviceProviderHandle handle, float* voltage);
/**
* @brief Set electrochomic film mode synchronously
* @param handle Handle to the XRDeviceProvider instance
* @param voltage Voltage parameter (0.0 - 1.0). Interpretation differs by
* generation: on Gen1 a non-zero value enables the film;
* Gen2 uses ranges to map to discrete levels.
* @return 0: Success, -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: Other error
*/
VITURE_API int xr_device_provider_set_film_mode(XRDeviceProviderHandle handle, float voltage);
/**
* @brief Get screen duty cycle
* @param handle Handle to the XRDeviceProvider instance
* @return Duty cycle value, -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: No valid data, -5: Other error
*/
VITURE_API int xr_device_provider_get_duty_cycle(XRDeviceProviderHandle handle);
/**
* @brief Set screen duty cycle
* @param handle Handle to the XRDeviceProvider instance
* @param duty_cycle Duty cycle value (0-100)
* @return 0: Success, -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: Duty cycle value incorrect, -5: Other error
*/
VITURE_API int xr_device_provider_set_duty_cycle(XRDeviceProviderHandle handle, int duty_cycle);
/**
* @brief Get display mode
* @param handle Handle to the XRDeviceProvider instance
* @return Display mode value (see viture::protocol::DisplayMode), -1: Param error, -2: USB not available
* @return -3: USB execution error, -4: No valid data, -5: Other error
*/
VITURE_API int xr_device_provider_get_display_mode(XRDeviceProviderHandle handle);
/**
* @brief Set display mode synchronously
* @param handle Handle to the XRDeviceProvider instance
* @param display_mode Display mode value (see viture::protocol::DisplayMode)
* @return 0: Success, -1: Param error, -2: USB not available
* @return -3: Display mode value incorrect, -4: USB execution error
* @return -5: Other error
*/
VITURE_API int xr_device_provider_set_display_mode(XRDeviceProviderHandle handle, int display_mode);
/**
* @brief Get display mode and native dof type (only for devices wi
gitextract_d2i3_4h7/
├── .fpm
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── release.yml
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── .vscode/
│ └── tasks.json
├── CMakeLists.txt
├── LICENSE
├── README.md
├── bin/
│ ├── build_custom_banner_config.py
│ ├── inject_ua
│ ├── package
│ ├── package_libs
│ ├── setup
│ ├── ua.sh
│ ├── user/
│ │ ├── install
│ │ └── systemd_start
│ ├── xr_driver_cli
│ ├── xr_driver_logs
│ ├── xr_driver_ot_profile_setup
│ ├── xr_driver_setup
│ ├── xr_driver_uninstall
│ └── xr_driver_verify
├── docker-build/
│ ├── Dockerfile
│ ├── Dockerfile.aarch64
│ ├── init.sh
│ ├── run-build.sh
│ └── run-fpm.sh
├── docs/
│ ├── 6dof-from-3dof-opentrack-neuralnet.md
│ ├── development.md
│ ├── index.md
│ ├── mouse-and-joystick-modes.md
│ ├── opentrack-app.md
│ ├── opentrack-listener.md
│ └── requirements.txt
├── fpm/
│ ├── build
│ ├── postinstall
│ ├── postupgrade
│ ├── preinstall
│ └── preuninstall
├── include/
│ ├── buffer.h
│ ├── config.h
│ ├── connection_pool.h
│ ├── curl.h
│ ├── devices/
│ │ ├── rayneo.h
│ │ ├── rokid.h
│ │ ├── viture.h
│ │ └── xreal.h
│ ├── devices.h
│ ├── driver.h
│ ├── epoch.h
│ ├── features/
│ │ ├── breezy_desktop.h
│ │ ├── sbs.h
│ │ └── smooth_follow.h
│ ├── files.h
│ ├── imu.h
│ ├── ipc.h
│ ├── logging.h
│ ├── memory.h
│ ├── multitap.h
│ ├── outputs.h
│ ├── plugins/
│ │ ├── breezy_desktop.h
│ │ ├── custom_banner.h
│ │ ├── device_license.h
│ │ ├── gamescope_reshade_wayland.h
│ │ ├── metrics.h
│ │ ├── neck_saver.h
│ │ ├── opentrack_listener.h
│ │ ├── opentrack_source.h
│ │ ├── sideview.h
│ │ ├── smooth_follow.h
│ │ └── virtual_display.h
│ ├── plugins.h
│ ├── runtime_context.h
│ ├── sdks/
│ │ ├── rayneo.h
│ │ ├── rokid.h
│ │ ├── viture_device.h
│ │ ├── viture_device_carina.h
│ │ ├── viture_glasses_constants.h
│ │ ├── viture_glasses_provider.h
│ │ ├── viture_macros.h
│ │ ├── viture_protocol.h
│ │ └── viture_version.h
│ ├── state.h
│ ├── strings.h
│ ├── system.h
│ ├── version.h.in
│ └── wl_client/
│ └── gamescope_reshade.h
├── lib/
│ ├── aarch64/
│ │ └── viture/
│ │ ├── libopencv_calib3d.so.4.6.0
│ │ ├── libopencv_calib3d.so.406
│ │ ├── libopencv_core.so.4.6.0
│ │ ├── libopencv_core.so.406
│ │ ├── libopencv_features2d.so.4.6.0
│ │ ├── libopencv_features2d.so.406
│ │ ├── libopencv_flann.so.4.6.0
│ │ ├── libopencv_flann.so.406
│ │ ├── libopencv_highgui.so.4.6.0
│ │ ├── libopencv_highgui.so.406
│ │ ├── libopencv_imgcodecs.so.4.6.0
│ │ ├── libopencv_imgcodecs.so.406
│ │ ├── libopencv_imgproc.so.4.6.0
│ │ ├── libopencv_imgproc.so.406
│ │ ├── libopencv_video.so.4.6.0
│ │ ├── libopencv_video.so.406
│ │ ├── libopencv_videoio.so.4.6.0
│ │ └── libopencv_videoio.so.406
│ └── x86_64/
│ └── viture/
│ ├── libopencv_calib3d.so.4.2
│ ├── libopencv_calib3d.so.4.2.0
│ ├── libopencv_core.so.4.2
│ ├── libopencv_core.so.4.2.0
│ ├── libopencv_features2d.so.4.2
│ ├── libopencv_features2d.so.4.2.0
│ ├── libopencv_flann.so.4.2
│ ├── libopencv_flann.so.4.2.0
│ ├── libopencv_highgui.so.4.2
│ ├── libopencv_highgui.so.4.2.0
│ ├── libopencv_imgcodecs.so.4.2
│ ├── libopencv_imgcodecs.so.4.2.0
│ ├── libopencv_imgproc.so.4.2
│ ├── libopencv_imgproc.so.4.2.0
│ ├── libopencv_video.so.4.2
│ ├── libopencv_video.so.4.2.0
│ ├── libopencv_videoio.so.4.2
│ └── libopencv_videoio.so.4.2.0
├── license_public_key.pem
├── mkdocs.yml
├── modules/
│ └── rayneoSDKHeaders/
│ ├── base/
│ │ ├── FXRDebug.h
│ │ ├── FXRError.h
│ │ ├── FXRMacro.h
│ │ └── FXRType.h
│ ├── device/
│ │ ├── XRDevice.h
│ │ └── usb/
│ │ ├── XRDeviceState.h
│ │ └── XRPacket.h
│ ├── interface/
│ │ ├── FXRApi.h
│ │ ├── FXRClient.h
│ │ └── FXRServer.h
│ ├── ipc/
│ │ └── FXRProtocol.h
│ └── openxr/
│ ├── openxr.h
│ ├── openxr_platform.h
│ ├── openxr_platform_defines.h
│ ├── openxr_reflection.h
│ ├── openxr_reflection_parent_structs.h
│ └── openxr_reflection_structs.h
├── src/
│ ├── buffer.c
│ ├── config.c
│ ├── connection_pool.c
│ ├── curl.c
│ ├── devices/
│ │ ├── rayneo.c
│ │ ├── rokid.c
│ │ ├── viture.c
│ │ └── xreal.c
│ ├── devices.c
│ ├── driver.c
│ ├── epoch.c
│ ├── features/
│ │ ├── breezy_desktop.c
│ │ ├── sbs.c
│ │ └── smooth_follow.c
│ ├── files.c
│ ├── imu.c
│ ├── ipc.c
│ ├── logging.c
│ ├── multitap.c
│ ├── outputs.c
│ ├── plugins/
│ │ ├── breezy_desktop.c
│ │ ├── custom_banner.c
│ │ ├── device_license.c
│ │ ├── gamescope_reshade_wayland.c
│ │ ├── metrics.c
│ │ ├── neck_saver.c
│ │ ├── opentrack_listener.c
│ │ ├── opentrack_source.c
│ │ ├── sideview.c
│ │ ├── smooth_follow.c
│ │ └── virtual_display.c
│ ├── plugins.c
│ ├── runtime_context.c
│ ├── state.c
│ ├── strings.c
│ ├── system.c
│ └── wl_client/
│ └── gamescope_reshade.c
├── systemd/
│ └── xr-driver.service
└── udev/
├── 70-rayneo-xr.rules
├── 70-rokid-xr.rules
├── 70-uinput-xr.rules
├── 70-viture-xr.rules
└── 70-xreal-xr.rules
SYMBOL INDEX (1080 symbols across 71 files)
FILE: include/buffer.h
type buffer_t (line 8) | struct buffer_t {
type buffer_type (line 15) | typedef struct buffer_t buffer_type;
type imu_buffer_t (line 17) | struct imu_buffer_t {
type imu_buffer_type (line 22) | typedef struct imu_buffer_t imu_buffer_type;
type imu_buffer_response_t (line 24) | struct imu_buffer_response_t {
type imu_buffer_response_type (line 29) | typedef struct imu_buffer_response_t imu_buffer_response_type;
FILE: include/config.h
type driver_config_t (line 6) | struct driver_config_t {
type driver_config_type (line 29) | typedef struct driver_config_t driver_config_type;
FILE: include/connection_pool.h
type connection_t (line 9) | typedef struct connection_t {
type connection_pool_t (line 18) | struct connection_pool_t {
type connection_pool_type (line 28) | typedef struct connection_pool_t connection_pool_type;
FILE: include/devices.h
type calibration_setup_t (line 7) | enum calibration_setup_t {
type calibration_setup_type (line 11) | typedef enum calibration_setup_t calibration_setup_type;
type device_properties_t (line 22) | struct device_properties_t {
type device_properties_type (line 75) | typedef struct device_properties_t device_properties_type;
type device_properties_type (line 78) | typedef device_properties_type* (*supported_device_func)(uint16_t id_ven...
type device_driver_t (line 99) | struct device_driver_t {
type device_driver_type (line 110) | typedef struct device_driver_t device_driver_type;
type connected_device_t (line 112) | struct connected_device_t {
type connected_device_type (line 117) | typedef struct connected_device_t connected_device_type;
FILE: include/imu.h
type imu_euler_t (line 6) | struct imu_euler_t {
type imu_quat_t (line 12) | struct imu_quat_t {
type imu_vec3_t (line 19) | struct imu_vec3_t {
type imu_pose_t (line 25) | struct imu_pose_t {
type imu_euler_type (line 37) | typedef struct imu_euler_t imu_euler_type;
type imu_quat_type (line 38) | typedef struct imu_quat_t imu_quat_type;
type imu_vec3_type (line 39) | typedef struct imu_vec3_t imu_vec3_type;
type imu_pose_type (line 40) | typedef struct imu_pose_t imu_pose_type;
function imu_pose_sync_euler_from_orientation (line 57) | static inline void imu_pose_sync_euler_from_orientation(imu_pose_type *p) {
function imu_pose_sync_orientation_from_euler (line 63) | static inline void imu_pose_sync_orientation_from_euler(imu_pose_type *p) {
FILE: include/ipc.h
type ipc_values_t (line 22) | struct ipc_values_t {
type ipc_values_type (line 34) | typedef struct ipc_values_t ipc_values_type;
FILE: include/memory.h
function free_string_array (line 13) | static inline void free_string_array(char** array, int count) {
FILE: include/plugins.h
type plugin_t (line 29) | struct plugin_t {
type plugin_type (line 52) | typedef struct plugin_t plugin_type;
FILE: include/plugins/breezy_desktop.h
type breezy_desktop_config_t (line 5) | struct breezy_desktop_config_t {
type breezy_desktop_config (line 13) | typedef struct breezy_desktop_config_t breezy_desktop_config;
FILE: include/plugins/custom_banner.h
type custom_banner_ipc_values_t (line 5) | struct custom_banner_ipc_values_t {
type custom_banner_ipc_values_type (line 8) | typedef struct custom_banner_ipc_values_t custom_banner_ipc_values_type;
FILE: include/plugins/gamescope_reshade_wayland.h
type gamescope_reshade_wayland_config_t (line 8) | struct gamescope_reshade_wayland_config_t {
type gamescope_reshade_wayland_config (line 11) | typedef struct gamescope_reshade_wayland_config_t gamescope_reshade_wayl...
FILE: include/plugins/neck_saver.h
type neck_saver_config_type (line 4) | typedef struct neck_saver_config_t {
FILE: include/plugins/opentrack_listener.h
type opentrack_listener_config_t (line 6) | struct opentrack_listener_config_t {
type opentrack_listener_config (line 11) | typedef struct opentrack_listener_config_t opentrack_listener_config;
FILE: include/plugins/opentrack_source.h
type opentrack_source_config_t (line 6) | struct opentrack_source_config_t {
type opentrack_source_config (line 11) | typedef struct opentrack_source_config_t opentrack_source_config;
FILE: include/plugins/sideview.h
type sideview_ipc_values_t (line 8) | struct sideview_ipc_values_t {
type sideview_ipc_values_type (line 12) | typedef struct sideview_ipc_values_t sideview_ipc_values_type;
type sideview_config_t (line 14) | struct sideview_config_t {
type sideview_config (line 19) | typedef struct sideview_config_t sideview_config;
FILE: include/plugins/smooth_follow.h
type smooth_follow_ipc_values_t (line 7) | struct smooth_follow_ipc_values_t {
type smooth_follow_ipc_values_type (line 10) | typedef struct smooth_follow_ipc_values_t smooth_follow_ipc_values_type;
type smooth_follow_config_t (line 12) | struct smooth_follow_config_t {
type smooth_follow_config (line 26) | typedef struct smooth_follow_config_t smooth_follow_config;
type smooth_follow_params_t (line 28) | struct smooth_follow_params_t {
type smooth_follow_params (line 43) | typedef struct smooth_follow_params_t smooth_follow_params;
FILE: include/plugins/virtual_display.h
type virtual_display_ipc_values_t (line 21) | struct virtual_display_ipc_values_t {
type virtual_display_ipc_values_type (line 40) | typedef struct virtual_display_ipc_values_t virtual_display_ipc_values_t...
type virtual_display_config_t (line 42) | struct virtual_display_config_t {
type virtual_display_config (line 53) | typedef struct virtual_display_config_t virtual_display_config;
FILE: include/runtime_context.h
type runtime_context_t (line 8) | struct runtime_context_t {
type runtime_context (line 21) | typedef struct runtime_context_t runtime_context;
function set_state (line 28) | static inline void set_state(driver_state_type *state) {
function driver_state_type (line 32) | static inline driver_state_type* state(void) {
function set_config (line 36) | static inline void set_config(driver_config_type *config) {
function driver_config_type (line 40) | static inline driver_config_type* config(void) {
function set_connection_pool (line 44) | static inline void set_connection_pool(connection_pool_type *pool) {
function connection_pool_type (line 48) | static inline connection_pool_type* connection_pool(void) {
FILE: include/sdks/rokid.h
type EVENT_TYPE (line 14) | enum EVENT_TYPE{
type _Axes (line 32) | typedef struct Axes{
type _SensorData (line 41) | typedef struct SensorData {
type _FusionData (line 52) | typedef struct FusionData{
type _RotationData (line 64) | typedef struct RotationData{
type _KeyData (line 76) | typedef struct KeyData{
type _EventData (line 85) | typedef struct EventData{
type EVENT_TYPE (line 157) | enum EVENT_TYPE
type EVENT_TYPE (line 166) | enum EVENT_TYPE
type EventData (line 186) | struct EventData
type EventData (line 200) | struct EventData
type EVENT_TYPE (line 415) | enum EVENT_TYPE
type EventData (line 417) | struct EventData
FILE: include/sdks/viture_glasses_constants.h
function namespace (line 6) | namespace viture {
FILE: include/sdks/viture_glasses_provider.h
type XRDeviceType (line 42) | typedef enum {
FILE: include/sdks/viture_protocol.h
function namespace (line 16) | namespace viture::protocol {
FILE: include/sdks/viture_version.h
function namespace (line 27) | namespace viture::version {
FILE: include/state.h
type calibration_state_t (line 10) | enum calibration_state_t {
type calibration_state_type (line 16) | typedef enum calibration_state_t calibration_state_type;
type driver_state_t (line 18) | struct driver_state_t {
type driver_state_type (line 45) | typedef struct driver_state_t driver_state_type;
type sbs_control_t (line 47) | enum sbs_control_t {
type sbs_control_type (line 52) | typedef enum sbs_control_t sbs_control_type;
type control_flags_t (line 53) | struct control_flags_t {
type control_flags_type (line 60) | typedef struct control_flags_t control_flags_type;
FILE: include/wl_client/gamescope_reshade.h
type gamescope_reshade (line 49) | struct gamescope_reshade
type wl_interface (line 61) | struct wl_interface
type gamescope_reshade_listener (line 68) | struct gamescope_reshade_listener {
function gamescope_reshade_add_listener (line 83) | static inline int
function gamescope_reshade_set_user_data (line 124) | static inline void
type gamescope_reshade (line 132) | struct gamescope_reshade
type wl_proxy (line 134) | struct wl_proxy
function gamescope_reshade_get_version (line 137) | static inline uint32_t
function gamescope_reshade_destroy (line 146) | static inline void
function gamescope_reshade_set_effect (line 158) | static inline void
function gamescope_reshade_enable_effect (line 170) | static inline void
function gamescope_reshade_set_uniform_variable (line 182) | static inline void
function gamescope_reshade_disable_effect (line 194) | static inline void
FILE: modules/rayneoSDKHeaders/base/FXRError.h
type FXRResult (line 11) | typedef enum {
FILE: modules/rayneoSDKHeaders/base/FXRMacro.h
type FXRResult (line 16) | typedef FXRResult (*XRConfigExternalReader)(const char* item, void*);
FILE: modules/rayneoSDKHeaders/base/FXRType.h
type FXRRuntimeVersion (line 14) | typedef struct FXRRuntimeVersion {
type FXRRuntimeStateType (line 21) | enum FXRRuntimeStateType { kDevice = 0, kImu = 1 }
type FXRDeviceType (line 24) | typedef enum FXRDeviceType {
type FXREye (line 37) | typedef enum FXREye {
type XRPlaneProperty (line 45) | typedef enum {
type FXRDistortionParamIndex (line 52) | enum FXRDistortionParamIndex {
type XRRuntimeStateInfo (line 60) | typedef struct {
type XRPoseInfo (line 65) | typedef struct {
type XRInfo4PredictPose (line 71) | typedef struct XRINFO4PREDICTPOSE {
type XRAlgoState (line 77) | typedef struct XRALGOSTATE {
type HeadPose (line 88) | typedef struct {
type HeadPoseState (line 97) | typedef struct {
type XRNineAxisPoseInfo (line 105) | typedef struct {
type XRPlaneInfo (line 112) | typedef struct {
type XRPlaneArray (line 122) | typedef struct {
FILE: modules/rayneoSDKHeaders/device/XRDevice.h
function namespace (line 10) | namespace ffalcon {
function class (line 71) | class DevCapImu {
function class (line 82) | class DevCapCamera {
function class (line 105) | class DevCapDisplay {
FILE: modules/rayneoSDKHeaders/device/usb/XRDeviceState.h
type FXRColorAdjustOp (line 12) | enum FXRColorAdjustOp {
type FXRUsbCommand (line 32) | enum FXRUsbCommand {
type XRImuCalibrateInfo (line 87) | typedef struct {
type TIME (line 98) | typedef struct {
type FOV (line 104) | typedef struct {
type XRPanelColorParms (line 111) | typedef struct {
type PANELPARAMS (line 125) | typedef union {
type XRDeviceState (line 130) | typedef struct {
FILE: modules/rayneoSDKHeaders/device/usb/XRPacket.h
type XrHidCommand (line 10) | typedef struct {
type XrHidMsgHeader (line 18) | typedef struct {
type XrHidSensorData (line 24) | typedef struct {
type XrHidSensorEvent (line 35) | typedef struct {
type XrHidDeviceInfo (line 52) | typedef struct {
type XrHidResponse (line 84) | typedef struct {
type XrHidTimeSyncResponse (line 94) | typedef struct {
type XrStateEvent (line 104) | typedef struct {
type XrVsyncEvent (line 111) | typedef struct {
type XrDataPacket (line 122) | typedef union {
type XrHidDeviceFov (line 132) | typedef struct {
type XrFrameEvent (line 146) | typedef struct {
FILE: modules/rayneoSDKHeaders/ipc/FXRProtocol.h
type FXRStateEvent (line 9) | enum FXRStateEvent {
type CallbackType (line 43) | enum CallbackType {
type FXRControlUnit (line 50) | enum FXRControlUnit {
type FXRControlCommand (line 56) | enum FXRControlCommand {
FILE: modules/rayneoSDKHeaders/openxr/openxr.h
type XrVersion (line 104) | typedef uint64_t XrVersion;
type XrFlags64 (line 105) | typedef uint64_t XrFlags64;
type XrDuration (line 110) | typedef int64_t XrDuration;
type XrResult (line 134) | typedef enum XrResult {
type XrStructureType (line 232) | typedef enum XrStructureType {
type XrFormFactor (line 545) | typedef enum XrFormFactor {
type XrViewConfigurationType (line 551) | typedef enum XrViewConfigurationType {
type XrEnvironmentBlendMode (line 559) | typedef enum XrEnvironmentBlendMode {
type XrReferenceSpaceType (line 566) | typedef enum XrReferenceSpaceType {
type XrActionType (line 576) | typedef enum XrActionType {
type XrEyeVisibility (line 585) | typedef enum XrEyeVisibility {
type XrSessionState (line 592) | typedef enum XrSessionState {
type XrObjectType (line 605) | typedef enum XrObjectType {
type XrFlags64 (line 636) | typedef XrFlags64 XrInstanceCreateFlags;
type XrFlags64 (line 640) | typedef XrFlags64 XrSessionCreateFlags;
type XrFlags64 (line 644) | typedef XrFlags64 XrSpaceVelocityFlags;
type XrFlags64 (line 650) | typedef XrFlags64 XrSpaceLocationFlags;
type XrFlags64 (line 658) | typedef XrFlags64 XrSwapchainCreateFlags;
type XrFlags64 (line 664) | typedef XrFlags64 XrSwapchainUsageFlags;
type XrFlags64 (line 677) | typedef XrFlags64 XrCompositionLayerFlags;
type XrFlags64 (line 684) | typedef XrFlags64 XrViewStateFlags;
type XrFlags64 (line 692) | typedef XrFlags64 XrInputSourceLocalizedNameFlags;
type XrApiLayerProperties (line 700) | typedef struct XrApiLayerProperties {
type XrExtensionProperties (line 709) | typedef struct XrExtensionProperties {
type XrApplicationInfo (line 716) | typedef struct XrApplicationInfo {
type XrInstanceCreateInfo (line 724) | typedef struct XrInstanceCreateInfo {
type XrInstanceProperties (line 735) | typedef struct XrInstanceProperties {
type XrEventDataBuffer (line 742) | typedef struct XrEventDataBuffer {
type XrSystemGetInfo (line 748) | typedef struct XrSystemGetInfo {
type XrSystemGraphicsProperties (line 754) | typedef struct XrSystemGraphicsProperties {
type XrSystemTrackingProperties (line 760) | typedef struct XrSystemTrackingProperties {
type XrSystemProperties (line 765) | typedef struct XrSystemProperties {
type XrSessionCreateInfo (line 775) | typedef struct XrSessionCreateInfo {
type XrVector3f (line 782) | typedef struct XrVector3f {
type XrSpaceVelocity (line 789) | typedef struct XrSpaceVelocity {
type XrQuaternionf (line 797) | typedef struct XrQuaternionf {
type XrPosef (line 804) | typedef struct XrPosef {
type XrReferenceSpaceCreateInfo (line 809) | typedef struct XrReferenceSpaceCreateInfo {
type XrExtent2Df (line 816) | typedef struct XrExtent2Df {
type XrActionSpaceCreateInfo (line 821) | typedef struct XrActionSpaceCreateInfo {
type XrSpaceLocation (line 829) | typedef struct XrSpaceLocation {
type XrViewConfigurationProperties (line 836) | typedef struct XrViewConfigurationProperties {
type XrViewConfigurationView (line 843) | typedef struct XrViewConfigurationView {
type XrSwapchainCreateInfo (line 854) | typedef struct XrSwapchainCreateInfo {
type XrSwapchainImageBaseHeader (line 868) | typedef struct XR_MAY_ALIAS XrSwapchainImageBaseHeader
type XrSwapchainImageAcquireInfo (line 873) | typedef struct XrSwapchainImageAcquireInfo {
type XrSwapchainImageWaitInfo (line 878) | typedef struct XrSwapchainImageWaitInfo {
type XrSwapchainImageReleaseInfo (line 884) | typedef struct XrSwapchainImageReleaseInfo {
type XrSessionBeginInfo (line 889) | typedef struct XrSessionBeginInfo {
type XrFrameWaitInfo (line 895) | typedef struct XrFrameWaitInfo {
type XrFrameState (line 900) | typedef struct XrFrameState {
type XrFrameBeginInfo (line 908) | typedef struct XrFrameBeginInfo {
type XrCompositionLayerBaseHeader (line 913) | typedef struct XR_MAY_ALIAS XrCompositionLayerBaseHeader
type XrFrameEndInfo (line 920) | typedef struct XrFrameEndInfo {
type XrViewLocateInfo (line 929) | typedef struct XrViewLocateInfo {
type XrViewState (line 937) | typedef struct XrViewState {
type XrFovf (line 943) | typedef struct XrFovf {
type XrView (line 950) | typedef struct XrView {
type XrActionSetCreateInfo (line 957) | typedef struct XrActionSetCreateInfo {
type XrActionCreateInfo (line 965) | typedef struct XrActionCreateInfo {
type XrActionSuggestedBinding (line 975) | typedef struct XrActionSuggestedBinding {
type XrInteractionProfileSuggestedBinding (line 980) | typedef struct XrInteractionProfileSuggestedBinding {
type XrSessionActionSetsAttachInfo (line 988) | typedef struct XrSessionActionSetsAttachInfo {
type XrInteractionProfileState (line 995) | typedef struct XrInteractionProfileState {
type XrActionStateGetInfo (line 1001) | typedef struct XrActionStateGetInfo {
type XrActionStateBoolean (line 1008) | typedef struct XrActionStateBoolean {
type XrActionStateFloat (line 1017) | typedef struct XrActionStateFloat {
type XrVector2f (line 1026) | typedef struct XrVector2f {
type XrActionStateVector2f (line 1031) | typedef struct XrActionStateVector2f {
type XrActionStatePose (line 1040) | typedef struct XrActionStatePose {
type XrActiveActionSet (line 1046) | typedef struct XrActiveActionSet {
type XrActionsSyncInfo (line 1051) | typedef struct XrActionsSyncInfo {
type XrBoundSourcesForActionEnumerateInfo (line 1058) | typedef struct XrBoundSourcesForActionEnumerateInfo {
type XrInputSourceLocalizedNameGetInfo (line 1064) | typedef struct XrInputSourceLocalizedNameGetInfo {
type XrHapticActionInfo (line 1071) | typedef struct XrHapticActionInfo {
type XrHapticBaseHeader (line 1078) | typedef struct XR_MAY_ALIAS XrHapticBaseHeader
type XrBaseInStructure (line 1083) | typedef struct XR_MAY_ALIAS XrBaseInStructure
type XrBaseInStructure (line 1085) | struct XrBaseInStructure
type XrBaseOutStructure (line 1088) | typedef struct XR_MAY_ALIAS XrBaseOutStructure
type XrBaseOutStructure (line 1090) | struct XrBaseOutStructure
type XrOffset2Di (line 1093) | typedef struct XrOffset2Di {
type XrExtent2Di (line 1098) | typedef struct XrExtent2Di {
type XrRect2Di (line 1103) | typedef struct XrRect2Di {
type XrSwapchainSubImage (line 1108) | typedef struct XrSwapchainSubImage {
type XrCompositionLayerProjectionView (line 1114) | typedef struct XrCompositionLayerProjectionView {
type XrCompositionLayerProjection (line 1122) | typedef struct XrCompositionLayerProjection {
type XrCompositionLayerQuad (line 1131) | typedef struct XrCompositionLayerQuad {
type XrEventDataBaseHeader (line 1142) | typedef struct XR_MAY_ALIAS XrEventDataBaseHeader
type XrEventDataEventsLost (line 1147) | typedef struct XrEventDataEventsLost {
type XrEventDataInstanceLossPending (line 1153) | typedef struct XrEventDataInstanceLossPending {
type XrEventDataSessionStateChanged (line 1159) | typedef struct XrEventDataSessionStateChanged {
type XrEventDataReferenceSpaceChangePending (line 1167) | typedef struct XrEventDataReferenceSpaceChangePending {
type XrEventDataInteractionProfileChanged (line 1177) | typedef struct XrEventDataInteractionProfileChanged {
type XrHapticVibration (line 1183) | typedef struct XrHapticVibration {
type XrOffset2Df (line 1191) | typedef struct XrOffset2Df {
type XrRect2Df (line 1196) | typedef struct XrRect2Df {
type XrVector4f (line 1201) | typedef struct XrVector4f {
type XrColor4f (line 1208) | typedef struct XrColor4f {
type PFN_xrVoidFunction (line 1215) | typedef XrResult (XRAPI_PTR *PFN_xrGetInstanceProcAddr)(XrInstance insta...
type XrSystemGetInfo (line 1235) | typedef XrResult (XRAPI_PTR *PFN_xrGetSystem)(XrInstance instance, const...
type XrSessionCreateInfo (line 1245) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSession)(XrInstance instance,
type XrReferenceSpaceCreateInfo (line 1253) | typedef XrResult (XRAPI_PTR *PFN_xrCreateReferenceSpace)(XrSession session,
type XrActionSpaceCreateInfo (line 1259) | typedef XrResult (XRAPI_PTR *PFN_xrCreateActionSpace)(XrSession session,
type XrSwapchainCreateInfo (line 1284) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSwapchain)(XrSession session,
type XrSwapchainImageAcquireInfo (line 1292) | typedef XrResult (XRAPI_PTR *PFN_xrAcquireSwapchainImage)(XrSwapchain sw...
type XrSwapchainImageWaitInfo (line 1295) | typedef XrResult (XRAPI_PTR *PFN_xrWaitSwapchainImage)(XrSwapchain swapc...
type XrSwapchainImageReleaseInfo (line 1297) | typedef XrResult (XRAPI_PTR *PFN_xrReleaseSwapchainImage)(XrSwapchain sw...
type XrSessionBeginInfo (line 1299) | typedef XrResult (XRAPI_PTR *PFN_xrBeginSession)(XrSession session,
type XrFrameWaitInfo (line 1303) | typedef XrResult (XRAPI_PTR *PFN_xrWaitFrame)(XrSession session,
type XrFrameBeginInfo (line 1306) | typedef XrResult (XRAPI_PTR *PFN_xrBeginFrame)(XrSession session,
type XrFrameEndInfo (line 1308) | typedef XrResult (XRAPI_PTR *PFN_xrEndFrame)(XrSession session, const Xr...
type XrViewLocateInfo (line 1309) | typedef XrResult (XRAPI_PTR *PFN_xrLocateViews)(XrSession session,
type XrActionSetCreateInfo (line 1318) | typedef XrResult (XRAPI_PTR *PFN_xrCreateActionSet)(XrInstance instance,
type XrActionCreateInfo (line 1322) | typedef XrResult (XRAPI_PTR *PFN_xrCreateAction)(XrActionSet actionSet,
type XrInteractionProfileSuggestedBinding (line 1326) | typedef XrResult (XRAPI_PTR *PFN_xrSuggestInteractionProfileBindings)(Xr...
type XrSessionActionSetsAttachInfo (line 1328) | typedef XrResult (XRAPI_PTR *PFN_xrAttachSessionActionSets)(XrSession se...
type XrActionStateGetInfo (line 1333) | typedef XrResult (XRAPI_PTR *PFN_xrGetActionStateBoolean)(XrSession sess...
type XrActionStateGetInfo (line 1336) | typedef XrResult (XRAPI_PTR *PFN_xrGetActionStateFloat)(XrSession session,
type XrActionStateGetInfo (line 1339) | typedef XrResult (XRAPI_PTR *PFN_xrGetActionStateVector2f)(XrSession ses...
type XrActionStateGetInfo (line 1342) | typedef XrResult (XRAPI_PTR *PFN_xrGetActionStatePose)(XrSession session,
type XrActionsSyncInfo (line 1345) | typedef XrResult (XRAPI_PTR *PFN_xrSyncActions)(XrSession session,
type XrBoundSourcesForActionEnumerateInfo (line 1347) | typedef XrResult (XRAPI_PTR *PFN_xrEnumerateBoundSourcesForAction)(XrSes...
type XrInputSourceLocalizedNameGetInfo (line 1352) | typedef XrResult (XRAPI_PTR *PFN_xrGetInputSourceLocalizedName)(XrSessio...
type XrHapticActionInfo (line 1357) | typedef XrResult (XRAPI_PTR *PFN_xrApplyHapticFeedback)(XrSession session,
type XrHapticActionInfo (line 1360) | typedef XrResult (XRAPI_PTR *PFN_xrStopHapticFeedback)(XrSession session,
type XrCompositionLayerCubeKHR (line 1639) | typedef struct XrCompositionLayerCubeKHR {
type XrCompositionLayerDepthInfoKHR (line 1655) | typedef struct XrCompositionLayerDepthInfoKHR {
type XrCompositionLayerCylinderKHR (line 1669) | typedef struct XrCompositionLayerCylinderKHR {
type XrCompositionLayerEquirectKHR (line 1686) | typedef struct XrCompositionLayerEquirectKHR {
type XrVisibilityMaskTypeKHR (line 1704) | typedef enum XrVisibilityMaskTypeKHR {
type XrVisibilityMaskKHR (line 1710) | typedef struct XrVisibilityMaskKHR {
type XrEventDataVisibilityMaskChangedKHR (line 1721) | typedef struct XrEventDataVisibilityMaskChangedKHR {
type XrCompositionLayerColorScaleBiasKHR (line 1751) | typedef struct XrCompositionLayerColorScaleBiasKHR {
type XrLoaderInitInfoBaseHeaderKHR (line 1762) | typedef struct XR_MAY_ALIAS XrLoaderInitInfoBaseHeaderKHR
type XrCompositionLayerEquirect2KHR (line 1781) | typedef struct XrCompositionLayerEquirect2KHR {
type XrBindingModificationBaseHeaderKHR (line 1799) | typedef struct XR_MAY_ALIAS XrBindingModificationBaseHeaderKHR
type XrBindingModificationsKHR (line 1805) | typedef struct XrBindingModificationsKHR {
type XrPerfSettingsDomainEXT (line 1822) | typedef enum XrPerfSettingsDomainEXT {
type XrPerfSettingsSubDomainEXT (line 1828) | typedef enum XrPerfSettingsSubDomainEXT {
type XrPerfSettingsLevelEXT (line 1835) | typedef enum XrPerfSettingsLevelEXT {
type XrPerfSettingsNotificationLevelEXT (line 1843) | typedef enum XrPerfSettingsNotificationLevelEXT {
type XrEventDataPerfSettingsEXT (line 1849) | typedef struct XrEventDataPerfSettingsEXT {
type XrFlags64 (line 1897) | typedef XrFlags64 XrDebugUtilsMessageSeverityFlagsEXT;
type XrFlags64 (line 1905) | typedef XrFlags64 XrDebugUtilsMessageTypeFlagsEXT;
type XrDebugUtilsObjectNameInfoEXT (line 1913) | typedef struct XrDebugUtilsObjectNameInfoEXT {
type XrDebugUtilsLabelEXT (line 1921) | typedef struct XrDebugUtilsLabelEXT {
type XrDebugUtilsMessengerCallbackDataEXT (line 1927) | typedef struct XrDebugUtilsMessengerCallbackDataEXT {
type XrDebugUtilsMessengerCreateInfoEXT (line 1947) | typedef struct XrDebugUtilsMessengerCreateInfoEXT {
type XrDebugUtilsObjectNameInfoEXT (line 1956) | typedef XrResult (XRAPI_PTR *PFN_xrSetDebugUtilsObjectNameEXT)(XrInstanc...
type XrDebugUtilsMessengerCreateInfoEXT (line 1958) | typedef XrResult (XRAPI_PTR *PFN_xrCreateDebugUtilsMessengerEXT)(XrInsta...
type XrDebugUtilsLabelEXT (line 1967) | typedef XrResult (XRAPI_PTR *PFN_xrSessionBeginDebugUtilsLabelRegionEXT)...
type XrDebugUtilsLabelEXT (line 1970) | typedef XrResult (XRAPI_PTR *PFN_xrSessionInsertDebugUtilsLabelEXT)(XrSe...
type XrSystemEyeGazeInteractionPropertiesEXT (line 2011) | typedef struct XrSystemEyeGazeInteractionPropertiesEXT {
type XrEyeGazeSampleTimeEXT (line 2018) | typedef struct XrEyeGazeSampleTimeEXT {
type XrFlags64 (line 2028) | typedef XrFlags64 XrOverlaySessionCreateFlagsEXTX;
type XrFlags64 (line 2032) | typedef XrFlags64 XrOverlayMainSessionFlagsEXTX;
type XrSessionCreateInfoOverlayEXTX (line 2038) | typedef struct XrSessionCreateInfoOverlayEXTX {
type XrEventDataMainSessionVisibilityChangedEXTX (line 2045) | typedef struct XrEventDataMainSessionVisibilityChangedEXTX {
type XrSpatialAnchorCreateInfoMSFT (line 2067) | typedef struct XrSpatialAnchorCreateInfoMSFT {
type XrSpatialAnchorSpaceCreateInfoMSFT (line 2075) | typedef struct XrSpatialAnchorSpaceCreateInfoMSFT {
type XrSpatialAnchorCreateInfoMSFT (line 2082) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorMSFT)(XrSession se...
type XrSpatialAnchorSpaceCreateInfoMSFT (line 2085) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorSpaceMSFT)(XrSessi...
type XrFlags64 (line 2111) | typedef XrFlags64 XrCompositionLayerImageLayoutFlagsFB;
type XrCompositionLayerImageLayoutFB (line 2117) | typedef struct XrCompositionLayerImageLayoutFB {
type XrBlendFactorFB (line 2128) | typedef enum XrBlendFactorFB {
type XrCompositionLayerAlphaBlendFB (line 2138) | typedef struct XrCompositionLayerAlphaBlendFB {
type XrViewConfigurationDepthRangeEXT (line 2162) | typedef struct XrViewConfigurationDepthRangeEXT {
type XrSpatialGraphNodeTypeMSFT (line 2237) | typedef enum XrSpatialGraphNodeTypeMSFT {
type XrSpatialGraphNodeSpaceCreateInfoMSFT (line 2242) | typedef struct XrSpatialGraphNodeSpaceCreateInfoMSFT {
type XrSpatialGraphStaticNodeBindingCreateInfoMSFT (line 2250) | typedef struct XrSpatialGraphStaticNodeBindingCreateInfoMSFT {
type XrSpatialGraphNodeBindingPropertiesGetInfoMSFT (line 2258) | typedef struct XrSpatialGraphNodeBindingPropertiesGetInfoMSFT {
type XrSpatialGraphNodeBindingPropertiesMSFT (line 2263) | typedef struct XrSpatialGraphNodeBindingPropertiesMSFT {
type XrSpatialGraphNodeSpaceCreateInfoMSFT (line 2270) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialGraphNodeSpaceMSFT)(XrSe...
type XrSpatialGraphStaticNodeBindingCreateInfoMSFT (line 2273) | typedef XrResult (XRAPI_PTR *PFN_xrTryCreateSpatialGraphStaticNodeBindin...
type XrSpatialGraphNodeBindingPropertiesGetInfoMSFT (line 2278) | typedef XrResult (XRAPI_PTR *PFN_xrGetSpatialGraphNodeBindingPropertiesM...
type XrHandEXT (line 2319) | typedef enum XrHandEXT {
type XrHandJointEXT (line 2325) | typedef enum XrHandJointEXT {
type XrHandJointSetEXT (line 2355) | typedef enum XrHandJointSetEXT {
type XrSystemHandTrackingPropertiesEXT (line 2361) | typedef struct XrSystemHandTrackingPropertiesEXT {
type XrHandTrackerCreateInfoEXT (line 2367) | typedef struct XrHandTrackerCreateInfoEXT {
type XrHandJointsLocateInfoEXT (line 2374) | typedef struct XrHandJointsLocateInfoEXT {
type XrHandJointLocationEXT (line 2381) | typedef struct XrHandJointLocationEXT {
type XrHandJointVelocityEXT (line 2387) | typedef struct XrHandJointVelocityEXT {
type XrHandJointLocationsEXT (line 2393) | typedef struct XrHandJointLocationsEXT {
type XrHandJointVelocitiesEXT (line 2402) | typedef struct XrHandJointVelocitiesEXT {
type XrHandTrackerCreateInfoEXT (line 2409) | typedef XrResult (XRAPI_PTR *PFN_xrCreateHandTrackerEXT)(XrSession session,
type XrHandJointsLocateInfoEXT (line 2413) | typedef XrResult (XRAPI_PTR *PFN_xrLocateHandJointsEXT)(XrHandTrackerEXT...
type XrHandPoseTypeMSFT (line 2439) | typedef enum XrHandPoseTypeMSFT {
type XrSystemHandTrackingMeshPropertiesMSFT (line 2445) | typedef struct XrSystemHandTrackingMeshPropertiesMSFT {
type XrHandMeshSpaceCreateInfoMSFT (line 2453) | typedef struct XrHandMeshSpaceCreateInfoMSFT {
type XrHandMeshUpdateInfoMSFT (line 2460) | typedef struct XrHandMeshUpdateInfoMSFT {
type XrHandMeshIndexBufferMSFT (line 2467) | typedef struct XrHandMeshIndexBufferMSFT {
type XrHandMeshVertexMSFT (line 2474) | typedef struct XrHandMeshVertexMSFT {
type XrHandMeshVertexBufferMSFT (line 2479) | typedef struct XrHandMeshVertexBufferMSFT {
type XrHandMeshMSFT (line 2486) | typedef struct XrHandMeshMSFT {
type XrHandPoseTypeInfoMSFT (line 2497) | typedef struct XrHandPoseTypeInfoMSFT {
type XrHandMeshSpaceCreateInfoMSFT (line 2503) | typedef XrResult (XRAPI_PTR *PFN_xrCreateHandMeshSpaceMSFT)(XrHandTracke...
type XrHandMeshUpdateInfoMSFT (line 2506) | typedef XrResult (XRAPI_PTR *PFN_xrUpdateHandMeshMSFT)(XrHandTrackerEXT ...
type XrSecondaryViewConfigurationSessionBeginInfoMSFT (line 2529) | typedef struct XrSecondaryViewConfigurationSessionBeginInfoMSFT {
type XrSecondaryViewConfigurationStateMSFT (line 2536) | typedef struct XrSecondaryViewConfigurationStateMSFT {
type XrSecondaryViewConfigurationFrameStateMSFT (line 2544) | typedef struct XrSecondaryViewConfigurationFrameStateMSFT {
type XrSecondaryViewConfigurationLayerInfoMSFT (line 2551) | typedef struct XrSecondaryViewConfigurationLayerInfoMSFT {
type XrSecondaryViewConfigurationFrameEndInfoMSFT (line 2561) | typedef struct XrSecondaryViewConfigurationFrameEndInfoMSFT {
type XrSecondaryViewConfigurationSwapchainCreateInfoMSFT (line 2569) | typedef struct XrSecondaryViewConfigurationSwapchainCreateInfoMSFT {
type XrControllerModelKeyStateMSFT (line 2589) | typedef struct XrControllerModelKeyStateMSFT {
type XrControllerModelNodePropertiesMSFT (line 2595) | typedef struct XrControllerModelNodePropertiesMSFT {
type XrControllerModelPropertiesMSFT (line 2602) | typedef struct XrControllerModelPropertiesMSFT {
type XrControllerModelNodeStateMSFT (line 2610) | typedef struct XrControllerModelNodeStateMSFT {
type XrControllerModelStateMSFT (line 2616) | typedef struct XrControllerModelStateMSFT {
type XrViewConfigurationViewFovEPIC (line 2675) | typedef struct XrViewConfigurationViewFovEPIC {
type XrReprojectionModeMSFT (line 2687) | typedef enum XrReprojectionModeMSFT {
type XrCompositionLayerReprojectionInfoMSFT (line 2695) | typedef struct XrCompositionLayerReprojectionInfoMSFT {
type XrCompositionLayerReprojectionPlaneOverrideMSFT (line 2702) | typedef struct XrCompositionLayerReprojectionPlaneOverrideMSFT {
type XrSwapchainStateBaseHeaderFB (line 2738) | typedef struct XR_MAY_ALIAS XrSwapchainStateBaseHeaderFB
type XrSwapchainStateBaseHeaderFB (line 2743) | typedef XrResult (XRAPI_PTR *PFN_xrUpdateSwapchainFB)(XrSwapchain swapch...
type XrFlags64 (line 2764) | typedef XrFlags64 XrCompositionLayerSecureContentFlagsFB;
type XrCompositionLayerSecureContentFB (line 2771) | typedef struct XrCompositionLayerSecureContentFB {
type XrBodyJointFB (line 2783) | typedef enum XrBodyJointFB {
type XrBodyJointSetFB (line 2859) | typedef enum XrBodyJointSetFB {
type XrBodyJointLocationFB (line 2863) | typedef struct XrBodyJointLocationFB {
type XrSystemBodyTrackingPropertiesFB (line 2869) | typedef struct XrSystemBodyTrackingPropertiesFB {
type XrBodyTrackerCreateInfoFB (line 2875) | typedef struct XrBodyTrackerCreateInfoFB {
type XrBodySkeletonJointFB (line 2881) | typedef struct XrBodySkeletonJointFB {
type XrBodySkeletonFB (line 2887) | typedef struct XrBodySkeletonFB {
type XrBodyJointsLocateInfoFB (line 2894) | typedef struct XrBodyJointsLocateInfoFB {
type XrBodyJointLocationsFB (line 2901) | typedef struct XrBodyJointLocationsFB {
type XrBodyTrackerCreateInfoFB (line 2912) | typedef XrResult (XRAPI_PTR *PFN_xrCreateBodyTrackerFB)(XrSession session,
type XrBodyJointsLocateInfoFB (line 2916) | typedef XrResult (XRAPI_PTR *PFN_xrLocateBodyJointsFB)(XrBodyTrackerFB b...
type XrInteractionProfileDpadBindingEXT (line 2947) | typedef struct XrInteractionProfileDpadBindingEXT {
type XrInteractionProfileAnalogThresholdVALVE (line 2965) | typedef struct XrInteractionProfileAnalogThresholdVALVE {
type XrHandJointsMotionRangeEXT (line 2981) | typedef enum XrHandJointsMotionRangeEXT {
type XrHandJointsMotionRangeInfoEXT (line 2987) | typedef struct XrHandJointsMotionRangeInfoEXT {
type XrSceneComputeFeatureMSFT (line 3019) | typedef enum XrSceneComputeFeatureMSFT {
type XrSceneComputeConsistencyMSFT (line 3028) | typedef enum XrSceneComputeConsistencyMSFT {
type XrMeshComputeLodMSFT (line 3035) | typedef enum XrMeshComputeLodMSFT {
type XrSceneComponentTypeMSFT (line 3043) | typedef enum XrSceneComponentTypeMSFT {
type XrSceneObjectTypeMSFT (line 3053) | typedef enum XrSceneObjectTypeMSFT {
type XrScenePlaneAlignmentTypeMSFT (line 3064) | typedef enum XrScenePlaneAlignmentTypeMSFT {
type XrSceneComputeStateMSFT (line 3071) | typedef enum XrSceneComputeStateMSFT {
type XrUuidMSFT (line 3078) | typedef struct XrUuidMSFT {
type XrSceneObserverCreateInfoMSFT (line 3082) | typedef struct XrSceneObserverCreateInfoMSFT {
type XrSceneCreateInfoMSFT (line 3087) | typedef struct XrSceneCreateInfoMSFT {
type XrSceneSphereBoundMSFT (line 3092) | typedef struct XrSceneSphereBoundMSFT {
type XrSceneOrientedBoxBoundMSFT (line 3097) | typedef struct XrSceneOrientedBoxBoundMSFT {
type XrSceneFrustumBoundMSFT (line 3102) | typedef struct XrSceneFrustumBoundMSFT {
type XrSceneBoundsMSFT (line 3108) | typedef struct XrSceneBoundsMSFT {
type XrNewSceneComputeInfoMSFT (line 3119) | typedef struct XrNewSceneComputeInfoMSFT {
type XrVisualMeshComputeLodInfoMSFT (line 3129) | typedef struct XrVisualMeshComputeLodInfoMSFT {
type XrSceneComponentMSFT (line 3135) | typedef struct XrSceneComponentMSFT {
type XrSceneComponentsMSFT (line 3142) | typedef struct XrSceneComponentsMSFT {
type XrSceneComponentsGetInfoMSFT (line 3150) | typedef struct XrSceneComponentsGetInfoMSFT {
type XrSceneComponentLocationMSFT (line 3156) | typedef struct XrSceneComponentLocationMSFT {
type XrSceneComponentLocationsMSFT (line 3161) | typedef struct XrSceneComponentLocationsMSFT {
type XrSceneComponentsLocateInfoMSFT (line 3168) | typedef struct XrSceneComponentsLocateInfoMSFT {
type XrSceneObjectMSFT (line 3177) | typedef struct XrSceneObjectMSFT {
type XrSceneObjectsMSFT (line 3182) | typedef struct XrSceneObjectsMSFT {
type XrSceneComponentParentFilterInfoMSFT (line 3190) | typedef struct XrSceneComponentParentFilterInfoMSFT {
type XrSceneObjectTypesFilterInfoMSFT (line 3197) | typedef struct XrSceneObjectTypesFilterInfoMSFT {
type XrScenePlaneMSFT (line 3204) | typedef struct XrScenePlaneMSFT {
type XrScenePlanesMSFT (line 3212) | typedef struct XrScenePlanesMSFT {
type XrScenePlaneAlignmentFilterInfoMSFT (line 3220) | typedef struct XrScenePlaneAlignmentFilterInfoMSFT {
type XrSceneMeshMSFT (line 3227) | typedef struct XrSceneMeshMSFT {
type XrSceneMeshesMSFT (line 3233) | typedef struct XrSceneMeshesMSFT {
type XrSceneMeshBuffersGetInfoMSFT (line 3240) | typedef struct XrSceneMeshBuffersGetInfoMSFT {
type XrSceneMeshBuffersMSFT (line 3246) | typedef struct XrSceneMeshBuffersMSFT {
type XrSceneMeshVertexBufferMSFT (line 3251) | typedef struct XrSceneMeshVertexBufferMSFT {
type XrSceneMeshIndicesUint32MSFT (line 3259) | typedef struct XrSceneMeshIndicesUint32MSFT {
type XrSceneMeshIndicesUint16MSFT (line 3267) | typedef struct XrSceneMeshIndicesUint16MSFT {
type XrSceneObserverCreateInfoMSFT (line 3280) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSceneObserverMSFT)(XrSession se...
type XrSceneCreateInfoMSFT (line 3284) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSceneMSFT)(XrSceneObserverMSFT ...
type XrNewSceneComputeInfoMSFT (line 3288) | typedef XrResult (XRAPI_PTR *PFN_xrComputeNewSceneMSFT)(XrSceneObserverM...
type XrSceneComponentsGetInfoMSFT (line 3292) | typedef XrResult (XRAPI_PTR *PFN_xrGetSceneComponentsMSFT)(XrSceneMSFT s...
type XrSceneComponentsLocateInfoMSFT (line 3295) | typedef XrResult (XRAPI_PTR *PFN_xrLocateSceneComponentsMSFT)(XrSceneMSF...
type XrSceneMeshBuffersGetInfoMSFT (line 3298) | typedef XrResult (XRAPI_PTR *PFN_xrGetSceneMeshBuffersMSFT)(XrSceneMSFT ...
type XrSerializedSceneFragmentDataGetInfoMSFT (line 3356) | typedef struct XrSerializedSceneFragmentDataGetInfoMSFT {
type XrDeserializeSceneFragmentMSFT (line 3362) | typedef struct XrDeserializeSceneFragmentMSFT {
type XrSceneDeserializeInfoMSFT (line 3367) | typedef struct XrSceneDeserializeInfoMSFT {
type XrSceneDeserializeInfoMSFT (line 3374) | typedef XrResult (XRAPI_PTR *PFN_xrDeserializeSceneMSFT)(XrSceneObserver...
type XrSerializedSceneFragmentDataGetInfoMSFT (line 3376) | typedef XrResult (XRAPI_PTR *PFN_xrGetSerializedSceneFragmentDataMSFT)(X...
type XrEventDataDisplayRefreshRateChangedFB (line 3401) | typedef struct XrEventDataDisplayRefreshRateChangedFB {
type XrViveTrackerPathsHTCX (line 3444) | typedef struct XrViveTrackerPathsHTCX {
type XrEventDataViveTrackerConnectedHTCX (line 3451) | typedef struct XrEventDataViveTrackerConnectedHTCX {
type XrEyeExpressionHTC (line 3484) | typedef enum XrEyeExpressionHTC {
type XrLipExpressionHTC (line 3502) | typedef enum XrLipExpressionHTC {
type XrFacialTrackingTypeHTC (line 3543) | typedef enum XrFacialTrackingTypeHTC {
type XrSystemFacialTrackingPropertiesHTC (line 3549) | typedef struct XrSystemFacialTrackingPropertiesHTC {
type XrFacialExpressionsHTC (line 3556) | typedef struct XrFacialExpressionsHTC {
type XrFacialTrackerCreateInfoHTC (line 3565) | typedef struct XrFacialTrackerCreateInfoHTC {
type XrFacialTrackerCreateInfoHTC (line 3571) | typedef XrResult (XRAPI_PTR *PFN_xrCreateFacialTrackerHTC)(XrSession ses...
type XrColorSpaceFB (line 3614) | typedef enum XrColorSpaceFB {
type XrSystemColorSpacePropertiesFB (line 3626) | typedef struct XrSystemColorSpacePropertiesFB {
type XrColorSpaceFB (line 3636) | typedef XrResult (XRAPI_PTR *PFN_xrSetColorSpaceFB)(XrSession session,
type XrVector4sFB (line 3657) | typedef struct XrVector4sFB {
type XrHandTrackingMeshFB (line 3664) | typedef struct XrHandTrackingMeshFB {
type XrHandTrackingScaleFB (line 3685) | typedef struct XrHandTrackingScaleFB {
type XrFlags64 (line 3709) | typedef XrFlags64 XrHandTrackingAimFlagsFB;
type XrHandTrackingAimStateFB (line 3723) | typedef struct XrHandTrackingAimStateFB {
type XrHandCapsuleFB (line 3742) | typedef struct XrHandCapsuleFB {
type XrHandTrackingCapsulesStateFB (line 3749) | typedef struct XrHandTrackingCapsulesStateFB {
type XrSpaceComponentTypeFB (line 3762) | typedef enum XrSpaceComponentTypeFB {
type XrSystemSpatialEntityPropertiesFB (line 3774) | typedef struct XrSystemSpatialEntityPropertiesFB {
type XrSpatialAnchorCreateInfoFB (line 3780) | typedef struct XrSpatialAnchorCreateInfoFB {
type XrSpaceComponentStatusSetInfoFB (line 3788) | typedef struct XrSpaceComponentStatusSetInfoFB {
type XrSpaceComponentStatusFB (line 3796) | typedef struct XrSpaceComponentStatusFB {
type XrUuidEXT (line 3803) | typedef struct XrUuidEXT {
type XrEventDataSpatialAnchorCreateCompleteFB (line 3807) | typedef struct XrEventDataSpatialAnchorCreateCompleteFB {
type XrEventDataSpaceSetStatusCompleteFB (line 3816) | typedef struct XrEventDataSpaceSetStatusCompleteFB {
type XrSpatialAnchorCreateInfoFB (line 3827) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorFB)(XrSession sess...
type XrSpaceComponentStatusSetInfoFB (line 3835) | typedef XrResult (XRAPI_PTR *PFN_xrSetSpaceComponentStatusFB)(XrSpace sp...
type XrFlags64 (line 3876) | typedef XrFlags64 XrSwapchainCreateFoveationFlagsFB;
type XrFlags64 (line 3882) | typedef XrFlags64 XrSwapchainStateFoveationFlagsFB;
type XrFoveationProfileCreateInfoFB (line 3886) | typedef struct XrFoveationProfileCreateInfoFB {
type XrSwapchainCreateInfoFoveationFB (line 3892) | typedef struct XrSwapchainCreateInfoFoveationFB {
type XrSwapchainStateFoveationFB (line 3898) | typedef struct XrSwapchainStateFoveationFB {
type XrFoveationProfileCreateInfoFB (line 3905) | typedef XrResult (XRAPI_PTR *PFN_xrCreateFoveationProfileFB)(XrSession s...
type XrFoveationLevelFB (line 3927) | typedef enum XrFoveationLevelFB {
type XrFoveationDynamicFB (line 3935) | typedef enum XrFoveationDynamicFB {
type XrFoveationLevelProfileCreateInfoFB (line 3941) | typedef struct XrFoveationLevelProfileCreateInfoFB {
type XrFlags64 (line 3954) | typedef XrFlags64 XrKeyboardTrackingFlagsFB;
type XrFlags64 (line 3962) | typedef XrFlags64 XrKeyboardTrackingQueryFlagsFB;
type XrSystemKeyboardTrackingPropertiesFB (line 3969) | typedef struct XrSystemKeyboardTrackingPropertiesFB {
type XrKeyboardTrackingDescriptionFB (line 3975) | typedef struct XrKeyboardTrackingDescriptionFB {
type XrKeyboardSpaceCreateInfoFB (line 3982) | typedef struct XrKeyboardSpaceCreateInfoFB {
type XrKeyboardTrackingQueryFB (line 3988) | typedef struct XrKeyboardTrackingQueryFB {
type XrKeyboardTrackingQueryFB (line 3994) | typedef XrResult (XRAPI_PTR *PFN_xrQuerySystemTrackedKeyboardFB)(XrSessi...
type XrKeyboardSpaceCreateInfoFB (line 3997) | typedef XrResult (XRAPI_PTR *PFN_xrCreateKeyboardSpaceFB)(XrSession sess...
type XrWindingOrderFB (line 4021) | typedef enum XrWindingOrderFB {
type XrFlags64 (line 4027) | typedef XrFlags64 XrTriangleMeshFlagsFB;
type XrTriangleMeshCreateInfoFB (line 4032) | typedef struct XrTriangleMeshCreateInfoFB {
type XrTriangleMeshCreateInfoFB (line 4043) | typedef XrResult (XRAPI_PTR *PFN_xrCreateTriangleMeshFB)(XrSession session,
type XrPassthroughLayerPurposeFB (line 4103) | typedef enum XrPassthroughLayerPurposeFB {
type XrFlags64 (line 4110) | typedef XrFlags64 XrPassthroughCapabilityFlagsFB;
type XrFlags64 (line 4117) | typedef XrFlags64 XrPassthroughFlagsFB;
type XrFlags64 (line 4123) | typedef XrFlags64 XrPassthroughStateChangedFlagsFB;
type XrSystemPassthroughPropertiesFB (line 4132) | typedef struct XrSystemPassthroughPropertiesFB {
type XrSystemPassthroughProperties2FB (line 4139) | typedef struct XrSystemPassthroughProperties2FB {
type XrPassthroughCreateInfoFB (line 4145) | typedef struct XrPassthroughCreateInfoFB {
type XrPassthroughLayerCreateInfoFB (line 4151) | typedef struct XrPassthroughLayerCreateInfoFB {
type XrCompositionLayerPassthroughFB (line 4160) | typedef struct XrCompositionLayerPassthroughFB {
type XrGeometryInstanceCreateInfoFB (line 4168) | typedef struct XrGeometryInstanceCreateInfoFB {
type XrGeometryInstanceTransformFB (line 4178) | typedef struct XrGeometryInstanceTransformFB {
type XrPassthroughStyleFB (line 4187) | typedef struct XrPassthroughStyleFB {
type XrPassthroughColorMapMonoToRgbaFB (line 4195) | typedef struct XrPassthroughColorMapMonoToRgbaFB {
type XrPassthroughColorMapMonoToMonoFB (line 4202) | typedef struct XrPassthroughColorMapMonoToMonoFB {
type XrPassthroughBrightnessContrastSaturationFB (line 4209) | typedef struct XrPassthroughBrightnessContrastSaturationFB {
type XrEventDataPassthroughStateChangedFB (line 4217) | typedef struct XrEventDataPassthroughStateChangedFB {
type XrPassthroughCreateInfoFB (line 4223) | typedef XrResult (XRAPI_PTR *PFN_xrCreatePassthroughFB)(XrSession session,
type XrPassthroughLayerCreateInfoFB (line 4229) | typedef XrResult (XRAPI_PTR *PFN_xrCreatePassthroughLayerFB)(XrSession s...
type XrPassthroughStyleFB (line 4235) | typedef XrResult (XRAPI_PTR *PFN_xrPassthroughLayerSetStyleFB)(XrPassthr...
type XrGeometryInstanceCreateInfoFB (line 4237) | typedef XrResult (XRAPI_PTR *PFN_xrCreateGeometryInstanceFB)(XrSession s...
type XrGeometryInstanceTransformFB (line 4241) | typedef XrResult (XRAPI_PTR *PFN_xrGeometryInstanceSetTransformFB)(XrGeo...
type XrFlags64 (line 4301) | typedef XrFlags64 XrRenderModelFlagsFB;
type XrRenderModelPathInfoFB (line 4307) | typedef struct XrRenderModelPathInfoFB {
type XrRenderModelPropertiesFB (line 4313) | typedef struct XrRenderModelPropertiesFB {
type XrRenderModelBufferFB (line 4323) | typedef struct XrRenderModelBufferFB {
type XrRenderModelLoadInfoFB (line 4331) | typedef struct XrRenderModelLoadInfoFB {
type XrSystemRenderModelPropertiesFB (line 4338) | typedef struct XrSystemRenderModelPropertiesFB {
type XrRenderModelCapabilitiesRequestFB (line 4345) | typedef struct XrRenderModelCapabilitiesRequestFB {
type XrRenderModelLoadInfoFB (line 4357) | typedef XrResult (XRAPI_PTR *PFN_xrLoadRenderModelFB)(XrSession session,
type XrViewLocateFoveatedRenderingVARJO (line 4386) | typedef struct XrViewLocateFoveatedRenderingVARJO {
type XrFoveatedViewConfigurationViewVARJO (line 4393) | typedef struct XrFoveatedViewConfigurationViewVARJO {
type XrSystemFoveatedRenderingPropertiesVARJO (line 4400) | typedef struct XrSystemFoveatedRenderingPropertiesVARJO {
type XrCompositionLayerDepthTestVARJO (line 4411) | typedef struct XrCompositionLayerDepthTestVARJO {
type XrSystemMarkerTrackingPropertiesVARJO (line 4438) | typedef struct XrSystemMarkerTrackingPropertiesVARJO {
type XrEventDataMarkerTrackingUpdateVARJO (line 4444) | typedef struct XrEventDataMarkerTrackingUpdateVARJO {
type XrMarkerSpaceCreateInfoVARJO (line 4453) | typedef struct XrMarkerSpaceCreateInfoVARJO {
type XrMarkerSpaceCreateInfoVARJO (line 4469) | typedef XrResult (XRAPI_PTR *PFN_xrCreateMarkerSpaceVARJO)(XrSession ses...
type XrFlags64 (line 4524) | typedef XrFlags64 XrFrameEndInfoFlagsML;
type XrFrameEndInfoML (line 4531) | typedef struct XrFrameEndInfoML {
type XrFlags64 (line 4542) | typedef XrFlags64 XrGlobalDimmerFrameEndInfoFlagsML;
type XrGlobalDimmerFrameEndInfoML (line 4548) | typedef struct XrGlobalDimmerFrameEndInfoML {
type XrSpatialAnchorPersistenceNameMSFT (line 4561) | typedef struct XrSpatialAnchorPersistenceNameMSFT {
type XrSpatialAnchorPersistenceInfoMSFT (line 4565) | typedef struct XrSpatialAnchorPersistenceInfoMSFT {
type XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT (line 4572) | typedef struct XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT {
type XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT (line 4590) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorFromPersistedNameM...
type XrHandForearmJointULTRALEAP (line 4640) | typedef enum XrHandForearmJointULTRALEAP {
type XrSpaceQueryActionFB (line 4676) | typedef enum XrSpaceQueryActionFB {
type XrSpaceStorageLocationFB (line 4681) | typedef enum XrSpaceStorageLocationFB {
type XrSpaceQueryInfoBaseHeaderFB (line 4687) | typedef struct XR_MAY_ALIAS XrSpaceQueryInfoBaseHeaderFB
type XrSpaceFilterInfoBaseHeaderFB (line 4692) | typedef struct XR_MAY_ALIAS XrSpaceFilterInfoBaseHeaderFB
type XrSpaceQueryInfoFB (line 4697) | typedef struct XrSpaceQueryInfoFB {
type XrSpaceStorageLocationFilterInfoFB (line 4708) | typedef struct XrSpaceStorageLocationFilterInfoFB {
type XrSpaceUuidFilterInfoFB (line 4714) | typedef struct XrSpaceUuidFilterInfoFB {
type XrSpaceComponentFilterInfoFB (line 4721) | typedef struct XrSpaceComponentFilterInfoFB {
type XrSpaceQueryResultFB (line 4727) | typedef struct XrSpaceQueryResultFB {
type XrSpaceQueryResultsFB (line 4732) | typedef struct XrSpaceQueryResultsFB {
type XrEventDataSpaceQueryResultsAvailableFB (line 4740) | typedef struct XrEventDataSpaceQueryResultsAvailableFB {
type XrEventDataSpaceQueryCompleteFB (line 4746) | typedef struct XrEventDataSpaceQueryCompleteFB {
type XrSpaceQueryInfoBaseHeaderFB (line 4753) | typedef XrResult (XRAPI_PTR *PFN_xrQuerySpacesFB)(XrSession session,
type XrSpacePersistenceModeFB (line 4779) | typedef enum XrSpacePersistenceModeFB {
type XrSpaceSaveInfoFB (line 4784) | typedef struct XrSpaceSaveInfoFB {
type XrSpaceEraseInfoFB (line 4792) | typedef struct XrSpaceEraseInfoFB {
type XrEventDataSpaceSaveCompleteFB (line 4799) | typedef struct XrEventDataSpaceSaveCompleteFB {
type XrEventDataSpaceEraseCompleteFB (line 4809) | typedef struct XrEventDataSpaceEraseCompleteFB {
type XrSpaceSaveInfoFB (line 4819) | typedef XrResult (XRAPI_PTR *PFN_xrSaveSpaceFB)(XrSession session, const...
type XrSpaceEraseInfoFB (line 4821) | typedef XrResult (XRAPI_PTR *PFN_xrEraseSpaceFB)(XrSession session, cons...
type XrSpaceShareInfoFB (line 4848) | typedef struct XrSpaceShareInfoFB {
type XrEventDataSpaceShareCompleteFB (line 4857) | typedef struct XrEventDataSpaceShareCompleteFB {
type XrSpaceShareInfoFB (line 4864) | typedef XrResult (XRAPI_PTR *PFN_xrShareSpacesFB)(XrSession session, con...
type XrFlags64 (line 4880) | typedef XrFlags64 XrCompositionLayerSpaceWarpInfoFlagsFB;
type XrCompositionLayerSpaceWarpInfoFB (line 4886) | typedef struct XrCompositionLayerSpaceWarpInfoFB {
type XrSystemSpaceWarpPropertiesFB (line 4900) | typedef struct XrSystemSpaceWarpPropertiesFB {
type XrHapticAmplitudeEnvelopeVibrationFB (line 4914) | typedef struct XrHapticAmplitudeEnvelopeVibrationFB {
type XrFlags64 (line 4926) | typedef XrFlags64 XrSemanticLabelsSupportFlagsFB;
type XrExtent3DfFB (line 4932) | typedef struct XrExtent3DfFB {
type XrOffset3DfFB (line 4938) | typedef struct XrOffset3DfFB {
type XrRect3DfFB (line 4944) | typedef struct XrRect3DfFB {
type XrSemanticLabelsFB (line 4949) | typedef struct XrSemanticLabelsFB {
type XrRoomLayoutFB (line 4957) | typedef struct XrRoomLayoutFB {
type XrBoundary2DFB (line 4967) | typedef struct XrBoundary2DFB {
type XrSemanticLabelsSupportInfoFB (line 4975) | typedef struct XrSemanticLabelsSupportInfoFB {
type XrFlags64 (line 5031) | typedef XrFlags64 XrDigitalLensControlFlagsALMALENCE;
type XrDigitalLensControlALMALENCE (line 5036) | typedef struct XrDigitalLensControlALMALENCE {
type XrDigitalLensControlALMALENCE (line 5042) | typedef XrResult (XRAPI_PTR *PFN_xrSetDigitalLensControlALMALENCE)(XrSes...
type XrEventDataSceneCaptureCompleteFB (line 5057) | typedef struct XrEventDataSceneCaptureCompleteFB {
type XrSceneCaptureRequestInfoFB (line 5064) | typedef struct XrSceneCaptureRequestInfoFB {
type XrSceneCaptureRequestInfoFB (line 5071) | typedef XrResult (XRAPI_PTR *PFN_xrRequestSceneCaptureFB)(XrSession sess...
type XrSpaceContainerFB (line 5088) | typedef struct XrSpaceContainerFB {
type XrFlags64 (line 5113) | typedef XrFlags64 XrFoveationEyeTrackedProfileCreateFlagsMETA;
type XrFlags64 (line 5117) | typedef XrFlags64 XrFoveationEyeTrackedStateFlagsMETA;
type XrFoveationEyeTrackedProfileCreateInfoMETA (line 5123) | typedef struct XrFoveationEyeTrackedProfileCreateInfoMETA {
type XrFoveationEyeTrackedStateMETA (line 5129) | typedef struct XrFoveationEyeTrackedStateMETA {
type XrSystemFoveationEyeTrackedPropertiesMETA (line 5137) | typedef struct XrSystemFoveationEyeTrackedPropertiesMETA {
type XrFaceExpressionFB (line 5163) | typedef enum XrFaceExpressionFB {
type XrFaceExpressionSetFB (line 5231) | typedef enum XrFaceExpressionSetFB {
type XrFaceConfidenceFB (line 5236) | typedef enum XrFaceConfidenceFB {
type XrSystemFaceTrackingPropertiesFB (line 5243) | typedef struct XrSystemFaceTrackingPropertiesFB {
type XrFaceTrackerCreateInfoFB (line 5249) | typedef struct XrFaceTrackerCreateInfoFB {
type XrFaceExpressionInfoFB (line 5255) | typedef struct XrFaceExpressionInfoFB {
type XrFaceExpressionStatusFB (line 5261) | typedef struct XrFaceExpressionStatusFB {
type XrFaceExpressionWeightsFB (line 5266) | typedef struct XrFaceExpressionWeightsFB {
type XrFaceTrackerCreateInfoFB (line 5277) | typedef XrResult (XRAPI_PTR *PFN_xrCreateFaceTrackerFB)(XrSession session,
type XrFaceExpressionInfoFB (line 5281) | typedef XrResult (XRAPI_PTR *PFN_xrGetFaceExpressionWeightsFB)(XrFaceTra...
type XrEyePositionFB (line 5308) | typedef enum XrEyePositionFB {
type XrEyeGazeFB (line 5314) | typedef struct XrEyeGazeFB {
type XrEyeTrackerCreateInfoFB (line 5320) | typedef struct XrEyeTrackerCreateInfoFB {
type XrEyeGazesInfoFB (line 5325) | typedef struct XrEyeGazesInfoFB {
type XrSystemEyeTrackingPropertiesFB (line 5333) | typedef struct XrSystemEyeTrackingPropertiesFB {
type XrEyeGazesFB (line 5339) | typedef struct XrEyeGazesFB {
type XrEyeTrackerCreateInfoFB (line 5346) | typedef XrResult (XRAPI_PTR *PFN_xrCreateEyeTrackerFB)(XrSession session,
type XrEyeGazesInfoFB (line 5350) | typedef XrResult (XRAPI_PTR *PFN_xrGetEyeGazesFB)(XrEyeTrackerFB eyeTrac...
type XrPassthroughKeyboardHandsIntensityFB (line 5375) | typedef struct XrPassthroughKeyboardHandsIntensityFB {
type XrPassthroughKeyboardHandsIntensityFB (line 5382) | typedef XrResult (XRAPI_PTR *PFN_xrPassthroughLayerSetKeyboardHandsInten...
type XrFlags64 (line 5397) | typedef XrFlags64 XrCompositionLayerSettingsFlagsFB;
type XrCompositionLayerSettingsFB (line 5406) | typedef struct XrCompositionLayerSettingsFB {
type XrHapticPcmVibrationFB (line 5424) | typedef struct XrHapticPcmVibrationFB {
type XrDevicePcmSampleRateStateFB (line 5434) | typedef struct XrDevicePcmSampleRateStateFB {
type XrDevicePcmSampleRateStateFB (line 5440) | typedef XrDevicePcmSampleRateStateFB XrDevicePcmSampleRateGetInfoFB;
type XrHapticActionInfo (line 5442) | typedef XrResult (XRAPI_PTR *PFN_xrGetDeviceSampleRateFB)(XrSession sess...
type XrCompareOpFB (line 5460) | typedef enum XrCompareOpFB {
type XrCompositionLayerDepthTestFB (line 5472) | typedef struct XrCompositionLayerDepthTestFB {
type XrLocalDimmingModeMETA (line 5484) | typedef enum XrLocalDimmingModeMETA {
type XrLocalDimmingFrameEndInfoMETA (line 5490) | typedef struct XrLocalDimmingFrameEndInfoMETA {
type XrVirtualKeyboardLocationTypeMETA (line 5503) | typedef enum XrVirtualKeyboardLocationTypeMETA {
type XrVirtualKeyboardInputSourceMETA (line 5510) | typedef enum XrVirtualKeyboardInputSourceMETA {
type XrFlags64 (line 5521) | typedef XrFlags64 XrVirtualKeyboardInputStateFlagsMETA;
type XrSystemVirtualKeyboardPropertiesMETA (line 5527) | typedef struct XrSystemVirtualKeyboardPropertiesMETA {
type XrVirtualKeyboardCreateInfoMETA (line 5533) | typedef struct XrVirtualKeyboardCreateInfoMETA {
type XrVirtualKeyboardSpaceCreateInfoMETA (line 5538) | typedef struct XrVirtualKeyboardSpaceCreateInfoMETA {
type XrVirtualKeyboardLocationInfoMETA (line 5546) | typedef struct XrVirtualKeyboardLocationInfoMETA {
type XrVirtualKeyboardModelVisibilitySetInfoMETA (line 5555) | typedef struct XrVirtualKeyboardModelVisibilitySetInfoMETA {
type XrVirtualKeyboardAnimationStateMETA (line 5561) | typedef struct XrVirtualKeyboardAnimationStateMETA {
type XrVirtualKeyboardModelAnimationStatesMETA (line 5568) | typedef struct XrVirtualKeyboardModelAnimationStatesMETA {
type XrVirtualKeyboardTextureDataMETA (line 5576) | typedef struct XrVirtualKeyboardTextureDataMETA {
type XrVirtualKeyboardInputInfoMETA (line 5586) | typedef struct XrVirtualKeyboardInputInfoMETA {
type XrVirtualKeyboardTextContextChangeInfoMETA (line 5595) | typedef struct XrVirtualKeyboardTextContextChangeInfoMETA {
type XrEventDataVirtualKeyboardCommitTextMETA (line 5601) | typedef struct XrEventDataVirtualKeyboardCommitTextMETA {
type XrEventDataVirtualKeyboardBackspaceMETA (line 5608) | typedef struct XrEventDataVirtualKeyboardBackspaceMETA {
type XrEventDataVirtualKeyboardEnterMETA (line 5614) | typedef struct XrEventDataVirtualKeyboardEnterMETA {
type XrEventDataVirtualKeyboardShownMETA (line 5620) | typedef struct XrEventDataVirtualKeyboardShownMETA {
type XrEventDataVirtualKeyboardHiddenMETA (line 5626) | typedef struct XrEventDataVirtualKeyboardHiddenMETA {
type XrVirtualKeyboardCreateInfoMETA (line 5632) | typedef XrResult (XRAPI_PTR *PFN_xrCreateVirtualKeyboardMETA)(XrSession ...
type XrVirtualKeyboardLocationInfoMETA (line 5640) | typedef XrResult (XRAPI_PTR *PFN_xrSuggestVirtualKeyboardLocationMETA)(
type XrVirtualKeyboardModelVisibilitySetInfoMETA (line 5644) | typedef XrResult (XRAPI_PTR *PFN_xrSetVirtualKeyboardModelVisibilityMETA)(
type XrVirtualKeyboardInputInfoMETA (line 5655) | typedef XrResult (XRAPI_PTR *PFN_xrSendVirtualKeyboardInputMETA)(XrVirtu...
type XrVirtualKeyboardTextContextChangeInfoMETA (line 5658) | typedef XrResult (XRAPI_PTR *PFN_xrChangeVirtualKeyboardTextContextMETA)(
type XrExternalCameraAttachedToDeviceOCULUS (line 5722) | typedef enum XrExternalCameraAttachedToDeviceOCULUS {
type XrFlags64 (line 5729) | typedef XrFlags64 XrExternalCameraStatusFlagsOCULUS;
type XrExternalCameraIntrinsicsOCULUS (line 5738) | typedef struct XrExternalCameraIntrinsicsOCULUS {
type XrExternalCameraExtrinsicsOCULUS (line 5746) | typedef struct XrExternalCameraExtrinsicsOCULUS {
type XrExternalCameraOCULUS (line 5753) | typedef struct XrExternalCameraOCULUS {
type XrPerformanceMetricsCounterUnitMETA (line 5781) | typedef enum XrPerformanceMetricsCounterUnitMETA {
type XrFlags64 (line 5789) | typedef XrFlags64 XrPerformanceMetricsCounterFlagsMETA;
type XrPerformanceMetricsStateMETA (line 5796) | typedef struct XrPerformanceMetricsStateMETA {
type XrPerformanceMetricsCounterMETA (line 5802) | typedef struct XrPerformanceMetricsCounterMETA {
type XrPerformanceMetricsStateMETA (line 5815) | typedef XrResult (XRAPI_PTR *PFN_xrSetPerformanceMetricsStateMETA)(XrSes...
type XrSpaceListSaveInfoFB (line 5850) | typedef struct XrSpaceListSaveInfoFB {
type XrEventDataSpaceListSaveCompleteFB (line 5858) | typedef struct XrEventDataSpaceListSaveCompleteFB {
type XrSpaceListSaveInfoFB (line 5865) | typedef XrResult (XRAPI_PTR *PFN_xrSaveSpaceListFB)(XrSession session,
type XrSpaceUserIdFB (line 5880) | typedef uint64_t XrSpaceUserIdFB;
type XrSpaceUserCreateInfoFB (line 5883) | typedef struct XrSpaceUserCreateInfoFB {
type XrSpaceUserCreateInfoFB (line 5889) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpaceUserFB)(XrSession session,
type XrSystemHeadsetIdPropertiesMETA (line 5916) | typedef struct XrSystemHeadsetIdPropertiesMETA {
type XrPassthroughColorLutChannelsMETA (line 5928) | typedef enum XrPassthroughColorLutChannelsMETA {
type XrPassthroughColorLutDataMETA (line 5933) | typedef struct XrPassthroughColorLutDataMETA {
type XrPassthroughColorLutCreateInfoMETA (line 5938) | typedef struct XrPassthroughColorLutCreateInfoMETA {
type XrPassthroughColorLutUpdateInfoMETA (line 5946) | typedef struct XrPassthroughColorLutUpdateInfoMETA {
type XrPassthroughColorMapLutMETA (line 5953) | typedef struct XrPassthroughColorMapLutMETA {
type XrPassthroughColorMapInterpolatedLutMETA (line 5961) | typedef struct XrPassthroughColorMapInterpolatedLutMETA {
type XrSystemPassthroughColorLutPropertiesMETA (line 5970) | typedef struct XrSystemPassthroughColorLutPropertiesMETA {
type XrPassthroughColorLutCreateInfoMETA (line 5976) | typedef XrResult (XRAPI_PTR *PFN_xrCreatePassthroughColorLutMETA)(XrPass...
type XrPassthroughColorLutUpdateInfoMETA (line 5981) | typedef XrResult (XRAPI_PTR *PFN_xrUpdatePassthroughColorLutMETA)(
type XrTrackingOptimizationSettingsDomainQCOM (line 6015) | typedef enum XrTrackingOptimizationSettingsDomainQCOM {
type XrTrackingOptimizationSettingsHintQCOM (line 6020) | typedef enum XrTrackingOptimizationSettingsHintQCOM {
type XrPassthroughFormHTC (line 6047) | typedef enum XrPassthroughFormHTC {
type XrPassthroughCreateInfoHTC (line 6052) | typedef struct XrPassthroughCreateInfoHTC {
type XrPassthroughColorHTC (line 6058) | typedef struct XrPassthroughColorHTC {
type XrPassthroughMeshTransformInfoHTC (line 6065) | typedef struct XrPassthroughMeshTransformInfoHTC {
type XrCompositionLayerPassthroughHTC (line 6078) | typedef struct XrCompositionLayerPassthroughHTC {
type XrPassthroughCreateInfoHTC (line 6087) | typedef XrResult (XRAPI_PTR *PFN_xrCreatePassthroughHTC)(XrSession session,
type XrFoveationModeHTC (line 6109) | typedef enum XrFoveationModeHTC {
type XrFoveationLevelHTC (line 6117) | typedef enum XrFoveationLevelHTC {
type XrFlags64 (line 6124) | typedef XrFlags64 XrFoveationDynamicFlagsHTC;
type XrFoveationApplyInfoHTC (line 6131) | typedef struct XrFoveationApplyInfoHTC {
type XrFoveationConfigurationHTC (line 6139) | typedef struct XrFoveationConfigurationHTC {
type XrFoveationDynamicModeInfoHTC (line 6146) | typedef struct XrFoveationDynamicModeInfoHTC {
type XrFoveationCustomModeInfoHTC (line 6153) | typedef struct XrFoveationCustomModeInfoHTC {
type XrFoveationApplyInfoHTC (line 6160) | typedef XrResult (XRAPI_PTR *PFN_xrApplyFoveationHTC)(XrSession session,
type XrActiveActionSetPriorityEXT (line 6175) | typedef struct XrActiveActionSetPriorityEXT {
type XrActiveActionSetPrioritiesEXT (line 6181) | typedef struct XrActiveActionSetPrioritiesEXT {
type XrForceFeedbackCurlLocationMNDX (line 6193) | typedef enum XrForceFeedbackCurlLocationMNDX {
type XrSystemForceFeedbackCurlPropertiesMNDX (line 6202) | typedef struct XrSystemForceFeedbackCurlPropertiesMNDX {
type XrForceFeedbackCurlApplyLocationMNDX (line 6208) | typedef struct XrForceFeedbackCurlApplyLocationMNDX {
type XrForceFeedbackCurlApplyLocationsMNDX (line 6213) | typedef struct XrForceFeedbackCurlApplyLocationsMNDX {
type XrForceFeedbackCurlApplyLocationsMNDX (line 6220) | typedef XrResult (XRAPI_PTR *PFN_xrApplyForceFeedbackCurlMNDX)(XrHandTra...
type XrHandTrackingDataSourceEXT (line 6246) | typedef enum XrHandTrackingDataSourceEXT {
type XrHandTrackingDataSourceInfoEXT (line 6252) | typedef struct XrHandTrackingDataSourceInfoEXT {
type XrHandTrackingDataSourceStateEXT (line 6260) | typedef struct XrHandTrackingDataSourceStateEXT {
type XrPlaneDetectorOrientationEXT (line 6273) | typedef enum XrPlaneDetectorOrientationEXT {
type XrPlaneDetectorSemanticTypeEXT (line 6281) | typedef enum XrPlaneDetectorSemanticTypeEXT {
type XrPlaneDetectionStateEXT (line 6290) | typedef enum XrPlaneDetectionStateEXT {
type XrFlags64 (line 6298) | typedef XrFlags64 XrPlaneDetectionCapabilityFlagsEXT;
type XrFlags64 (line 6309) | typedef XrFlags64 XrPlaneDetectorFlagsEXT;
type XrSystemPlaneDetectionPropertiesEXT (line 6315) | typedef struct XrSystemPlaneDetectionPropertiesEXT {
type XrPlaneDetectorCreateInfoEXT (line 6321) | typedef struct XrPlaneDetectorCreateInfoEXT {
type XrExtent3DfEXT (line 6327) | typedef struct XrExtent3DfEXT {
type XrPlaneDetectorBeginInfoEXT (line 6333) | typedef struct XrPlaneDetectorBeginInfoEXT {
type XrPlaneDetectorGetInfoEXT (line 6348) | typedef struct XrPlaneDetectorGetInfoEXT {
type XrPlaneDetectorLocationEXT (line 6355) | typedef struct XrPlaneDetectorLocationEXT {
type XrPlaneDetectorLocationsEXT (line 6367) | typedef struct XrPlaneDetectorLocationsEXT {
type XrPlaneDetectorPolygonBufferEXT (line 6375) | typedef struct XrPlaneDetectorPolygonBufferEXT {
type XrPlaneDetectorCreateInfoEXT (line 6383) | typedef XrResult (XRAPI_PTR *PFN_xrCreatePlaneDetectorEXT)(XrSession ses...
type XrPlaneDetectorBeginInfoEXT (line 6387) | typedef XrResult (XRAPI_PTR *PFN_xrBeginPlaneDetectionEXT)(XrPlaneDetect...
type XrPlaneDetectorGetInfoEXT (line 6391) | typedef XrResult (XRAPI_PTR *PFN_xrGetPlaneDetectionsEXT)(XrPlaneDetecto...
FILE: modules/rayneoSDKHeaders/openxr/openxr_platform.h
type XrAndroidThreadTypeKHR (line 36) | typedef enum XrAndroidThreadTypeKHR {
type XrSwapchainCreateInfo (line 62) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSwapchainAndroidSurfaceKHR)(XrS...
type XrInstanceCreateInfoAndroidKHR (line 84) | typedef struct XrInstanceCreateInfoAndroidKHR {
type XrVulkanSwapchainFormatListCreateInfoKHR (line 98) | typedef struct XrVulkanSwapchainFormatListCreateInfoKHR {
type XrGraphicsBindingOpenGLWin32KHR (line 114) | typedef struct XrGraphicsBindingOpenGLWin32KHR {
type XrGraphicsBindingOpenGLXlibKHR (line 124) | typedef struct XrGraphicsBindingOpenGLXlibKHR {
type XrGraphicsBindingOpenGLXcbKHR (line 137) | typedef struct XrGraphicsBindingOpenGLXcbKHR {
type XrGraphicsBindingOpenGLWaylandKHR (line 151) | typedef struct XrGraphicsBindingOpenGLWaylandKHR {
type XrSwapchainImageOpenGLKHR (line 158) | typedef struct XrSwapchainImageOpenGLKHR {
type XrGraphicsRequirementsOpenGLKHR (line 164) | typedef struct XrGraphicsRequirementsOpenGLKHR {
type XrGraphicsBindingOpenGLESAndroidKHR (line 192) | typedef struct XrGraphicsBindingOpenGLESAndroidKHR {
type XrSwapchainImageOpenGLESKHR (line 201) | typedef struct XrSwapchainImageOpenGLESKHR {
type XrGraphicsRequirementsOpenGLESKHR (line 207) | typedef struct XrGraphicsRequirementsOpenGLESKHR {
type XrGraphicsBindingVulkanKHR (line 234) | typedef struct XrGraphicsBindingVulkanKHR {
type XrSwapchainImageVulkanKHR (line 244) | typedef struct XrSwapchainImageVulkanKHR {
type XrGraphicsRequirementsVulkanKHR (line 250) | typedef struct XrGraphicsRequirementsVulkanKHR {
type XrGraphicsBindingD3D11KHR (line 298) | typedef struct XrGraphicsBindingD3D11KHR {
type XrSwapchainImageD3D11KHR (line 304) | typedef struct XrSwapchainImageD3D11KHR {
type XrGraphicsRequirementsD3D11KHR (line 310) | typedef struct XrGraphicsRequirementsD3D11KHR {
type XrGraphicsBindingD3D12KHR (line 335) | typedef struct XrGraphicsBindingD3D12KHR {
type XrSwapchainImageD3D12KHR (line 342) | typedef struct XrSwapchainImageD3D12KHR {
type XrGraphicsRequirementsD3D12KHR (line 348) | typedef struct XrGraphicsRequirementsD3D12KHR {
type LARGE_INTEGER (line 372) | typedef XrResult (XRAPI_PTR *PFN_xrConvertWin32PerformanceCounterToTimeK...
type timespec (line 395) | struct timespec
type timespec (line 402) | struct timespec
type timespec (line 408) | struct timespec
type XrLoaderInitInfoAndroidKHR (line 418) | typedef struct XrLoaderInitInfoAndroidKHR {
type XrFlags64 (line 432) | typedef XrFlags64 XrVulkanInstanceCreateFlagsKHR;
type XrFlags64 (line 436) | typedef XrFlags64 XrVulkanDeviceCreateFlagsKHR;
type XrVulkanInstanceCreateInfoKHR (line 440) | typedef struct XrVulkanInstanceCreateInfoKHR {
type XrVulkanDeviceCreateInfoKHR (line 450) | typedef struct XrVulkanDeviceCreateInfoKHR {
type XrGraphicsBindingVulkanKHR (line 461) | typedef XrGraphicsBindingVulkanKHR XrGraphicsBindingVulkan2KHR;
type XrVulkanGraphicsDeviceGetInfoKHR (line 463) | typedef struct XrVulkanGraphicsDeviceGetInfoKHR {
type XrSwapchainImageVulkanKHR (line 470) | typedef XrSwapchainImageVulkanKHR XrSwapchainImageVulkan2KHR;
type XrGraphicsRequirementsVulkanKHR (line 472) | typedef XrGraphicsRequirementsVulkanKHR XrGraphicsRequirementsVulkan2KHR;
type XrVulkanInstanceCreateInfoKHR (line 474) | typedef XrResult (XRAPI_PTR *PFN_xrCreateVulkanInstanceKHR)(XrInstance i...
type XrVulkanDeviceCreateInfoKHR (line 475) | typedef XrResult (XRAPI_PTR *PFN_xrCreateVulkanDeviceKHR)(XrInstance ins...
type XrVulkanGraphicsDeviceGetInfoKHR (line 476) | typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsDevice2KHR)(XrInstan...
type XrGraphicsBindingEGLMNDX (line 512) | typedef struct XrGraphicsBindingEGLMNDX {
type XrHolographicWindowAttachmentMSFT (line 553) | typedef struct XrHolographicWindowAttachmentMSFT {
type XrFlags64 (line 568) | typedef XrFlags64 XrAndroidSurfaceSwapchainFlagsFB;
type XrAndroidSurfaceSwapchainCreateInfoFB (line 576) | typedef struct XrAndroidSurfaceSwapchainCreateInfoFB {
type XrCoordinateSpaceCreateInfoML (line 590) | typedef struct XrCoordinateSpaceCreateInfoML {
type XrCoordinateSpaceCreateInfoML (line 597) | typedef XrResult (XRAPI_PTR *PFN_xrCreateSpaceFromCoordinateFrameUIDML)(...
type XrSwapchainImageFoveationVulkanFB (line 637) | typedef struct XrSwapchainImageFoveationVulkanFB {
type XrSwapchainStateAndroidSurfaceDimensionsFB (line 653) | typedef struct XrSwapchainStateAndroidSurfaceDimensionsFB {
type XrSwapchainStateSamplerOpenGLESFB (line 669) | typedef struct XrSwapchainStateSamplerOpenGLESFB {
type XrSwapchainStateSamplerVulkanFB (line 693) | typedef struct XrSwapchainStateSamplerVulkanFB {
type XrVulkanSwapchainCreateInfoMETA (line 718) | typedef struct XrVulkanSwapchainCreateInfoMETA {
FILE: src/buffer.c
function buffer_type (line 7) | buffer_type *create_buffer(int size) {
function free_buffer (line 26) | void free_buffer(buffer_type *buffer) {
function is_full (line 36) | bool is_full(buffer_type *buffer) {
function push (line 40) | float push(buffer_type *buffer, float next_value) {
function imu_buffer_type (line 53) | imu_buffer_type *create_imu_buffer(int buffer_size) {
function free_imu_buffer (line 72) | void free_imu_buffer(imu_buffer_type *gyro_buffer) {
function imu_buffer_size (line 92) | int imu_buffer_size(imu_buffer_type *gyro_buffer) {
function imu_buffer_response_type (line 99) | imu_buffer_response_type *push_to_imu_buffer(imu_buffer_type *gyro_buffe...
FILE: src/config.c
function driver_config_type (line 16) | driver_config_type *default_config() {
function update_config (line 47) | void update_config(driver_config_type *config, driver_config_type *new_c...
function boolean_config (line 53) | void boolean_config(char* key, char *value, bool *config_value) {
function float_config (line 57) | void float_config(char* key, char *value, float *config_value) {
function int_config (line 68) | void int_config(char* key, char *value, int *config_value) {
function string_config (line 79) | void string_config(char* key, char *value, char **config_value) {
function driver_config_type (line 84) | driver_config_type* parse_config_file(FILE *fp) {
FILE: src/connection_pool.c
function ensure_capacity (line 13) | static void ensure_capacity() {
function connection_pool_init (line 23) | void connection_pool_init(pose_handler_t pose_handler_callback, referenc...
function pick_primary_index (line 32) | static int pick_primary_index() {
function pick_supplemental_index (line 39) | static int pick_supplemental_index() {
function connection_t (line 47) | static connection_t* find_hid_connection_locked(uint16_t id_vendor, int1...
function find_driver_connection_index_locked (line 55) | static int find_driver_connection_index_locked(const char* driver_id) {
function connection_t (line 63) | static connection_t* find_driver_connection_locked(const char* driver_id) {
function connection_t (line 68) | static connection_t* primary() {
function connection_t (line 73) | static connection_t* supplemental() {
function connection_pool_start_connection_thread (line 86) | static void connection_pool_start_connection_thread(connection_t* c) {
function connection_pool_is_connected (line 94) | bool connection_pool_is_connected() {
function connection_pool_device_is_sbs_mode (line 102) | bool connection_pool_device_is_sbs_mode() {
function connection_pool_device_set_sbs_mode (line 110) | bool connection_pool_device_set_sbs_mode(bool enabled) {
function connection_pool_disconnect_all (line 118) | void connection_pool_disconnect_all(bool soft) {
function connection_pool_connect_active (line 129) | bool connection_pool_connect_active() {
function connection_pool_block_on_active (line 142) | void connection_pool_block_on_active() {
function device_properties_type (line 171) | device_properties_type* connection_pool_primary_device() {
function device_properties_type (line 179) | device_properties_type* connection_pool_supplemental_device() {
function device_driver_type (line 187) | const device_driver_type* connection_pool_primary_driver() {
function connection_pool_handle_device_added (line 197) | void connection_pool_handle_device_added(const device_driver_type* drive...
function connection_pool_handle_device_removed (line 251) | void connection_pool_handle_device_removed(const char* driver_id) {
function connection_pool_ingest_pose (line 307) | void connection_pool_ingest_pose(const char* driver_id, imu_pose_type po...
function connection_t (line 351) | connection_t* connection_pool_find_hid_connection(uint16_t id_vendor, in...
function connection_t (line 359) | connection_t* connection_pool_find_driver_connection(const char* driver_...
FILE: src/curl.c
function curl_init (line 7) | void curl_init() {
function curl_cleanup (line 16) | void curl_cleanup() {
FILE: src/devices.c
function connected_device_type (line 33) | static connected_device_type* _find_connected_device(libusb_device *usb_...
function hotplug_callback (line 54) | int hotplug_callback(libusb_context *ctx, libusb_device *usb_device, lib...
function init_devices (line 82) | void init_devices() {
function handle_device_connection_events (line 98) | void handle_device_connection_events() {
function deinit_devices (line 103) | void deinit_devices() {
function connected_device_type (line 108) | connected_device_type* find_connected_device() {
function device_equal (line 138) | bool device_equal(device_properties_type* device, device_properties_type...
FILE: src/devices/rayneo.c
function rayneo_imu_callback (line 75) | void rayneo_imu_callback(const float acc[3], const float gyro[3], const ...
function rayneo_mcu_callback (line 102) | static void rayneo_mcu_callback(uint32_t state, uint64_t timestamp, size...
function rayneo_device_connect (line 144) | bool rayneo_device_connect() {
function rayneo_device_disconnect (line 172) | void rayneo_device_disconnect(bool soft, bool is_device_present) {
function device_properties_type (line 193) | device_properties_type* rayneo_supported_device(uint16_t vendor_id, uint...
function rayneo_block_on_device (line 223) | void rayneo_block_on_device() {
function rayneo_device_is_sbs_mode (line 235) | bool rayneo_device_is_sbs_mode() {
function rayneo_device_set_sbs_mode (line 239) | bool rayneo_device_set_sbs_mode(bool enabled) {
function rayneo_is_connected (line 250) | bool rayneo_is_connected() {
function rayneo_disconnect (line 254) | void rayneo_disconnect(bool soft) {
FILE: src/devices/rokid.c
function cleanup (line 75) | static void cleanup() {
function rokid_disconnect (line 93) | void rokid_disconnect(bool soft) {
function handle_display_mode (line 98) | static void handle_display_mode(device_properties_type* device, int disp...
function device_connect (line 109) | static bool device_connect(device_properties_type* device) {
function rokid_device_connect (line 143) | bool rokid_device_connect() {
function device_properties_type (line 151) | device_properties_type* rokid_supported_device(uint16_t vendor_id, uint1...
function rokid_block_on_device (line 188) | void rokid_block_on_device() {
function rokid_device_is_sbs_mode (line 225) | bool rokid_device_is_sbs_mode() {
function rokid_device_set_sbs_mode (line 229) | bool rokid_device_set_sbs_mode(bool enabled) {
function rokid_is_connected (line 236) | bool rokid_is_connected() {
FILE: src/devices/viture.c
function viture_display_mode_is_sbs (line 245) | static bool viture_display_mode_is_sbs(int mode) {
function viture_refresh_sbs_state_locked (line 257) | static void viture_refresh_sbs_state_locked() {
function viture_capture_and_override_display_mode_locked (line 269) | static void viture_capture_and_override_display_mode_locked() {
function viture_restore_display_mode_locked (line 303) | static void viture_restore_display_mode_locked() {
function viture_publish_pose (line 341) | static void viture_publish_pose(imu_quat_type orientation, bool has_posi...
function viture_legacy_pose_callback (line 356) | static void viture_legacy_pose_callback(float* pose, uint64_t ts) {
function viture_carina_imu_callback (line 366) | static void viture_carina_imu_callback(float* imu, double timestamp) {
function viture_state_callback (line 414) | static void viture_state_callback(int glass_state_id, int glass_value) {
function viture_register_state_callback_locked (line 427) | static void viture_register_state_callback_locked() {
function viture_unregister_state_callback_locked (line 441) | static void viture_unregister_state_callback_locked() {
function device_properties_type (line 451) | static device_properties_type* viture_supported_device(uint16_t vendor_i...
function viture_initialize_provider_locked (line 483) | static bool viture_initialize_provider_locked(uint16_t product_id) {
function viture_open_imu_locked (line 538) | static bool viture_open_imu_locked() {
function viture_start_stream_locked (line 555) | static bool viture_start_stream_locked() {
function viture_stop_stream_locked (line 582) | static void viture_stop_stream_locked() {
function viture_shutdown_provider_locked (line 607) | static void viture_shutdown_provider_locked() {
function viture_update_device_properties (line 625) | static void viture_update_device_properties(device_properties_type* devi...
function disconnect (line 645) | static void disconnect(bool soft) {
function viture_device_connect (line 655) | static bool viture_device_connect() {
function viture_block_on_device (line 696) | static void viture_block_on_device() {
function viture_device_is_sbs_mode (line 708) | static bool viture_device_is_sbs_mode() {
function viture_device_set_sbs_mode (line 719) | static bool viture_device_set_sbs_mode(bool enabled) {
function viture_is_connected (line 737) | static bool viture_is_connected() {
function viture_disconnect (line 741) | static void viture_disconnect(bool soft) {
FILE: src/devices/xreal.c
function handle_xreal_event (line 160) | void handle_xreal_event(uint64_t timestamp,
function handle_xreal_controller_event (line 181) | void handle_xreal_controller_event(
function xreal_device_connect (line 192) | bool xreal_device_connect() {
function device_properties_type (line 227) | device_properties_type* xreal_supported_device(uint16_t vendor_id, uint1...
function xreal_block_on_device (line 299) | void xreal_block_on_device() {
function get_display_mode_index (line 329) | int get_display_mode_index(int display_mode, const int* display_modes) {
function xreal_device_is_sbs_mode (line 339) | bool xreal_device_is_sbs_mode() {
function xreal_device_set_sbs_mode (line 349) | bool xreal_device_set_sbs_mode(bool enable) {
function xreal_is_connected (line 375) | bool xreal_is_connected() {
function xreal_disconnect (line 379) | void xreal_disconnect(bool soft) {
FILE: src/driver.c
function is_driver_connected (line 64) | static bool is_driver_connected() {
function reset_calibration (line 68) | void reset_calibration(bool reset_device) {
function driver_reference_pose (line 82) | bool driver_reference_pose(imu_pose_type* out_pose, bool* pose_updated) {
function driver_handle_pose (line 93) | void driver_handle_pose(imu_pose_type pose) {
function driver_disabled (line 223) | bool driver_disabled() {
function setup_ipc (line 227) | void setup_ipc() {
function evaluate_block_on_device_ready (line 270) | void evaluate_block_on_device_ready() {
function update_config_from_file (line 335) | void update_config_from_file(FILE *fp) {
type timeval (line 432) | struct timeval
type inotify_event (line 452) | struct inotify_event
type inotify_event (line 452) | struct inotify_event
function handle_control_flags_update (line 505) | void handle_control_flags_update() {
type inotify_event (line 572) | struct inotify_event
type inotify_event (line 572) | struct inotify_event
function handle_device_connection_changed (line 595) | void handle_device_connection_changed(bool is_added, connected_device_ty...
function segfault_handler (line 647) | void segfault_handler(int sig) {
function main (line 656) | int main(int argc, const char** argv) {
FILE: src/epoch.c
type timespec (line 5) | struct timespec
function get_epoch_time_ms (line 6) | uint64_t get_epoch_time_ms() {
FILE: src/features/breezy_desktop.c
function reset_productivity_features (line 13) | void reset_productivity_features() {
function is_productivity_basic_granted (line 19) | bool is_productivity_basic_granted() {
function is_productivity_pro_granted (line 31) | bool is_productivity_pro_granted() {
function is_productivity_granted (line 43) | bool is_productivity_granted() {
FILE: src/features/sbs.c
function reset_sbs_features (line 10) | void reset_sbs_features() {
function is_sbs_granted (line 14) | bool is_sbs_granted() {
FILE: src/features/smooth_follow.c
function reset_smooth_follow_features (line 10) | void reset_smooth_follow_features() {
function is_smooth_follow_granted (line 14) | bool is_smooth_follow_granted() {
FILE: src/files.c
function FILE (line 23) | FILE* get_or_create_file(const char *full_path, mode_t directory_mode, c...
type stat (line 91) | struct stat
function FILE (line 123) | FILE* get_or_create_state_file(const char *filename, const char *mode, c...
function FILE (line 128) | FILE* get_or_create_runtime_file(const char *filename, const char *mode,...
function FILE (line 133) | FILE* get_or_create_config_file(const char *filename, const char *mode, ...
FILE: src/imu.c
function degree_to_radian (line 16) | float degree_to_radian(float deg) {
function radian_to_degree (line 20) | float radian_to_degree(float rad) {
function imu_quat_type (line 24) | imu_quat_type normalize_quaternion(imu_quat_type q) {
function imu_quat_type (line 38) | imu_quat_type conjugate(imu_quat_type q) {
function imu_quat_type (line 49) | imu_quat_type multiply_quaternions(imu_quat_type q1, imu_quat_type q2) {
function imu_quat_type (line 60) | imu_quat_type euler_to_quaternion_xyz(imu_euler_type euler) {
function imu_quat_type (line 85) | imu_quat_type euler_to_quaternion_zyx(imu_euler_type euler) {
function imu_quat_type (line 110) | imu_quat_type euler_to_quaternion_zxy(imu_euler_type euler) {
function imu_euler_type (line 135) | imu_euler_type quaternion_to_euler_xyz(imu_quat_type q) {
function imu_euler_type (line 160) | imu_euler_type quaternion_to_euler_zyx(imu_quat_type q) {
function imu_euler_type (line 196) | imu_euler_type quaternion_to_euler_zxy(imu_quat_type q) {
function imu_quat_type (line 221) | imu_quat_type device_pitch_adjustment(float adjustment_degrees) {
function quat_equal (line 232) | bool quat_equal(imu_quat_type q1, imu_quat_type q2) {
function imu_vec3_type (line 236) | imu_vec3_type vector_rotate(imu_vec3_type v, imu_quat_type q) {
function quat_small_angle_rad (line 254) | float quat_small_angle_rad(imu_quat_type q1, imu_quat_type q2) {
FILE: src/ipc.c
function setup_ipc_values (line 31) | bool setup_ipc_values(ipc_values_type *ipc_values, bool debug) {
function setup_ipc_value (line 70) | void setup_ipc_value(const char *name, void **shmemValue, size_t size, b...
function cleanup_ipc (line 112) | void cleanup_ipc(char* file_prefix, bool debug) {
FILE: src/logging.c
function log_init (line 14) | void log_init() {
function do_log (line 31) | static void do_log(const char* prefix, const char* format, va_list args) {
function log_message (line 42) | void log_message(const char* format, ...) {
function log_error (line 49) | void log_error(const char* format, ...) {
function log_debug (line 56) | void log_debug(const char* format, ...) {
FILE: src/multitap.c
function init_multi_tap (line 35) | void init_multi_tap(int init_imu_cycles_per_s) {
function detect_multi_tap (line 51) | int detect_multi_tap(imu_euler_type velocities, uint32_t timestamp, bool...
FILE: src/outputs.c
type libevdev (line 42) | struct libevdev
type libevdev_uinput (line 43) | struct libevdev_uinput
function clampf (line 55) | static float clampf(float v, float lo, float hi) {
function imu_quat_type (line 61) | static imu_quat_type quat_slerp(imu_quat_type a, imu_quat_type b, float ...
function dead_zone_exponential_curve (line 122) | static float dead_zone_exponential_curve(float ratio01) {
function dead_zone_slerp_alpha (line 133) | static float dead_zone_slerp_alpha(float angle_rad, float threshold_rad,...
function dead_zone_min_visible_angle_rad (line 146) | static float dead_zone_min_visible_angle_rad(const device_properties_typ...
function inverse_angle_for_change (line 165) | static float inverse_angle_for_change(float desired_change_rad, float th...
function evdev_check (line 200) | static int evdev_check(char * function, int i) {
function joystick_value (line 211) | int joystick_value(float input_velocity, float max_input_velocity) {
function joystick_debug_val_to_line (line 226) | int joystick_debug_val_to_line(int value) {
function write_character_to_joystick_debug_file (line 236) | void write_character_to_joystick_debug_file(FILE *fp, int col, int row, ...
function joystick_debug (line 260) | void joystick_debug(int old_joystick_x, int old_joystick_y, int new_joys...
function degree_delta (line 303) | float degree_delta(float prev, float next) {
function imu_euler_type (line 314) | imu_euler_type get_euler_velocities(imu_euler_type* previous, imu_euler_...
function _init_outputs (line 326) | static void _init_outputs() {
function _deinit_outputs (line 382) | static void _deinit_outputs() {
function init_outputs (line 396) | void init_outputs() {
function deinit_outputs (line 402) | void deinit_outputs() {
function reinit_outputs (line 408) | void reinit_outputs() {
function wait_for_imu_start (line 416) | bool wait_for_imu_start() {
function handle_imu_update (line 426) | void handle_imu_update(imu_pose_type pose, imu_euler_type velocities, bo...
function reset_pose_data (line 634) | void reset_pose_data(ipc_values_type *ipc_values) {
function is_imu_alive (line 645) | bool is_imu_alive() {
FILE: src/plugins.c
function all_plugins_start_func (line 34) | void all_plugins_start_func() {
function all_plugins_handle_config_line_func (line 49) | void all_plugins_handle_config_line_func(void* config, char* key, char* ...
function all_plugins_handle_control_flag_line_func (line 56) | void all_plugins_handle_control_flag_line_func(char* key, char* value) {
function all_plugins_set_config_func (line 62) | void all_plugins_set_config_func(void* config) {
function all_plugins_setup_ipc_func (line 69) | bool all_plugins_setup_ipc_func() {
function all_plugins_handle_ipc_change_func (line 80) | void all_plugins_handle_ipc_change_func() {
function all_plugins_modify_reference_pose_func (line 86) | bool all_plugins_modify_reference_pose_func(imu_pose_type pose, imu_pose...
function all_plugins_handle_reference_pose_updated_func (line 95) | void all_plugins_handle_reference_pose_updated_func(imu_pose_type old_re...
function all_plugins_modify_pose_func (line 102) | void all_plugins_modify_pose_func(imu_pose_type* pose) {
function all_plugins_handle_pose_data_func (line 108) | void all_plugins_handle_pose_data_func(imu_pose_type pose, imu_euler_typ...
function all_plugins_reset_pose_data_func (line 115) | void all_plugins_reset_pose_data_func() {
function all_plugins_handle_state_func (line 121) | void all_plugins_handle_state_func() {
function all_plugins_handle_device_connect_func (line 127) | void all_plugins_handle_device_connect_func() {
function all_plugins_handle_device_disconnect_func (line 133) | void all_plugins_handle_device_disconnect_func() {
FILE: src/plugins/breezy_desktop.c
function breezy_desktop_reset_config (line 51) | void breezy_desktop_reset_config(breezy_desktop_config *config) {
function breezy_desktop_handle_config_line_func (line 67) | void breezy_desktop_handle_config_line_func(void* config, char* key, cha...
function fd_is_valid (line 109) | static int fd_is_valid(int fd) {
function init_shared_mem_file_path (line 114) | static void init_shared_mem_file_path() {
function full_write (line 123) | static int full_write(int wfd, const void* buf, size_t len) {
function off_t (line 136) | static off_t expected_file_size() { return (off_t)(CONFIG_DATA_END_OFFSE...
function create_or_open_shared_mem_file (line 137) | static int create_or_open_shared_mem_file() {
function get_shared_mem_fd (line 163) | static int get_shared_mem_fd() {
function do_write_config_data (line 172) | void do_write_config_data(int target_fd) {
function write_config_data (line 227) | void write_config_data() {
function breezy_desktop_write_pose_data (line 236) | void breezy_desktop_write_pose_data(float *orientation, float *position) {
function breezy_desktop_reset_pose_data_func (line 266) | void breezy_desktop_reset_pose_data_func() {
function breezy_desktop_set_config_func (line 272) | void breezy_desktop_set_config_func(void* new_config) {
function breezy_desktop_handle_pose_data_func (line 288) | void breezy_desktop_handle_pose_data_func(imu_pose_type pose, imu_euler_...
function breezy_desktop_start_func (line 299) | void breezy_desktop_start_func() {
function breezy_desktop_device_connect_func (line 303) | void breezy_desktop_device_connect_func() {
FILE: src/plugins/custom_banner.c
function evaluate_banner_conditions (line 16) | void evaluate_banner_conditions() {
function custom_banner_setup_ipc_func (line 50) | bool custom_banner_setup_ipc_func() {
function custom_banner_handle_device_connect_func (line 60) | void custom_banner_handle_device_connect_func() {
function custom_banner_reset_pose_data_func (line 64) | void custom_banner_reset_pose_data_func() {
FILE: src/plugins/device_license.c
function all_features_in_license (line 35) | bool all_features_in_license(char** requested_features, int requested_co...
function is_valid_license_signature (line 75) | bool is_valid_license_signature(const char* license, const char* signatu...
function get_license_features (line 142) | bool get_license_features(FILE* file, char*** granted_features, int* gra...
function refresh_license (line 249) | void refresh_license(bool force, char** requested_features, int requeste...
function device_license_start_func (line 393) | void device_license_start_func() {
function device_license_handle_control_flag_line_func (line 397) | void device_license_handle_control_flag_line_func(char* key, char* value) {
function device_license_handle_device_connect_func (line 414) | void device_license_handle_device_connect_func() {
FILE: src/plugins/gamescope_reshade_wayland.c
type wl_proxy (line 24) | struct wl_proxy
type wl_proxy (line 24) | struct wl_proxy
type wl_interface (line 24) | struct wl_interface
type wl_display (line 32) | struct wl_display
type wl_registry (line 33) | struct wl_registry
type gamescope_reshade (line 34) | struct gamescope_reshade
function gamescope_reshade_wayland_handle_config_line_func (line 47) | void gamescope_reshade_wayland_handle_config_line_func(void* config, cha...
function gamescope_reshade_wayland_set_config_func (line 55) | void gamescope_reshade_wayland_set_config_func(void* config) {
function sombrero_file_exists (line 76) | static bool sombrero_file_exists() {
function gamescope_reshade_wl_handle_global (line 80) | static void gamescope_reshade_wl_handle_global(void *data, struct wl_reg...
function is_gamescope_reshade_ipc_connected (line 89) | bool is_gamescope_reshade_ipc_connected() {
function do_wl_server_disconnect (line 93) | static void do_wl_server_disconnect() {
function do_wl_server_connect (line 112) | static bool do_wl_server_connect() {
function gamescope_reshade_wl_setup_ipc (line 174) | static bool gamescope_reshade_wl_setup_ipc() {
function do_wl_enable_gamescope_effect (line 184) | static bool do_wl_enable_gamescope_effect() {
function do_wl_disable_gamescope_effect (line 193) | static bool do_wl_disable_gamescope_effect() {
function do_trigger_plugins_ipc_change (line 206) | static void do_trigger_plugins_ipc_change() {
function do_wl_cleanup (line 221) | static void do_wl_cleanup() {
function wayland_cleanup (line 234) | static void wayland_cleanup() {
function do_wl_set_uniform_variable (line 242) | static bool do_wl_set_uniform_variable(const char *variable_name, const ...
function _effect_ready_callback (line 277) | static void _effect_ready_callback(void *data,
function do_wl_add_gamescope_effect_ready_listener (line 287) | static bool do_wl_add_gamescope_effect_ready_listener(gamescope_reshade_...
function _gamescope_reshade_effect_ready (line 300) | static void _gamescope_reshade_effect_ready() {
function set_gamescope_reshade_effect_uniform_variable (line 304) | void set_gamescope_reshade_effect_uniform_variable(const char *variable_...
function set_skippable_gamescope_reshade_effect_uniform_variable (line 316) | void set_skippable_gamescope_reshade_effect_uniform_variable(const char ...
function gamescope_reshade_wl_handle_state_func (line 328) | void gamescope_reshade_wl_handle_state_func() {
function gamescope_reshade_wl_handle_pose_data_func (line 349) | void gamescope_reshade_wl_handle_pose_data_func(imu_pose_type pose, imu_...
function gamescope_reshade_wl_reset_pose_data_func (line 362) | void gamescope_reshade_wl_reset_pose_data_func() {
FILE: src/plugins/metrics.c
function log_metric (line 17) | void log_metric(char *event_name) {
type metrics_output_mode (line 53) | enum metrics_output_mode {
type metrics_output_mode (line 73) | enum metrics_output_mode
function metrics_handle_config_line_func (line 84) | void metrics_handle_config_line_func(void* config, char* key, char* valu...
function metrics_set_config_func (line 100) | void metrics_set_config_func(void* config) {
function metrics_handle_state_func (line 140) | void metrics_handle_state_func() {
function metrics_handle_device_connect_func (line 147) | void metrics_handle_device_connect_func() {
FILE: src/plugins/neck_saver.c
function neck_saver_handle_config_line_func (line 21) | static void neck_saver_handle_config_line_func(void *config, char *key, ...
function neck_saver_set_config_func (line 30) | static void neck_saver_set_config_func(void *config) {
function neck_saver_modify_pose_func (line 48) | static void neck_saver_modify_pose_func(imu_pose_type* pose) {
FILE: src/plugins/opentrack_listener.c
type sockaddr_storage (line 40) | struct sockaddr_storage
function listener_device_disconnect (line 55) | static void listener_device_disconnect() {
function is_localhostish_ip (line 73) | static bool is_localhostish_ip(const char *ip_raw) {
function update_feedback_guard (line 123) | static void update_feedback_guard() {
function device_properties_type (line 137) | static device_properties_type *make_opentrack_device_properties() {
function opentrack_close_socket (line 165) | static void opentrack_close_socket() {
function opentrack_bind_socket (line 173) | static bool opentrack_bind_socket(const char *ip, int port) {
function device_properties_type (line 243) | static device_properties_type *opentrack_supported_device(uint16_t id_ve...
function opentrack_device_connect (line 249) | static bool opentrack_device_connect() {
function opentrack_block_on_device (line 254) | static void opentrack_block_on_device() {
function opentrack_device_is_sbs_mode (line 266) | static bool opentrack_device_is_sbs_mode() { return false; }
function opentrack_device_set_sbs_mode (line 267) | static bool opentrack_device_set_sbs_mode(bool enabled) { (void)enabled;...
function opentrack_is_connected (line 268) | static bool opentrack_is_connected() { return connected; }
function opentrack_disconnect (line 269) | static void opentrack_disconnect(bool soft) {
function opentrack_handle_config_line_func (line 301) | static void opentrack_handle_config_line_func(void *config, char *key, c...
type timeval (line 321) | struct timeval
type timeval (line 330) | struct timeval
type timeval (line 378) | struct timeval
function opentrack_start_func (line 410) | static void opentrack_start_func() {
function opentrack_set_config_func (line 442) | static void opentrack_set_config_func(void *new_config) {
function opentrack_handle_device_disconnect_func (line 460) | static void opentrack_handle_device_disconnect_func() {
FILE: src/plugins/opentrack_source.c
type sockaddr_storage (line 23) | struct sockaddr_storage
function opentrack_close_socket (line 27) | static void opentrack_close_socket() {
function opentrack_open_socket (line 35) | static bool opentrack_open_socket(const char *ip, int port) {
function opentrack_handle_config_line_func (line 99) | static void opentrack_handle_config_line_func(void *config, char *key, c...
function opentrack_set_config_func (line 112) | static void opentrack_set_config_func(void *new_config) {
function opentrack_handle_device_disconnect_func (line 148) | static void opentrack_handle_device_disconnect_func() {
function opentrack_handle_pose_data_func (line 153) | static void opentrack_handle_pose_data_func(imu_pose_type pose, imu_eule...
function opentrack_reset_pose_data_func (line 190) | static void opentrack_reset_pose_data_func() {
FILE: src/plugins/sideview.c
function sideview_handle_config_line_func (line 33) | void sideview_handle_config_line_func(void* config, char* key, char* val...
function sideview_handle_device_disconnect_func (line 47) | void sideview_handle_device_disconnect_func() {
function set_sideview_ipc_values_from_config (line 53) | void set_sideview_ipc_values_from_config() {
function sideview_set_config_func (line 71) | void sideview_set_config_func(void* config) {
function sideview_setup_ipc_func (line 92) | bool sideview_setup_ipc_func() {
FILE: src/plugins/smooth_follow.c
type follow_state_type (line 20) | typedef enum {
function get_time_ms (line 57) | uint32_t get_time_ms() {
function smooth_follow_handle_config_line_func (line 86) | void smooth_follow_handle_config_line_func(void* config, char* key, char...
function update_smooth_follow_params (line 124) | static void update_smooth_follow_params() {
function smooth_follow_set_config_func (line 187) | void smooth_follow_set_config_func(void* config) {
function follow_state_type (line 213) | follow_state_type next_state_for_angle(float angle_degrees) {
function percent_adjust (line 243) | float percent_adjust(float multiplier, float percent, bool inverse) {
function imu_quat_type (line 253) | imu_quat_type slerp(imu_quat_type from, imu_quat_type to, float a) {
function smooth_follow_modify_reference_pose_func (line 340) | bool smooth_follow_modify_reference_pose_func(imu_pose_type pose, imu_po...
function smooth_follow_handle_control_flag_line_func (line 453) | void smooth_follow_handle_control_flag_line_func(char* key, char* value) {
function smooth_follow_handle_state_func (line 477) | static void smooth_follow_handle_state_func() {
function handle_device_disconnect (line 483) | static void handle_device_disconnect() {
function smooth_follow_handle_reference_pose_updated_func (line 494) | static void smooth_follow_handle_reference_pose_updated_func(imu_pose_ty...
FILE: src/plugins/virtual_display.c
function virtual_display_reset_config (line 27) | void virtual_display_reset_config(virtual_display_config *config) {
function virtual_display_handle_config_line_func (line 46) | void virtual_display_handle_config_line_func(void* config, char* key, ch...
function virtual_display_handle_device_disconnect_func (line 69) | void virtual_display_handle_device_disconnect_func() {
function set_virtual_display_ipc_values (line 75) | void set_virtual_display_ipc_values() {
function virtual_display_set_config_func (line 180) | void virtual_display_set_config_func(void* config) {
function virtual_display_setup_ipc_func (line 233) | bool virtual_display_setup_ipc_func() {
function virtual_display_handle_state_func (line 259) | void virtual_display_handle_state_func() {
FILE: src/runtime_context.c
function _check_and_set_queued_device (line 15) | static bool _check_and_set_queued_device() {
function set_device_and_checkout (line 26) | void set_device_and_checkout(device_properties_type* device) {
function device_properties_type (line 40) | device_properties_type* device_checkout() {
function device_checkin (line 53) | void device_checkin(device_properties_type* device) {
function device_present (line 75) | bool device_present() {
function set_on_device_change_callback (line 79) | void set_on_device_change_callback(on_device_change_callback callback) {
FILE: src/state.c
function FILE (line 35) | FILE* get_driver_state_file(const char *filename, char *mode, char **ful...
function write_state (line 43) | void write_state(driver_state_type *state) {
function read_control_flags (line 72) | void read_control_flags(FILE *fp, control_flags_type *flags) {
function update_state_from_device (line 108) | void update_state_from_device(driver_state_type *state, device_propertie...
FILE: src/strings.c
function equal (line 6) | bool equal(const char *a, const char *b) {
function list_string_contains (line 10) | bool list_string_contains(const char* str, const char* list_string) {
function in_array (line 32) | bool in_array(const char *str, const char **array, int size) {
function compare_strings (line 52) | int compare_strings(const void* a, const void* b) {
function parse_comma_separated_string (line 84) | int parse_comma_separated_string(const char* str, char*** result) {
FILE: src/system.c
function get_mac_address_hash (line 20) | bool get_mac_address_hash(char **mac_address_hash, const char *interface) {
type ifaddrs (line 84) | struct ifaddrs
FILE: src/wl_client/gamescope_reshade.c
type wl_interface (line 42) | struct wl_interface
type wl_message (line 47) | struct wl_message
type wl_message (line 55) | struct wl_message
Condensed preview — 187 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,158K chars).
[
{
"path": ".fpm",
"chars": 522,
"preview": "--name xr-driver \n--description \"Linux service for interacting with XR devices\"\n--iteration 1\n--url https://github.com/w"
},
{
"path": ".github/FUNDING.yml",
"chars": 702,
"preview": "# These are supported funding model platforms\n\ngithub: wheaney\npatreon: # Replace with a single Patreon username\nopen_co"
},
{
"path": ".github/workflows/release.yml",
"chars": 5673,
"preview": "name: Release\n\non:\n workflow_dispatch:\n inputs:\n force_release:\n description: 'Run release even if versi"
},
{
"path": ".gitignore",
"chars": 196,
"preview": ".idea/\n.cache/\n\ncmake-build-debug/\ncmake-build-release/\n\nbuild/\nout/\n\nxrDriver\n\n/include/custom_banner_config.h\n/custom_"
},
{
"path": ".gitmodules",
"chars": 140,
"preview": "[submodule \"modules/xrealInterfaceLibrary\"]\n\tpath = modules/xrealInterfaceLibrary\n\turl = https://gitlab.com/wheaney/nrea"
},
{
"path": ".readthedocs.yaml",
"chars": 439,
"preview": "# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\n# Requir"
},
{
"path": ".vscode/tasks.json",
"chars": 334,
"preview": "{\n\t\"version\": \"2.0.0\",\n\t\"tasks\": [\n\t\t{\n\t\t\t\"label\": \"build XRLinuxDriver (cmake)\",\n\t\t\t\"type\": \"shell\",\n\t\t\t\"command\": \"bas"
},
{
"path": "CMakeLists.txt",
"chars": 8319,
"preview": "cmake_minimum_required(VERSION 3.16)\nproject(xrDriver VERSION 2.9.4 LANGUAGES C)\n\n# Emit compile_commands.json for IDEs "
},
{
"path": "LICENSE",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 7921,
"preview": "# XR Linux Driver\n\n[](https://ko-fi.com/U7U8OVC0L)\n\n[\n\nsource bin/in"
},
{
"path": "bin/package_libs",
"chars": 838,
"preview": "#!/usr/bin/env bash\n\n# exit when any command fails\nset -e\n\n# Package libraries for both architectures\nARCHITECTURES=(\"x8"
},
{
"path": "bin/setup",
"chars": 6471,
"preview": "#!/usr/bin/env bash\n\nset -e\n\n# This script gets packaged with the release and should do the bulk of the setup work. This"
},
{
"path": "bin/ua.sh",
"chars": 662,
"preview": "MEASUREMENT_ID=\"G-Z94MXP18T6\"\n\n# if UA_EVENT_VERSION is set, copy its value and replace any dots in the value with under"
},
{
"path": "bin/user/install",
"chars": 3582,
"preview": "#!/usr/bin/env bash\n\nset -e\n\n# this part of the setup should be run as the user, not root\nif [ \"$(id -u)\" == \"0\" ]; then"
},
{
"path": "bin/user/systemd_start",
"chars": 733,
"preview": "#!/usr/bin/env bash\n\nset -e\n\n# this part of the setup should be run as the user, not root\nif [ \"$(id -u)\" == \"0\" ]; then"
},
{
"path": "bin/xr_driver_cli",
"chars": 18510,
"preview": "#!/usr/bin/env bash\n\nif ! systemctl --user --quiet is-active xr-driver >/dev/null 2>&1; then\n if [ -z \"$IGNORE_SYSTEM"
},
{
"path": "bin/xr_driver_logs",
"chars": 2668,
"preview": "#!/usr/bin/env bash\n\n# exit when any command fails\nset -e\n\nif [ \"$(id -u)\" == \"0\" ]; then\n echo \"This script must not "
},
{
"path": "bin/xr_driver_ot_profile_setup",
"chars": 1396,
"preview": "#!/usr/bin/env bash\n\nset -euo pipefail\n\ndefault_ini=\"\"\n\n# Pick the newest ~/.config/opentrack-*/default.ini.\nshopt -s nu"
},
{
"path": "bin/xr_driver_setup",
"chars": 3211,
"preview": "#!/usr/bin/env bash\n\n# This setup script should do the minimum work required to download the release package, unzip it, "
},
{
"path": "bin/xr_driver_uninstall",
"chars": 2686,
"preview": "#!/usr/bin/env bash\n\nfor_install=0\nif [[ -n \"$1\" ]] && [[ \"$1\" == \"--for-install\" ]]; then\n for_install=1\nfi\n\n# we do"
},
{
"path": "bin/xr_driver_verify",
"chars": 1204,
"preview": "#!/usr/bin/env bash\n\nset -e\n\nUSER=${SUDO_USER:-$USER}\nUSER_HOME=$(getent passwd $USER | cut -d: -f6)\n\nif [ -z \"$XDG_DATA"
},
{
"path": "docker-build/Dockerfile",
"chars": 809,
"preview": "# To run the build from the package root:\n# docker buildx build --platform linux/amd64,linux/arm64 -f ./docker-build/"
},
{
"path": "docker-build/Dockerfile.aarch64",
"chars": 1219,
"preview": "# To run the build from the package root:\n# docker buildx build --platform linux/amd64,linux/arm64 -f ./docker-build/"
},
{
"path": "docker-build/init.sh",
"chars": 962,
"preview": "#!/bin/bash\n\n# might be needed on a fresh docker setup:\n# install qemu and qemu-user-static packages\n# sudo docker c"
},
{
"path": "docker-build/run-build.sh",
"chars": 701,
"preview": "#!/bin/bash\n\nset -e\n\nUSER=${SUDO_USER:-$USER}\nGROUP=$(id -gn $USER)\n\n# Run containers for each architecture\nif [[ \"$1\" ="
},
{
"path": "docker-build/run-fpm.sh",
"chars": 2983,
"preview": "#!/usr/bin/env bash\n\nset -e\n\nfunction libs_to_fpm_args {\n local lib_dir=$1\n local fpm_args=\"\"\n for lib in $(ls "
},
{
"path": "docs/6dof-from-3dof-opentrack-neuralnet.md",
"chars": 4422,
"preview": "# Getting 6DoF from 3DoF glasses (OpenTrack + NeuralNet)\n\nThis guide describes how to get **6DoF positional tracking** f"
},
{
"path": "docs/development.md",
"chars": 2233,
"preview": "# Development (Docker Buildx)\n\nThis repo includes a Docker-based build pipeline that produces release artifacts for mult"
},
{
"path": "docs/index.md",
"chars": 1097,
"preview": "# XR Linux Driver Docs\n\nThis site documents selected XR Linux Driver features and integrations.\n\n## OpenTrack integratio"
},
{
"path": "docs/mouse-and-joystick-modes.md",
"chars": 2335,
"preview": "# Mouse / joystick modes\n\nXR Linux Driver turns head movement into input that games and apps can use.\n\nMost commonly tha"
},
{
"path": "docs/opentrack-app.md",
"chars": 1827,
"preview": "# OpenTrack app (output/source)\n\nThe **OpenTrack app** integration makes the driver send pose data over UDP in an OpenTr"
},
{
"path": "docs/opentrack-listener.md",
"chars": 2816,
"preview": "# OpenTrack listener (input)\n\nThe **OpenTrack listener** integration makes the driver listen for OpenTrack UDP packets a"
},
{
"path": "docs/requirements.txt",
"chars": 62,
"preview": "mkdocs>=1.6.0\nmkdocs-material>=9.5.0\npymdown-extensions>=10.8\n"
},
{
"path": "fpm/build",
"chars": 1123,
"preview": "#!/usr/bin/env bash\n\n# exit when any command fails\nset -e\n\nUSER=${SUDO_USER:-$USER}\nGROUP=$(id -gn $USER)\n\nsource bin/in"
},
{
"path": "fpm/postinstall",
"chars": 1255,
"preview": "#!/usr/bin/env bash\n\nif ! lsmod | grep -q uinput; then\n echo \"Setting up uinput kernel module\"\n modprobe uinput\nfi"
},
{
"path": "fpm/postupgrade",
"chars": 1070,
"preview": "#!/usr/bin/env bash\n\nif [ -x \"$(command -v udevadm)\" ]; then\n udevadm control --reload-rules\n udevadm trigger\nfi\n\n"
},
{
"path": "fpm/preinstall",
"chars": 1157,
"preview": "#!/usr/bin/env bash\n\n# Try multiple methods to detect the real user\nSUDO_USER=\"${SUDO_USER:-}\"\nDBUS_USER=\"${DBUS_SESSION"
},
{
"path": "fpm/preuninstall",
"chars": 1053,
"preview": "#!/usr/bin/env bash\n\n# Try multiple methods to detect the real user\nSUDO_USER=\"${SUDO_USER:-}\"\nDBUS_USER=\"${DBUS_SESSION"
},
{
"path": "include/buffer.h",
"chars": 996,
"preview": "#pragma once\n\n#include <imu.h>\n#include <stdbool.h>\n\n#define GYRO_BUFFERS_COUNT 5 // quat values: x, y, z, w, timestamp\n"
},
{
"path": "include/config.h",
"chars": 1160,
"preview": "#pragma once\n\n#include <stdbool.h>\n#include <stdio.h>\n\nstruct driver_config_t {\n bool disabled;\n bool mouse_mode;\n"
},
{
"path": "include/connection_pool.h",
"chars": 3154,
"preview": "#pragma once\n\n#include \"devices.h\"\n#include \"imu.h\"\n#include <pthread.h>\n#include <stdbool.h>\n#include <stdint.h>\n\ntyped"
},
{
"path": "include/curl.h",
"chars": 54,
"preview": "#pragma once\n\nvoid curl_init();\n\nvoid curl_cleanup();\n"
},
{
"path": "include/devices/rayneo.h",
"chars": 115,
"preview": "#pragma once\n\nextern const device_properties_type rayneo_properties;\nextern const device_driver_type rayneo_driver;"
},
{
"path": "include/devices/rokid.h",
"chars": 113,
"preview": "#pragma once\n\nextern const device_properties_type rokid_properties;\nextern const device_driver_type rokid_driver;"
},
{
"path": "include/devices/viture.h",
"chars": 200,
"preview": "#pragma once\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#include \"devices.h\"\n#include \"imu.h\"\n\nextern const device_prope"
},
{
"path": "include/devices/xreal.h",
"chars": 117,
"preview": "#pragma once\n\nextern const device_properties_type xreal_air_properties;\nextern const device_driver_type xreal_driver;"
},
{
"path": "include/devices.h",
"chars": 4033,
"preview": "#pragma once\n\n\n#include <stdbool.h>\n#include <stdint.h>\n\nenum calibration_setup_t {\n CALIBRATION_SETUP_AUTOMATIC,\n "
},
{
"path": "include/driver.h",
"chars": 237,
"preview": "#pragma once\n\n#include \"devices.h\"\n#include \"imu.h\"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n\nbool driver_reference_po"
},
{
"path": "include/epoch.h",
"chars": 64,
"preview": "#pragma once\n\n#include <stdint.h>\n\nuint64_t get_epoch_time_ms();"
},
{
"path": "include/features/breezy_desktop.h",
"chars": 266,
"preview": "#include <stdbool.h>\n\nextern const char* productivity_basic_feature_name;\nextern const char* productivity_pro_feature_na"
},
{
"path": "include/features/sbs.h",
"chars": 109,
"preview": "#include <stdbool.h>\n\nextern const char* sbs_feature_name;\n\nbool is_sbs_granted();\nvoid reset_sbs_features();"
},
{
"path": "include/features/smooth_follow.h",
"chars": 139,
"preview": "#include <stdbool.h>\n\nextern const char* smooth_follow_feature_name;\n\nbool is_smooth_follow_granted();\nvoid reset_smooth"
},
{
"path": "include/files.h",
"chars": 1129,
"preview": "#pragma once\n\n#include <stdio.h>\n#include <stdbool.h>\n#include <sys/stat.h>\n\nextern const char* XDG_STATE_ENV_VAR;\nexter"
},
{
"path": "include/imu.h",
"chars": 1880,
"preview": "#pragma once\n\n#include <stdbool.h>\n#include <stdint.h>\n\nstruct imu_euler_t {\n\tfloat roll;\n\tfloat pitch;\n\tfloat yaw;\n};\n\n"
},
{
"path": "include/ipc.h",
"chars": 1251,
"preview": "#pragma once\n\n#include <pthread.h>\n#include <stdbool.h>\n#include <stdio.h>\n\n// TODO - this is specific to the sombrero i"
},
{
"path": "include/logging.h",
"chars": 155,
"preview": "#pragma once\n\nvoid log_init();\nvoid log_message(const char* format, ...);\nvoid log_error(const char* format, ...);\nvoid "
},
{
"path": "include/memory.h",
"chars": 360,
"preview": "#pragma once\n\n#include <stdlib.h>\n\n#define free_and_clear(ptr) do { \\\n\tif (ptr != NULL && *ptr != NULL) { \\\n\t\tfree(*ptr)"
},
{
"path": "include/multitap.h",
"chars": 203,
"preview": "#pragma once\n\n#include \"imu.h\"\n\n#include <stdbool.h>\n#include <stdint.h>\n\nvoid init_multi_tap(int init_imu_cycles_per_s)"
},
{
"path": "include/outputs.h",
"chars": 656,
"preview": "#pragma once\n\n#include \"imu.h\"\n#include \"ipc.h\"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#define MS_PER_SEC 1000\n#defi"
},
{
"path": "include/plugins/breezy_desktop.h",
"chars": 334,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\nstruct breezy_desktop_config_t {\n bool enabled;\n float look_ahead_override;\n "
},
{
"path": "include/plugins/custom_banner.h",
"chars": 278,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\nstruct custom_banner_ipc_values_t {\n bool *enabled;\n};\ntypedef struct custom_bann"
},
{
"path": "include/plugins/device_license.h",
"chars": 83,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\nextern const plugin_type device_license_plugin;"
},
{
"path": "include/plugins/gamescope_reshade_wayland.h",
"chars": 785,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\n#include <stdbool.h>\n#include <stddef.h>\n\nstruct gamescope_reshade_wayland_config_t "
},
{
"path": "include/plugins/metrics.h",
"chars": 76,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\nextern const plugin_type metrics_plugin;"
},
{
"path": "include/plugins/neck_saver.h",
"chars": 304,
"preview": "#pragma once\n#include \"plugins.h\"\n\ntypedef struct neck_saver_config_t {\n float horizontal_multiplier; // applied to y"
},
{
"path": "include/plugins/opentrack_listener.h",
"chars": 257,
"preview": "#pragma once\n\n#include <stdbool.h>\n#include \"plugins.h\"\n\nstruct opentrack_listener_config_t {\n\tbool enabled;\n\tchar *ip;\n"
},
{
"path": "include/plugins/opentrack_source.h",
"chars": 258,
"preview": "#pragma once\n\n#include <stdbool.h>\n#include \"plugins.h\"\n\nstruct opentrack_source_config_t {\n bool enabled;\n char *"
},
{
"path": "include/plugins/sideview.h",
"chars": 468,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\n#define SIDEVIEW_POSITION_COUNT 5\nextern const char *sideview_position_names[SIDEVIE"
},
{
"path": "include/plugins/smooth_follow.h",
"chars": 1343,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\n#include <stdint.h>\n\nstruct smooth_follow_ipc_values_t {\n bool *enabled;\n};\ntyped"
},
{
"path": "include/plugins/virtual_display.h",
"chars": 1910,
"preview": "#pragma once\n\n#include \"plugins.h\"\n\nextern const char *virtual_display_look_ahead_cfg_ipc_name;\nextern const char *virtu"
},
{
"path": "include/plugins.h",
"chars": 1904,
"preview": "#pragma once\n\n#include \"imu.h\"\n#include \"ipc.h\"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n// config and control flag pa"
},
{
"path": "include/runtime_context.h",
"chars": 2324,
"preview": "#pragma once\n\n#include \"config.h\"\n#include \"connection_pool.h\"\n#include \"devices.h\"\n#include \"state.h\"\n\nstruct runtime_c"
},
{
"path": "include/sdks/rayneo.h",
"chars": 908,
"preview": "#ifndef XR_MINI_SDK_H\n#define XR_MINI_SDK_H\n\n#include \"base/FXRError.h\"\n#include \"base/FXRMacro.h\"\n#include \"device/usb/"
},
{
"path": "include/sdks/rokid.h",
"chars": 12824,
"preview": "//\n// Created by 曾滔 on 6/8/21.\n//\n\n#ifndef _GLASS_SDK_H_\n#define _GLASS_SDK_H_\n\n#define GLASS_SDK_NATIVE_VERSION \"2.1.9\""
},
{
"path": "include/sdks/viture_device.h",
"chars": 3796,
"preview": "/**\n * @file\n * @brief Non-carina device API and callback types.\n * @copyright 2025 VITURE Inc. All rights reserved.\n *\n"
},
{
"path": "include/sdks/viture_device_carina.h",
"chars": 3833,
"preview": "/**\n * @file\n * @brief Carina-specific device API and callback types.\n * @copyright 2025 VITURE Inc. All rights reserved"
},
{
"path": "include/sdks/viture_glasses_constants.h",
"chars": 299,
"preview": "#ifndef VITURE_GLASSES_CONSTANTS_H\n#define VITURE_GLASSES_CONSTANTS_H\n\n#include <cstdint>\n\nnamespace viture {\nnamespace "
},
{
"path": "include/sdks/viture_glasses_provider.h",
"chars": 15340,
"preview": "/**\n * @file\n * @brief Public C API for Viture Glasses device providers.\n * @copyright 2025 VITURE Inc. All rights reser"
},
{
"path": "include/sdks/viture_macros.h",
"chars": 426,
"preview": "/*\n * Copyright (C) 2025 VITURE Inc. All rights reserved.\n */\n\n#pragma once\n\n// Unified platform-specific export macro\n/"
},
{
"path": "include/sdks/viture_protocol.h",
"chars": 6279,
"preview": "/**\n * @file\n * @brief Protocol constants and identifiers used by the Viture USB protocol.\n * @copyright 2025 VITURE Inc"
},
{
"path": "include/sdks/viture_version.h",
"chars": 1130,
"preview": "/*\n * Copyright (C) 2025 VITURE Inc. All rights reserved.\n */\n\n#pragma once\n\n#include \"viture_macros.h\"\n\n// Version defi"
},
{
"path": "include/state.h",
"chars": 2045,
"preview": "#pragma once\n\n#include \"devices.h\" // for calibration_setup_type\n#include \"imu.h\" // for imu_quat_type\n\n#include <inttyp"
},
{
"path": "include/strings.h",
"chars": 812,
"preview": "#pragma once\n\n#include <stdlib.h>\n#include <stdbool.h>\n\nbool equal(const char *a, const char *b);\n\nbool in_array(const c"
},
{
"path": "include/system.h",
"chars": 38,
"preview": "#pragma once\n\nchar *get_hardware_id();"
},
{
"path": "include/version.h.in",
"chars": 43,
"preview": "#define PROJECT_VERSION \"@PROJECT_VERSION@\""
},
{
"path": "include/wl_client/gamescope_reshade.h",
"chars": 6448,
"preview": "/* Generated by wayland-scanner 1.23.0 */\n\n#ifndef GAMESCOPE_RESHADE_CLIENT_PROTOCOL_H\n#define GAMESCOPE_RESHADE_CLIENT_"
},
{
"path": "license_public_key.pem",
"chars": 177,
"preview": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuJuIZFWthQEOn4KbYYs70aMk9sna\nQT+7sDCZEEjpVyRPZQHP3zkY55jw"
},
{
"path": "mkdocs.yml",
"chars": 803,
"preview": "site_name: XR Linux Driver\nsite_description: Documentation for the XR Linux Driver project\nrepo_url: https://github.com/"
},
{
"path": "modules/rayneoSDKHeaders/base/FXRDebug.h",
"chars": 2055,
"preview": "#ifndef FFALCONXR_DEBUG_H\n#define FFALCONXR_DEBUG_H\n\n#ifndef LOG_TAG\n#define LOG_TAG \"RayNeoXR\"\n#endif\n\n#ifdef ANDROID\n\n"
},
{
"path": "modules/rayneoSDKHeaders/base/FXRError.h",
"chars": 623,
"preview": "#ifndef FFALCONXR_ERROR_H\n#define FFALCONXR_ERROR_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <errno.h>\n#include"
},
{
"path": "modules/rayneoSDKHeaders/base/FXRMacro.h",
"chars": 1724,
"preview": "#ifndef FFALCONXR_MACR_H\n#define FFALCONXR_MACR_H\n\n#include \"base/FXRError.h\"\n#include <stddef.h>\n#include <stdint.h>\n#i"
},
{
"path": "modules/rayneoSDKHeaders/base/FXRType.h",
"chars": 3027,
"preview": "#ifndef FFALCONXR_TYPE_H\n#define FFALCONXR_TYPE_H\n\n\n#include \"base/FXRMacro.h\"\n#include <limits.h>\n#include <stdint.h>\n\n"
},
{
"path": "modules/rayneoSDKHeaders/device/XRDevice.h",
"chars": 3675,
"preview": "#pragma once\n\n#include <functional>\n#include <memory>\n#include <vector>\n\n#include \"xr/XRMacro.h\"\n#include \"base/FXRType."
},
{
"path": "modules/rayneoSDKHeaders/device/usb/XRDeviceState.h",
"chars": 3813,
"preview": "#pragma once\n\n#include \"base/FXRType.h\"\n\n#define FXR_HID_SEND_MAGIC 0x66\n#define FXR_HID_ACK_MAGIC 0x99\n\n#ifdef __cplusp"
},
{
"path": "modules/rayneoSDKHeaders/device/usb/XRPacket.h",
"chars": 3529,
"preview": "#ifndef FFALCONXR_PACKET_H\n#define FFALCONXR_PACKET_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <inttypes.h>\n\nty"
},
{
"path": "modules/rayneoSDKHeaders/interface/FXRApi.h",
"chars": 9187,
"preview": "#ifndef FFALCONXR_API_H\n#define FFALCONXR_API_H\n\n#include \"base/FXRMacro.h\"\n#include \"base/FXRType.h\"\n#include \"device/u"
},
{
"path": "modules/rayneoSDKHeaders/interface/FXRClient.h",
"chars": 702,
"preview": "#ifndef FFALCONXR_CLIENT_H\n#define FFALCONXR_CLIENT_H\n\n#include \"interface/FXRApi.h\"\n#include <android/native_window.h>\n"
},
{
"path": "modules/rayneoSDKHeaders/interface/FXRServer.h",
"chars": 644,
"preview": "#ifndef FFALCONXR_SERVER_H\n#define FFALCONXR_SERVER_H\n\n#include \"interface/FXRApi.h\"\n\n\nextern \"C\" {\n\n\nRAYNEO_API_EXPORT "
},
{
"path": "modules/rayneoSDKHeaders/ipc/FXRProtocol.h",
"chars": 1310,
"preview": "#ifndef FFALCONXR_IPC_PROTOCOL_H\n#define FFALCONXR_IPC_PROTOCOL_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\nenum FXRStat"
},
{
"path": "modules/rayneoSDKHeaders/openxr/openxr.h",
"chars": 275107,
"preview": "#ifndef OPENXR_H_\n#define OPENXR_H_ 1\n\n/*\n** Copyright 2017-2023 The Khronos Group Inc.\n**\n** SPDX-License-Identifier: A"
},
{
"path": "modules/rayneoSDKHeaders/openxr/openxr_platform.h",
"chars": 30042,
"preview": "#ifndef OPENXR_PLATFORM_H_\n#define OPENXR_PLATFORM_H_ 1\n\n/*\n** Copyright 2017-2023 The Khronos Group Inc.\n**\n** SPDX-Lic"
},
{
"path": "modules/rayneoSDKHeaders/openxr/openxr_platform_defines.h",
"chars": 3830,
"preview": "/*\n** Copyright (c) 2017-2023, The Khronos Group Inc.\n**\n** SPDX-License-Identifier: Apache-2.0 OR MIT\n*/\n\n#ifndef OPENX"
},
{
"path": "modules/rayneoSDKHeaders/openxr/openxr_reflection.h",
"chars": 184522,
"preview": "#ifndef OPENXR_REFLECTION_H_\n#define OPENXR_REFLECTION_H_ 1\n\n/*\n** Copyright (c) 2017-2023, The Khronos Group Inc.\n**\n**"
},
{
"path": "modules/rayneoSDKHeaders/openxr/openxr_reflection_parent_structs.h",
"chars": 13358,
"preview": "#ifndef OPENXR_REFLECTION_PARENT_STRUCTS_H_\n#define OPENXR_REFLECTION_PARENT_STRUCTS_H_ 1\n\n/*\n** Copyright (c) 2017-2023"
},
{
"path": "modules/rayneoSDKHeaders/openxr/openxr_reflection_structs.h",
"chars": 34339,
"preview": "#ifndef OPENXR_REFLECTION_STRUCTS_H_\n#define OPENXR_REFLECTION_STRUCTS_H_ 1\n\n/*\n** Copyright (c) 2017-2023, The Khronos "
},
{
"path": "src/buffer.c",
"chars": 5163,
"preview": "#include \"buffer.h\"\n#include \"logging.h\"\n\n#include <stdbool.h>\n#include <stdlib.h>\n\nbuffer_type *create_buffer(int size)"
},
{
"path": "src/config.c",
"chars": 5015,
"preview": "#include \"config.h\"\n#include \"logging.h\"\n#include \"memory.h\"\n#include \"plugins.h\"\n#include \"strings.h\"\n\n#include <errno."
},
{
"path": "src/connection_pool.c",
"chars": 14304,
"preview": "#include \"connection_pool.h\"\n#include \"logging.h\"\n#include \"runtime_context.h\"\n#include \"imu.h\"\n\n#include <pthread.h>\n#i"
},
{
"path": "src/curl.c",
"chars": 502,
"preview": "#include <curl/curl.h>\n#include <pthread.h>\n\nstatic pthread_mutex_t curl_lock = PTHREAD_MUTEX_INITIALIZER;\nstatic int re"
},
{
"path": "src/devices/rayneo.c",
"chars": 10239,
"preview": "#include \"devices.h\"\n#include \"devices/rayneo.h\"\n#include \"connection_pool.h\"\n#include \"driver.h\"\n#include \"imu.h\"\n#incl"
},
{
"path": "src/devices/rokid.c",
"chars": 9043,
"preview": "#include \"devices.h\"\n#include \"driver.h\"\n#include \"connection_pool.h\"\n#include \"imu.h\"\n#include \"logging.h\"\n#include \"ou"
},
{
"path": "src/devices/viture.c",
"chars": 26132,
"preview": "#include \"connection_pool.h\"\n#include \"devices.h\"\n#include \"devices/viture.h\"\n#include \"driver.h\"\n#include \"epoch.h\"\n#in"
},
{
"path": "src/devices/xreal.c",
"chars": 14081,
"preview": "#include \"devices.h\"\n#include \"connection_pool.h\"\n#include \"device_imu.h\"\n#include \"device_mcu.h\"\n#include \"driver.h\"\n#i"
},
{
"path": "src/devices.c",
"chars": 4923,
"preview": "#include \"connection_pool.h\"\n#include \"devices.h\"\n#include \"devices/rayneo.h\"\n#include \"devices/rokid.h\"\n#include \"devic"
},
{
"path": "src/driver.c",
"chars": 28983,
"preview": "#include \"buffer.h\"\n#include \"driver.h\"\n#include \"config.h\"\n#include \"devices.h\"\n#include \"devices/viture.h\"\n#include \"d"
},
{
"path": "src/epoch.c",
"chars": 252,
"preview": "#include \"epoch.h\"\n\n#include <time.h>\n\nstruct timespec ts;\nuint64_t get_epoch_time_ms() {\n timespec_get(&ts, TIME_UTC"
},
{
"path": "src/features/breezy_desktop.c",
"chars": 2147,
"preview": "#include \"runtime_context.h\"\n#include \"strings.h\"\n\n#include <stdatomic.h>\n\nconst char* productivity_basic_feature_name ="
},
{
"path": "src/features/sbs.c",
"chars": 754,
"preview": "#include \"runtime_context.h\"\n#include \"strings.h\"\n\n#include <stdatomic.h>\n\nconst char* sbs_feature_name = \"sbs\";\n\nstatic"
},
{
"path": "src/features/smooth_follow.c",
"chars": 844,
"preview": "#include \"runtime_context.h\"\n#include \"strings.h\"\n\n#include <stdatomic.h>\n\nconst char* smooth_follow_feature_name = \"smo"
},
{
"path": "src/files.c",
"chars": 5027,
"preview": "#include <errno.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <stdbool.h>\n#include <string.h>\n#include <sys/stat.h>"
},
{
"path": "src/imu.c",
"chars": 7835,
"preview": "#include \"imu.h\"\n\n#include <math.h>\n#include <stdbool.h>\n\nconst float pose_orientation_reset_data[16] = {\n 0.0, 0.0, "
},
{
"path": "src/ipc.c",
"chars": 4788,
"preview": "#include \"ipc.h\"\n#include \"logging.h\"\n\n#include <errno.h>\n#include <fcntl.h>\n#include <glob.h>\n#include <pthread.h>\n#inc"
},
{
"path": "src/logging.c",
"chars": 1710,
"preview": "#include \"files.h\"\n#include \"logging.h\"\n#include \"memory.h\"\n#include \"state.h\"\n#include \"strings.h\"\n#include \"version.h\""
},
{
"path": "src/multitap.c",
"chars": 5533,
"preview": "#include \"imu.h\"\n#include \"buffer.h\"\n\n#include \"logging.h\"\n#include <math.h>\n#include <stdbool.h>\n#include <stdint.h>\n#i"
},
{
"path": "src/outputs.c",
"chars": 27637,
"preview": "#include \"buffer.h\"\n#include \"config.h\"\n#include \"devices.h\"\n#include \"imu.h\"\n#include \"files.h\"\n#include \"ipc.h\"\n#inclu"
},
{
"path": "src/plugins/breezy_desktop.c",
"chars": 13369,
"preview": "#include \"devices.h\"\n#include \"features/breezy_desktop.h\"\n#include \"logging.h\"\n#include \"plugins.h\"\n#include \"plugins/br"
},
{
"path": "src/plugins/custom_banner.c",
"chars": 2747,
"preview": "#include \"custom_banner_config.h\"\n#include \"plugins/custom_banner.h\"\n#include \"plugins/gamescope_reshade_wayland.h\"\n#inc"
},
{
"path": "src/plugins/device_license.c",
"chars": 17733,
"preview": "#include \"curl.h\"\n#include \"features/breezy_desktop.h\"\n#include \"features/sbs.h\"\n#include \"features/smooth_follow.h\"\n#in"
},
{
"path": "src/plugins/gamescope_reshade_wayland.c",
"chars": 13849,
"preview": "#include \"epoch.h\"\n#include \"files.h\"\n#include \"imu.h\"\n#include \"logging.h\"\n#include \"plugins/gamescope_reshade_wayland."
},
{
"path": "src/plugins/metrics.c",
"chars": 6110,
"preview": "#include \"config.h\"\n#include \"curl.h\"\n#include \"devices.h\"\n#include \"memory.h\"\n#include \"plugins.h\"\n#include \"runtime_co"
},
{
"path": "src/plugins/neck_saver.c",
"chars": 2302,
"preview": "#include \"plugins/neck_saver.h\"\n#include \"imu.h\"\n#include \"logging.h\"\n#include \"memory.h\"\n#include \"strings.h\"\n#include "
},
{
"path": "src/plugins/opentrack_listener.c",
"chars": 16651,
"preview": "#include \"config.h\"\n#include \"connection_pool.h\"\n#include \"devices.h\"\n#include \"driver.h\"\n#include \"imu.h\"\n#include \"log"
},
{
"path": "src/plugins/opentrack_source.c",
"chars": 6433,
"preview": "#include \"config.h\"\n#include \"logging.h\"\n#include \"plugins.h\"\n#include \"plugins/opentrack_source.h\"\n#include \"runtime_co"
},
{
"path": "src/plugins/sideview.c",
"chars": 3921,
"preview": "#include \"config.h\"\n#include \"devices.h\"\n#include \"ipc.h\"\n#include \"logging.h\"\n#include \"plugins.h\"\n#include \"plugins/ga"
},
{
"path": "src/plugins/smooth_follow.c",
"chars": 23440,
"preview": "#include \"buffer.h\"\n#include \"config.h\"\n#include \"features/breezy_desktop.h\"\n#include \"features/smooth_follow.h\"\n#includ"
},
{
"path": "src/plugins/virtual_display.c",
"chars": 16440,
"preview": "#include \"config.h\"\n#include \"devices.h\"\n#include \"features/smooth_follow.h\"\n#include \"features/sbs.h\"\n#include \"imu.h\"\n"
},
{
"path": "src/plugins.c",
"chars": 5697,
"preview": "#include \"logging.h\"\n#include \"plugins.h\"\n#include \"plugins/custom_banner.h\"\n#include \"plugins/breezy_desktop.h\"\n#includ"
},
{
"path": "src/runtime_context.c",
"chars": 2580,
"preview": "#include \"devices.h\"\n#include \"runtime_context.h\"\n\n#include <pthread.h>\n#include <stdlib.h>\n\nruntime_context g_runtime_c"
},
{
"path": "src/state.c",
"chars": 7095,
"preview": "#include \"devices.h\"\n#include \"imu.h\"\n#include \"logging.h\"\n#include \"memory.h\"\n#include \"plugins.h\"\n#include \"state.h\"\n#"
},
{
"path": "src/strings.c",
"chars": 3513,
"preview": "#include <string.h>\n#include <stdio.h>\n#include <stdbool.h>\n#include <stdlib.h>\n\nbool equal(const char *a, const char *b"
},
{
"path": "src/system.c",
"chars": 4794,
"preview": "#include \"logging.h\"\n#include \"strings.h\"\n\n#include <ifaddrs.h>\n#include <net/if.h>\n#include <netinet/in.h>\n#include <op"
},
{
"path": "src/wl_client/gamescope_reshade.c",
"chars": 2263,
"preview": "/* Generated by wayland-scanner 1.23.0 */\n\n/*\n * Copyright © 2024 Wayne Heaney\n *\n * Permission is hereby granted, free "
},
{
"path": "systemd/xr-driver.service",
"chars": 209,
"preview": "[Unit]\nDescription=XR user-space driver\nAfter=network.target\n\n[Service]\nType=simple\nEnvironment=LD_LIBRARY_PATH={ld_libr"
},
{
"path": "udev/70-rayneo-xr.rules",
"chars": 85,
"preview": "SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"1bbb\", MODE=\"0660\", TAG+=\"uaccess\""
},
{
"path": "udev/70-rokid-xr.rules",
"chars": 85,
"preview": "SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"04d2\", MODE=\"0660\", TAG+=\"uaccess\""
},
{
"path": "udev/70-uinput-xr.rules",
"chars": 109,
"preview": "# Mouse output\nKERNEL==\"uinput\", SUBSYSTEM==\"misc\" MODE=\"0660\", TAG+=\"uaccess\", OPTIONS+=\"static_node=uinput\""
},
{
"path": "udev/70-viture-xr.rules",
"chars": 373,
"preview": "SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"35ca\", MODE=\"0660\", TAG+=\"uaccess\"\nSUBSYSTEM==\"usb\", KERNEL==\"hiddev["
},
{
"path": "udev/70-xreal-xr.rules",
"chars": 754,
"preview": "# Rule for USB devices\nSUBSYSTEM==\"usb\", ACTION==\"add\", ATTR{idVendor}==\"3318\", MODE=\"0660\", TAG+=\"uaccess\"\n\n# Rule for "
}
]
// ... and 36 more files (download for full content)
About this extraction
This page contains the full source code of the wheaney/XRLinuxDriver GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 187 files (87.0 MB), approximately 286.8k tokens, and a symbol index with 1080 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.