From 8ba87bf9aa0d555bf1925fe591b70f3d65c0754d Mon Sep 17 00:00:00 2001 From: Lubos Date: Thu, 7 Jul 2022 18:20:12 +0200 Subject: [PATCH] OpenXR - Hide options which are not relevant for VR --- Common/GPU/Vulkan/VulkanLoader.cpp | 4 ++-- Core/Config.cpp | 6 ++++++ UI/GameSettingsScreen.cpp | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanLoader.cpp b/Common/GPU/Vulkan/VulkanLoader.cpp index 4f46051a6f5b..929ef9c5016d 100644 --- a/Common/GPU/Vulkan/VulkanLoader.cpp +++ b/Common/GPU/Vulkan/VulkanLoader.cpp @@ -307,8 +307,8 @@ void VulkanSetAvailable(bool available) { bool VulkanMayBeAvailable() { #ifdef OPENXR - //unsupported at the moment - return false; + //unsupported at the moment + return false; #endif if (g_vulkanAvailabilityChecked) { diff --git a/Core/Config.cpp b/Core/Config.cpp index fe03875ba8ab..0baa43eb3cfc 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -993,7 +993,13 @@ static ConfigSetting controlSettings[] = { #if defined(USING_WIN_UI) ConfigSetting("IgnoreWindowsKey", &g_Config.bIgnoreWindowsKey, false, true, true), #endif + +#ifdef OPENXR + g_Config.bShowTouchControls = false, +#else ConfigSetting("ShowTouchControls", &g_Config.bShowTouchControls, &DefaultShowTouchControls, true, true), +#endif + // ConfigSetting("KeyMapping", &g_Config.iMappingMap, 0), #ifdef MOBILE_DEVICE diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 3a923214f0a7..92f743564375 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -585,7 +585,9 @@ void GameSettingsScreen::CreateViews() { static const char *bufFilters[] = { "Linear", "Nearest", }; graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr->GetName(), screenManager())); -#if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS) +#ifdef OPENXR + bool showCardboardSettings = false; +#elif PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS) bool showCardboardSettings = true; #else // If you enabled it through the ini, you can see this. Useful for testing. @@ -689,6 +691,7 @@ void GameSettingsScreen::CreateViews() { MicChoice->OnChoice.Handle(this, &GameSettingsScreen::OnMicDeviceChange); } +#ifndef OPENXR // Control LinearLayout *controlsSettings = AddTab("GameSettingsControls", ms->T("Controls")); @@ -784,6 +787,7 @@ void GameSettingsScreen::CreateViews() { controlsSettings->Add(new CheckBox(&g_Config.bMouseConfine, co->T("Confine Mouse", "Trap mouse within window/display area")))->SetEnabledPtr(&g_Config.bMouseControl); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fMouseSensitivity, 0.01f, 1.0f, co->T("Mouse sensitivity"), 0.01f, screenManager(), "x"))->SetEnabledPtr(&g_Config.bMouseControl); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fMouseSmoothing, 0.0f, 0.95f, co->T("Mouse smoothing"), 0.05f, screenManager(), "x"))->SetEnabledPtr(&g_Config.bMouseControl); +#endif #endif LinearLayout *networkingSettings = AddTab("GameSettingsNetworking", ms->T("Networking"));