Merge pull request #16329 from lvonasek/feature_openxr_disable72hz

OpenXR - Add an option to disable 72Hz update
This commit is contained in:
Henrik Rydgård 2022-11-05 10:33:20 +01:00 committed by GitHub
commit 92fc71ca5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 2 deletions

View file

@ -111,8 +111,6 @@ void InitVROnAndroid(void* vm, void* activity, int version, const char* name) {
java.AppVersion = version;
strcpy(java.AppName, name);
VR_Init(java, useVulkan);
__DisplaySetFramerate(72);
}
#endif
@ -376,6 +374,7 @@ bool StartVRRender() {
}
// Set customizations
__DisplaySetFramerate(g_Config.bForce72Hz ? 72 : 60);
VR_SetConfig(VR_CONFIG_6DOF_ENABLED, g_Config.bEnable6DoF);
VR_SetConfig(VR_CONFIG_CAMERA_DISTANCE, g_Config.fCameraDistance * 1000);
VR_SetConfig(VR_CONFIG_CAMERA_HEIGHT, g_Config.fCameraHeight * 1000);

View file

@ -1208,6 +1208,7 @@ static ConfigSetting vrSettings[] = {
ConfigSetting("VREnable", &g_Config.bEnableVR, true),
ConfigSetting("VREnable6DoF", &g_Config.bEnable6DoF, true),
ConfigSetting("VREnableStereo", &g_Config.bEnableStereo, false),
ConfigSetting("VRbForce72Hz", &g_Config.bForce72Hz, true),
ConfigSetting("VRCameraDistance", &g_Config.fCameraDistance, 0.0f),
ConfigSetting("VRCameraHeight", &g_Config.fCameraHeight, 0.0f),
ConfigSetting("VRCameraSide", &g_Config.fCameraSide, 0.0f),

View file

@ -463,6 +463,7 @@ public:
bool bEnableVR;
bool bEnable6DoF;
bool bEnableStereo;
bool bForce72Hz;
float fCameraDistance;
float fCameraHeight;
float fCameraSide;

View file

@ -1162,6 +1162,7 @@ void GameSettingsScreen::CreateViews() {
CheckBox *vr6DoF = vrSettings->Add(new CheckBox(&g_Config.bEnable6DoF, vr->T("6DoF movement")));
vr6DoF->SetEnabledPtr(&g_Config.bEnableVR);
vrSettings->Add(new CheckBox(&g_Config.bEnableStereo, vr->T("Stereoscopic vision (Experimental)")));
vrSettings->Add(new CheckBox(&g_Config.bForce72Hz, vr->T("Force 72Hz update")));
vrSettings->Add(new ItemHeader(vr->T("VR camera")));
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fCameraDistance, -10.0f, 10.0f, vr->T("Camera distance adjust", "Camera distance adjust"), 1.0f, screenManager(), ""));