OpenXR - Cleanup unsupported features, support Android 12

This commit is contained in:
Lubos 2023-05-03 19:41:23 +02:00
parent 4a92275042
commit 0447b2b78a
3 changed files with 18 additions and 15 deletions

View file

@ -274,7 +274,7 @@ void GameSettingsScreen::CreateViews() {
#if !defined(MOBILE_DEVICE) || PPSSPP_PLATFORM(ANDROID)
// Hide search if screen is too small.
if (g_display.dp_xres < g_display.dp_yres || g_display.dp_yres >= 500) {
if ((g_display.dp_xres < g_display.dp_yres || g_display.dp_yres >= 500) && (deviceType != DEVICE_TYPE_VR)) {
auto se = GetI18NCategory(I18NCat::SEARCH);
// Search
LinearLayout *searchSettings = AddTab("GameSettingsSearch", ms->T("Search"), true);
@ -974,19 +974,21 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
#endif
#if PPSSPP_PLATFORM(ANDROID)
memstickDisplay_ = g_Config.memStickDirectory.ToVisualString();
auto memstickPath = systemSettings->Add(new ChoiceWithValueDisplay(&memstickDisplay_, sy->T("Memory Stick folder", "Memory Stick folder"), I18NCat::NONE));
memstickPath->SetEnabled(!PSP_IsInited());
memstickPath->OnClick.Handle(this, &GameSettingsScreen::OnChangeMemStickDir);
if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) != DEVICE_TYPE_VR) {
memstickDisplay_ = g_Config.memStickDirectory.ToVisualString();
auto memstickPath = systemSettings->Add(new ChoiceWithValueDisplay(&memstickDisplay_, sy->T("Memory Stick folder", "Memory Stick folder"), I18NCat::NONE));
memstickPath->SetEnabled(!PSP_IsInited());
memstickPath->OnClick.Handle(this, &GameSettingsScreen::OnChangeMemStickDir);
// Display USB path for convenience.
std::string usbPath;
if (PathToVisualUsbPath(g_Config.memStickDirectory, usbPath)) {
if (usbPath.empty()) {
// Probably it's just the root. So let's add PSP to make it clear.
usbPath = "/PSP";
// Display USB path for convenience.
std::string usbPath;
if (PathToVisualUsbPath(g_Config.memStickDirectory, usbPath)) {
if (usbPath.empty()) {
// Probably it's just the root. So let's add PSP to make it clear.
usbPath = "/PSP";
}
systemSettings->Add(new InfoItem(sy->T("USB"), usbPath))->SetChoiceStyle(true);
}
systemSettings->Add(new InfoItem(sy->T("USB"), usbPath))->SetChoiceStyle(true);
}
#elif defined(_WIN32) && !PPSSPP_PLATFORM(UWP)
SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, sy->T("Save path in My Documents", "Save path in My Documents")));

View file

@ -158,6 +158,7 @@ android {
vr {
applicationId 'org.ppsspp.ppssppvr'
dimension "variant"
targetSdkVersion 29
externalNativeBuild {
cmake {
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html

View file

@ -487,7 +487,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
case SYSPROP_HAS_BACK_BUTTON:
return true;
case SYSPROP_HAS_IMAGE_BROWSER:
return true;
return deviceType != DEVICE_TYPE_VR;
case SYSPROP_HAS_FILE_BROWSER:
// It's only really needed with scoped storage, but why not make it available
// as far back as possible - works just fine.
@ -496,7 +496,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
// Uses OPEN_DOCUMENT_TREE to let you select a folder.
// Doesn't actually mean it's usable though, in many early versions of Android
// this dialog is complete garbage and only lets you select subfolders of the Downloads folder.
return androidVersion >= 21; // when ACTION_OPEN_DOCUMENT_TREE was added
return (androidVersion >= 21) && (deviceType != DEVICE_TYPE_VR); // when ACTION_OPEN_DOCUMENT_TREE was added
case SYSPROP_SUPPORTS_OPEN_FILE_IN_EDITOR:
return false; // Update if we add support in FileUtil.cpp: OpenFileInEditor
case SYSPROP_APP_GOLD:
@ -527,7 +527,7 @@ bool System_GetPropertyBool(SystemProperty prop) {
return false;
}
case SYSPROP_HAS_KEYBOARD:
return true;
return deviceType != DEVICE_TYPE_VR;
default:
return false;
}