From 1b6b1e7fc939087084bd2db3eac6a76149f66832 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 23 Mar 2024 20:04:20 +0100 Subject: Fix variable name clash --- project.conf | 2 +- src/main.cpp | 18 +++++++----------- 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); -- cgit v1.2.3