Skip to content

Commit

Permalink
OpenXR - Hide options which are not relevant for VR
Browse files Browse the repository at this point in the history
  • Loading branch information
lvonasek committed Jul 7, 2022
1 parent 99a4a06 commit 8ba87bf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Common/GPU/Vulkan/VulkanLoader.cpp
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions Core/Config.cpp
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion UI/GameSettingsScreen.cpp
Expand Up @@ -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.
Expand Down Expand Up @@ -689,6 +691,7 @@ void GameSettingsScreen::CreateViews() {
MicChoice->OnChoice.Handle(this, &GameSettingsScreen::OnMicDeviceChange);
}

#ifndef OPENXR
// Control
LinearLayout *controlsSettings = AddTab("GameSettingsControls", ms->T("Controls"));

Expand Down Expand Up @@ -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"));
Expand Down

0 comments on commit 8ba87bf

Please sign in to comment.