Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenXR - Cleanup unsupported features, support Android 12 #17398

Merged
merged 1 commit into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

// 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";
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";
}
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")));
Expand Down
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions android/jni/app-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down Expand Up @@ -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;
}
Expand Down