aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-23 20:04:20 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-23 20:04:20 +0100
commit1b6b1e7fc939087084bd2db3eac6a76149f66832 (patch)
treecc10fd078e09008aba569d91e7c73513179e07a3
parenta2691907e9920a05f5f24e6e7be589d54a63d74a (diff)
Fix variable name clash
-rw-r--r--project.conf2
-rw-r--r--src/main.cpp18
2 files changed, 8 insertions, 12 deletions
diff --git a/project.conf b/project.conf
index a28b585..70874a7 100644
--- a/project.conf
+++ b/project.conf
@@ -7,7 +7,7 @@ platforms = ["linux"]
[dependencies]
glew = "2"
sdl2 = "2"
-openvr = "1"
+openvr = ">=1"
x11 = "1"
xcomposite = ">=0.2"
xfixes = ">=5"
diff --git a/src/main.cpp b/src/main.cpp
index 5b766f1..7e13ec9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -72,16 +72,12 @@
#define _countof(x) (sizeof(x)/sizeof((x)[0]))
#endif
-// Not in public headers yet.
+// Not in public headers in older version of openvr.
namespace vr
{
- const VROverlayFlags VROverlayFlags_EnableControlBar = (VROverlayFlags)(1 << 23);
- const VROverlayFlags VROverlayFlags_EnableControlBarKeyboard = (VROverlayFlags)(1 << 24);
- const VROverlayFlags VROverlayFlags_EnableControlBarClose = (VROverlayFlags)(1 << 25);
- const VROverlayFlags VROverlayFlags_EnableControlBarSteamUI = (VROverlayFlags)(1 << 26);
-
- const EVRButtonId k_EButton_Steam = (EVRButtonId)(50);
- const EVRButtonId k_EButton_QAM = (EVRButtonId)(51);
+ const VROverlayFlags vrvid_VROverlayFlags_EnableControlBar = (VROverlayFlags)(1 << 23);
+ const VROverlayFlags vrvid_VROverlayFlags_EnableControlBarKeyboard = (VROverlayFlags)(1 << 24);
+ const VROverlayFlags vrvid_VROverlayFlags_EnableControlBarClose = (VROverlayFlags)(1 << 25);
}
static bool g_bPrintf = true;
@@ -1222,9 +1218,9 @@ bool CMainApplication::BInitOverlay()
vr::VROverlay()->SetOverlayInputMethod(overlay_handle, vr::VROverlayInputMethod_None);
vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_IgnoreTextureAlpha, true);
- vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_EnableControlBar, true);
- vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_EnableControlBarKeyboard, true);
- vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_EnableControlBarClose, true);
+ vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::vrvid_VROverlayFlags_EnableControlBar, true);
+ vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::vrvid_VROverlayFlags_EnableControlBarKeyboard, true);
+ vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::vrvid_VROverlayFlags_EnableControlBarClose, true);
vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_WantsModalBehavior, false);
vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_SendVRDiscreteScrollEvents, true);
vr::VROverlay()->SetOverlayFlag(overlay_handle, vr::VROverlayFlags_VisibleInDashboard, true);