From 3f7777530600314b77dfd14cc9deb483f09ff2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 13 Jun 2025 20:08:41 +0200 Subject: [PATCH] Legacy build: Attempt to lower version requirements, also allow manually specifying the path Should fix #20509 (not extensively tested) --- CMakeLists.txt | 3 +++ UI/MemStickScreen.cpp | 18 ++++++++++++------ android/build.gradle | 1 + gradle.properties | 1 + 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8247a34496..a06e2adc11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,6 +336,9 @@ endif() include_directories("${CMAKE_SOURCE_DIR}") +if(ANDROID_LEGACY) + add_compile_definitions(ANDROID_LEGACY) +endif() if(USING_EGL) add_compile_definitions(USING_EGL) endif() diff --git a/UI/MemStickScreen.cpp b/UI/MemStickScreen.cpp index de313c94a3..de7e3b1551 100644 --- a/UI/MemStickScreen.cpp +++ b/UI/MemStickScreen.cpp @@ -144,11 +144,11 @@ static void AddExplanation(UI::ViewGroup *viewGroup, MemStickScreen::Choice choi #endif break; case MemStickScreen::CHOICE_SET_MANUAL: + holder->Add(new TextView(iz->T("DataWillStay", "Data will stay even if you uninstall PPSSPP"), flags, false))->SetBullet(true); + holder->Add(new TextView(iz->T("EasyUSBAccess", "Easy USB access"), flags, false))->SetBullet(true); + break; default: holder->Add(new TextView(iz->T("EasyUSBAccess", "Easy USB access"), flags, false))->SetBullet(true); - // What more? - - // Should we have a special text here? It'll popup a text window for editing. break; } } @@ -206,10 +206,16 @@ void MemStickScreen::CreateViews() { leftColumn->Add(new RadioButton(&choice_, CHOICE_BROWSE_FOLDER, ms->T("Create or Choose a PSP folder")))->OnClick.Handle(this, &MemStickScreen::OnChoiceClick); // TODO: Show current folder here if we have one set. - } else { + } + +#ifdef ANDROID_LEGACY + constexpr bool legacy = true; +#else + constexpr bool legacy = false; +#endif + + if (!storageBrowserWorking_ || legacy) { leftColumn->Add(new RadioButton(&choice_, CHOICE_SET_MANUAL, ms->T("Manually specify PSP folder")))->OnClick.Handle(this, &MemStickScreen::OnChoiceClick); - leftColumn->Add(new TextView(ms->T("DataWillStay", "Data will stay even if you uninstall PPSSPP.")))->SetBullet(true); - leftColumn->Add(new TextView(ms->T("DataCanBeShared", "Data can be shared between PPSSPP regular/Gold.")))->SetBullet(true); // TODO: Show current folder here if we have one set. } errorNoticeView_ = leftColumn->Add(new NoticeView(NoticeLevel::WARN, ms->T("Cancelled - try again"), "")); diff --git a/android/build.gradle b/android/build.gradle index 0b23ecbd5d..e78a6e0233 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -178,6 +178,7 @@ android { legacy { applicationId 'org.ppsspp.ppsspplegacy' dimension "variant" + minSdkVersion 17 // To be compatible as far back as possible. This does cause build warnings. targetSdkVersion 29 // This is the point of legacy. externalNativeBuild { cmake { diff --git a/gradle.properties b/gradle.properties index fda53eaade..c69aa23e37 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,3 +2,4 @@ org.gradle.jvmargs=-Xmx6G android.useAndroidX=true android.nonTransitiveRClass=true android.nonFinalResIds=true +android.ndk.suppressMinSdkVersionError=21