mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Cleanups and fixes
This commit is contained in:
1 parent
1e93693f73
commit
03535ffced
4 files changed
+74
-41
No files matched your search
+5
-2
@@ -1463,7 +1463,7 @@ void MainScreen::CreateViews() {
|
||||
root_->SetTag("mainroot");
|
||||
|
||||
upgradeBar_ = nullptr;
|
||||
if (!g_Config.upgradeMessage.empty()) {
|
||||
if (!g_Config.sUpgradeMessage.empty()) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
upgradeBar_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
|
||||
@@ -1471,7 +1471,7 @@ void MainScreen::CreateViews() {
|
||||
UI::Margins buttonMargins(0, 0);
|
||||
UI::Drawable solid(0xFFbd9939);
|
||||
upgradeBar_->SetBG(solid);
|
||||
upgradeBar_->Add(new TextView(std::string(di->T("New version of PPSSPP available")) + std::string(": ") + g_Config.upgradeVersion, new LinearLayoutParams(1.0f, textMargins)));
|
||||
upgradeBar_->Add(new TextView(ApplySafeSubstitutions("%1: %2", di->T("New version of PPSSPP available"), g_Config.sUpgradeVersion), new LinearLayoutParams(1.0f, textMargins)));
|
||||
#if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(WINDOWS)
|
||||
upgradeBar_->Add(new Button(di->T("Download"), new LinearLayoutParams(buttonMargins)))->OnClick.Handle(this, &MainScreen::OnDownloadUpgrade);
|
||||
#else
|
||||
@@ -1511,6 +1511,7 @@ void MainScreen::OnAllowStorage(UI::EventParams &e) {
|
||||
System_AskForPermission(SYSTEM_PERMISSION_STORAGE);
|
||||
}
|
||||
|
||||
// See Config::SupportsUpgradeCheck() if you add more platforms.
|
||||
void MainScreen::OnDownloadUpgrade(UI::EventParams &e) {
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
// Go to app store
|
||||
@@ -1521,6 +1522,8 @@ void MainScreen::OnDownloadUpgrade(UI::EventParams &e) {
|
||||
}
|
||||
#elif PPSSPP_PLATFORM(WINDOWS)
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.ppsspp.org/download");
|
||||
#elif PPSSPP_PLATFORM(IOS_APP_STORE)
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, "itms-apps://itunes.apple.com/app/id6496972903");
|
||||
#else
|
||||
// Go directly to ppsspp.org and let the user sort it out
|
||||
// (for details and in case downloads doesn't have their platform.)
|
||||
|
||||
Reference in new issue
Block a user