iOS: Hide non-working RetroAchievements login, until we can fix it (still usable through ini file)

This commit is contained in:
Henrik Rydgård committed 2024-05-06 22:51:52 +02:00
1 parent 508d6ebd58
commit ac40fb83d4
2 files changed
+19 -6

No files matched your search

+17 -6
View File
@@ -970,12 +970,23 @@ void GameSettingsScreen::CreateToolsSettings(UI::ViewGroup *tools) {
tools->Add(new ItemHeader(ms->T("Tools")));
auto retro = tools->Add(new Choice(sy->T("RetroAchievements")));
retro->OnClick.Add([=](UI::EventParams &) -> UI::EventReturn {
screenManager()->push(new RetroAchievementsSettingsScreen(gamePath_));
return UI::EVENT_DONE;
});
retro->SetIcon(ImageID("I_RETROACHIEVEMENTS_LOGO"));
bool showRetroAchievements = true;
#if PPSSPP_PLATFORM(IOS_APP_STORE)
// Hide RetroAchievements login (unless the user has specified a login via the ini file).
// A non-working login won't pass App Store review.
if (g_Config.sAchievementsUserName.empty()) {
showRetroAchievements = false;
}
#endif
if (showRetroAchievements) {
auto retro = tools->Add(new Choice(sy->T("RetroAchievements")));
retro->OnClick.Add([=](UI::EventParams &) -> UI::EventReturn {
screenManager()->push(new RetroAchievementsSettingsScreen(gamePath_));
return UI::EVENT_DONE;
});
retro->SetIcon(ImageID("I_RETROACHIEVEMENTS_LOGO"));
}
// These were moved here so use the wrong translation objects, to avoid having to change all inis... This isn't a sustainable situation :P
tools->Add(new Choice(sa->T("Savedata Manager")))->OnClick.Add([=](UI::EventParams &) {
screenManager()->push(new SavedataScreen(gamePath_));
+2
View File
@@ -308,6 +308,8 @@ void RetroAchievementsSettingsScreen::CreateAccountTab(UI::ViewGroup *viewGroup)
return UI::EVENT_DONE;
});
} else {
// TODO: For text input on iOS, look into https://stackoverflow.com/questions/7253477/how-to-display-the-iphone-ipad-keyboard-over-a-full-screen-opengl-es-app
// Hack up a temporary quick login-form-ish-thing
viewGroup->Add(new PopupTextInputChoice(GetRequesterToken(), &username_, di->T("Username"), "", 128, screenManager()));
viewGroup->Add(new PopupTextInputChoice(GetRequesterToken(), &password_, di->T("Password"), "", 128, screenManager()))->SetPasswordDisplay();