Update to OpenVR v1.10.30

This commit is contained in:
Dj lukis.LT authored and Justin Li committed 2020-04-05 21:06:51 -04:00
1 parent eebf2877f3
commit c607fa30c4
6 files changed
+3496 -549

No files matched your search

+5 -4
View File
@@ -14,7 +14,10 @@ static void ParseProfileV2(CalibrationContext &ctx, std::istream &stream);
static std::string ConfigFileName()
{
std::string vrRuntimeConfigName = vr::VR_RuntimePath();
char cruntimePath[MAX_PATH] = { 0 };
unsigned int pathLen;
vr::VR_GetRuntimePath(cruntimePath, MAX_PATH, &pathLen);
std::string vrRuntimeConfigName(cruntimePath);
return vrRuntimeConfigName + "\\..\\..\\..\\config\\01spacecalibrator\\calibration.json";
}
@@ -200,9 +203,7 @@ static void UpgradeProfileV1(CalibrationContext &ctx)
void WriteActivateMultipleDriversToConfig()
{
std::string configPath = vr::VR_RuntimePath();
configPath += "\\..\\..\\..\\config\\steamvr.vrsettings";
std::string configPath = ConfigFileName();
std::ifstream ifile(configPath);
if (!ifile.good())
throw std::runtime_error("failed to read steamvr.vrsettings");
@@ -119,7 +119,7 @@ void TryCreateVROverlay()
vr::VROverlay()->SetOverlayWidthInMeters(overlayMainHandle, 3.0f);
vr::VROverlay()->SetOverlayInputMethod(overlayMainHandle, vr::VROverlayInputMethod_Mouse);
vr::VROverlay()->SetOverlayFlag(overlayMainHandle, vr::VROverlayFlags_SendVRScrollEvents, true);
vr::VROverlay()->SetOverlayFlag(overlayMainHandle, vr::VROverlayFlags_SendVRDiscreteScrollEvents, true);
std::string iconPath = cwd;
iconPath += "\\icon.png";
@@ -192,10 +192,11 @@ void RunLoop()
char buf[0x400];
ImGui::GetActiveText(buf, sizeof buf);
buf[0x3ff] = 0;
uint32_t unFlags = 0; // EKeyboardFlags
vr::VROverlay()->ShowKeyboardForOverlay(
overlayMainHandle, vr::k_EGamepadTextInputModeNormal, vr::k_EGamepadTextInputLineModeSingleLine,
"Space Calibrator Overlay", sizeof buf, buf, false, 0
unFlags, "Space Calibrator Overlay", sizeof buf, buf, 0
);
keyboardOpen = true;
}
@@ -214,7 +215,7 @@ void RunLoop()
case vr::VREvent_MouseButtonUp:
io.MouseDown[vrEvent.data.mouse.button == vr::VRMouseButton_Left ? 0 : 1] = false;
break;
case vr::VREvent_Scroll:
case vr::VREvent_ScrollDiscrete:
io.MouseWheelH += vrEvent.data.scroll.xdelta * 360.0f * 8.0f;
io.MouseWheel += vrEvent.data.scroll.ydelta * 360.0f * 8.0f;
break;
@@ -342,7 +343,11 @@ static void HandleCommandLine(LPWSTR lpCmdLine)
vr::VR_Init(&vrErr, vr::VRApplication_Utility);
if (vrErr == vr::VRInitError_None)
{
printf("%s", vr::VR_RuntimePath());
char cruntimePath[MAX_PATH] = { 0 };
unsigned int pathLen;
vr::VR_GetRuntimePath(cruntimePath, MAX_PATH, &pathLen);
printf("%s", cruntimePath);
vr::VR_Shutdown();
exit(0);
}
Binary file not shown.
Binary file not shown.
+1981 -351
View File
File diff suppressed because it is too large. Load diff
+1501 -190
View File
File diff suppressed because it is too large. Load diff