Merge branch 'master' into TemporaryHackishBranch

# Conflicts:
#	Core/Config.cpp
#	Core/Config.h
#	UI/ControlMappingScreen.cpp
#	UI/EmuScreen.cpp
#	UI/GameSettingsScreen.cpp
#	android/assets/ui_atlas.meta
#	android/assets/ui_atlas.zim
#	assets/ui_atlas.meta
#	assets/ui_atlas.zim
This commit is contained in:
LunaMoo committed 2021-07-17 19:08:58 +02:00
commit 4fb6e0c242
198 files changed
+6323 -2862

No files matched your search

+6 -33
View File
@@ -669,6 +669,11 @@ void GameBrowser::Refresh() {
} else {
topBar->Add(new Spacer(new LinearLayoutParams(FILL_PARENT, 64.0f, 1.0f)));
}
if (browseFlags_ & BrowseFlags::HOMEBREW_STORE) {
topBar->Add(new Choice(mm->T("PPSSPP Homebrew Store"), new UI::LinearLayoutParams(WRAP_CONTENT, 64.0f)))->OnClick.Handle(this, &GameBrowser::OnHomebrewStore);
}
ChoiceStrip *layoutChoice = topBar->Add(new ChoiceStrip(ORIENT_HORIZONTAL));
layoutChoice->AddChoice(ImageID("I_GRID"));
layoutChoice->AddChoice(ImageID("I_LINES"));
@@ -806,11 +811,6 @@ void GameBrowser::Refresh() {
OnClick.Handle(this, &GameBrowser::PinToggleClick);
}
if (browseFlags_ & BrowseFlags::HOMEBREW_STORE) {
Add(new Spacer());
Add(new Choice(mm->T("DownloadFromStore", "Download from the PPSSPP Homebrew Store"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::OnHomebrewStore);
}
if (!lastText_.empty() && gameButtons.empty()) {
Add(new Spacer());
Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::LastClick);
@@ -1203,34 +1203,7 @@ void MainScreen::sendMessage(const char *message, const char *value) {
LaunchFile(screenManager(), Path(std::string(value)));
}
if (!strcmp(message, "browse_folderSelect")) {
std::string filename;
#if PPSSPP_PLATFORM(ANDROID)
// Hacky way to get a normal path from a Android Storage Framework path.
// Is not gonna work forever, but ship-hack for 1.11.
std::string url = value;
const char *prefix = "content://com.android.externalstorage.documents/tree/";
const char *primaryPrefix = "/storage/primary/";
if (startsWith(url, prefix)) {
url = UriDecode(url.substr(strlen(prefix)));
size_t colonPos = url.find(":");
if (colonPos != std::string::npos) {
url[colonPos] = '/';
}
url = "/storage/" + url;
if (startsWith(url, primaryPrefix)) {
url = g_Config.memStickDirectory.ToString() + url.substr(strlen(primaryPrefix));
}
INFO_LOG(SYSTEM, "Translated '%s' into '%s'", value, url.c_str());
} else {
// It's not gonna work.
// TODO: Show an error message?
INFO_LOG(SYSTEM, "Failed to parse content string: '%s'", value);
return;
}
filename = url;
#else
filename = value;
#endif
std::string filename = value;
INFO_LOG(SYSTEM, "Got folder: '%s'", filename.c_str());
int tab = tabHolder_->GetCurrentTab();
// Don't allow browsing in the other tabs (I don't think it's possible to reach the option though)