Files
OpenVR-AdvancedSettings-frame/src/openvr/ovr_system_wrapper.h
T
ykearaandRTUnreal ca0ec3e07d Qt6 (#669)
* update qt6 upgrade progress

* add flawed addition for QRenderTarget and link needed libs

* update to better logging format

* move many assets and qml files into qrc

* get rid of deprecation messages

* remove additional deprecation notices

* make Qt6 finally render on desktop with some progress on vr

* initialize QRhi with QQuickRenderControl

* use default values to stop SegFaults

* fix compilation on windows

* add windows files for aiding in running exe

* fix formatting of testing qt.conf

* first attempt on using textures instead of files in AudioTabController

* Fix public/private access issue

---------

Co-authored-by: RTUnreal <unreal@rtinf.net>
2024-04-03 22:49:24 -05:00

59 lines
1.8 KiB
C++

#pragma once
#include <openvr.h>
#include <iostream>
#include <string>
#include <utility>
#include <map>
#include <vector>
/* Wrapper For OpenVR's IVR settings class, allows us to do our error logging
* while also minimizing code
*
*/
namespace ovr_system_wrapper
{
// might make sense to mirror ovr's errors exactly, but for now this is more
// than sufficient
enum class SystemError
{
NoError,
UndefinedError,
};
std::pair<SystemError, bool>
getBoolTrackedProperty( int deviceIndex,
vr::TrackedDeviceProperty property,
std::string customErrorMsg = "" );
std::pair<SystemError, int>
getInt32TrackedProperty( int deviceIndex,
vr::TrackedDeviceProperty property,
std::string customErrorMsg = "" );
std::pair<SystemError, float>
getFloatTrackedProperty( int deviceIndex,
vr::TrackedDeviceProperty property,
std::string customErrorMsg = "" );
std::pair<SystemError, std::string>
getStringTrackedProperty( int deviceIndex,
vr::TrackedDeviceProperty property,
std::string customErrorMsg = "" );
SystemError handleTrackedPropertyErrors( vr::TrackedDeviceProperty tdp,
vr::ETrackedPropertyError error,
std::string customErrorMsg );
std::string getPropertyFromEnum( vr::TrackedDeviceProperty );
bool deviceConnected( int Index );
vr::ETrackedDeviceClass getDeviceClass( int index );
std::vector<int> getAllConnectedDevices( bool onlyWearable = false );
std::string getDeviceName( int index );
std::string getControllerName();
} // namespace ovr_system_wrapper