mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 23:40:39 +00:00
Merge pull request #18729 from hrydgard/even-more-beta-fixes
More UI fixes
This commit is contained in:
commit
98e0d30d9e
@ -438,7 +438,7 @@ std::wstring ConvertUTF8ToWString(const std::string_view source) {
|
||||
std::wstring str;
|
||||
str.resize(size);
|
||||
if (size > 0) {
|
||||
MultiByteToWideChar(CP_UTF8, 0, source.data(), source.size(), &str[0], size);
|
||||
MultiByteToWideChar(CP_UTF8, 0, source.data(), (int)source.size(), &str[0], size);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
@ -227,14 +227,13 @@ std::string Path::GetDirectory() const {
|
||||
return path_;
|
||||
}
|
||||
|
||||
bool Path::FilePathContainsNoCase(const std::string &needle) const {
|
||||
bool Path::FilePathContainsNoCase(std::string_view needle) const {
|
||||
std::string haystack;
|
||||
if (type_ == PathType::CONTENT_URI) {
|
||||
haystack = AndroidContentURI(path_).FilePath();
|
||||
} else {
|
||||
haystack = path_;
|
||||
}
|
||||
|
||||
auto pred = [](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); };
|
||||
auto found = std::search(haystack.begin(), haystack.end(), needle.begin(), needle.end(), pred);
|
||||
return found != haystack.end();
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
return path_ != other.path_ || type_ != other.type_;
|
||||
}
|
||||
|
||||
bool FilePathContainsNoCase(const std::string &needle) const;
|
||||
bool FilePathContainsNoCase(std::string_view needle) const;
|
||||
|
||||
bool StartsWith(const Path &other) const;
|
||||
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (!tempImage_->LoadTextureLevels(buffer, fileSize, type_)) {
|
||||
if (!tempImage_->LoadTextureLevelsFromFileData(buffer, fileSize, type_)) {
|
||||
*state_ = ManagedTexture::LoadState::FAILED;
|
||||
waitable_->Notify();
|
||||
return;
|
||||
@ -85,7 +85,7 @@ static ImageFileType DetectImageFileType(const uint8_t *data, size_t size) {
|
||||
}
|
||||
}
|
||||
|
||||
bool TempImage::LoadTextureLevels(const uint8_t *data, size_t size, ImageFileType typeSuggestion) {
|
||||
bool TempImage::LoadTextureLevelsFromFileData(const uint8_t *data, size_t size, ImageFileType typeSuggestion) {
|
||||
if (typeSuggestion == ImageFileType::DETECT) {
|
||||
typeSuggestion = DetectImageFileType(data, size);
|
||||
}
|
||||
@ -166,7 +166,7 @@ Draw::Texture *CreateTextureFromTempImage(Draw::DrawContext *draw, const TempIma
|
||||
|
||||
Draw::Texture *CreateTextureFromFileData(Draw::DrawContext *draw, const uint8_t *data, size_t dataSize, ImageFileType type, bool generateMips, const char *name) {
|
||||
TempImage image;
|
||||
if (!image.LoadTextureLevels(data, dataSize, type)) {
|
||||
if (!image.LoadTextureLevelsFromFileData(data, dataSize, type)) {
|
||||
return nullptr;
|
||||
}
|
||||
Draw::Texture *texture = CreateTextureFromTempImage(draw, image, generateMips, name);
|
||||
|
@ -32,7 +32,7 @@ struct TempImage {
|
||||
int height[16]{};
|
||||
int numLevels = 0;
|
||||
|
||||
bool LoadTextureLevels(const uint8_t *data, size_t size, ImageFileType typeSuggestion = ImageFileType::DETECT);
|
||||
bool LoadTextureLevelsFromFileData(const uint8_t *data, size_t size, ImageFileType typeSuggestion = ImageFileType::DETECT);
|
||||
void Free() {
|
||||
if (levels[0]) {
|
||||
free(levels[0]);
|
||||
@ -79,3 +79,4 @@ private:
|
||||
|
||||
Draw::Texture *CreateTextureFromFileData(Draw::DrawContext *draw, const uint8_t *data, size_t dataSize, ImageFileType type, bool generateMips, const char *name);
|
||||
Draw::Texture *CreateTextureFromFile(Draw::DrawContext *draw, const char *filename, ImageFileType type, bool generateMips);
|
||||
Draw::Texture *CreateTextureFromTempImage(Draw::DrawContext *draw, const TempImage &image, bool generateMips, const char *name);
|
||||
|
@ -166,6 +166,15 @@ PopupSliderChoice::PopupSliderChoice(int *value, int minValue, int maxValue, int
|
||||
OnClick.Handle(this, &PopupSliderChoice::HandleClick);
|
||||
}
|
||||
|
||||
void PopupSliderChoice::SetFormat(std::string_view fmt) {
|
||||
fmt_ = fmt;
|
||||
if (units_.empty()) {
|
||||
if (startsWith(fmt_, "%d ")) {
|
||||
units_ = fmt_.substr(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PopupSliderChoiceFloat::PopupSliderChoiceFloat(float *value, float minValue, float maxValue, float defaultValue, const std::string &text, ScreenManager *screenManager, const std::string &units, LayoutParams *layoutParams)
|
||||
: AbstractChoiceWithValueDisplay(text, layoutParams), value_(value), minValue_(minValue), maxValue_(maxValue), defaultValue_(defaultValue), step_(1.0f), units_(units), screenManager_(screenManager) {
|
||||
_dbg_assert_(maxValue > minValue);
|
||||
@ -181,6 +190,15 @@ PopupSliderChoiceFloat::PopupSliderChoiceFloat(float *value, float minValue, flo
|
||||
OnClick.Handle(this, &PopupSliderChoiceFloat::HandleClick);
|
||||
}
|
||||
|
||||
void PopupSliderChoiceFloat::SetFormat(std::string_view fmt) {
|
||||
fmt_ = fmt;
|
||||
if (units_.empty()) {
|
||||
if (startsWith(fmt_, "%f ")) {
|
||||
units_ = fmt_.substr(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EventReturn PopupSliderChoice::HandleClick(EventParams &e) {
|
||||
restoreFocus_ = HasFocus();
|
||||
|
||||
|
@ -285,9 +285,7 @@ public:
|
||||
PopupSliderChoice(int *value, int minValue, int maxValue, int defaultValue, const std::string &text, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
PopupSliderChoice(int *value, int minValue, int maxValue, int defaultValue, const std::string &text, int step, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
|
||||
void SetFormat(const char *fmt) {
|
||||
fmt_ = fmt;
|
||||
}
|
||||
void SetFormat(std::string_view fmt);
|
||||
void SetZeroLabel(const std::string &str) {
|
||||
zeroLabel_ = str;
|
||||
}
|
||||
@ -322,9 +320,7 @@ public:
|
||||
PopupSliderChoiceFloat(float *value, float minValue, float maxValue, float defaultValue, const std::string &text, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
PopupSliderChoiceFloat(float *value, float minValue, float maxValue, float defaultValue, const std::string &text, float step, ScreenManager *screenManager, const std::string &units = "", LayoutParams *layoutParams = 0);
|
||||
|
||||
void SetFormat(const char *fmt) {
|
||||
fmt_ = fmt;
|
||||
}
|
||||
void SetFormat(std::string_view fmt);
|
||||
void SetZeroLabel(const std::string &str) {
|
||||
zeroLabel_ = str;
|
||||
}
|
||||
|
@ -1657,4 +1657,11 @@ void SliderFloat::GetContentDimensions(const UIContext &dc, float &w, float &h)
|
||||
h = 50;
|
||||
}
|
||||
|
||||
void Spacer::Draw(UIContext &dc) {
|
||||
View::Draw(dc);
|
||||
if (drawAsSeparator_) {
|
||||
dc.FillRect(UI::Drawable(dc.theme->itemDownStyle.background.color), bounds_);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -950,11 +950,13 @@ public:
|
||||
h = size_;
|
||||
}
|
||||
|
||||
void Draw(UIContext &dc) override {}
|
||||
void Draw(UIContext &dc) override;
|
||||
std::string DescribeText() const override { return ""; }
|
||||
void SetSeparator() { drawAsSeparator_ = true; }
|
||||
|
||||
private:
|
||||
float size_ = 0.0f;
|
||||
bool drawAsSeparator_ = false;
|
||||
};
|
||||
|
||||
class BorderView : public InertView {
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "Common/UI/Tween.h"
|
||||
#include "Common/UI/Root.h"
|
||||
#include "Common/UI/View.h"
|
||||
#include "Common/UI/UIScreen.h"
|
||||
#include "Common/UI/ViewGroup.h"
|
||||
#include "Common/Render/DrawBuffer.h"
|
||||
|
||||
@ -949,16 +950,29 @@ TabHolder::TabHolder(Orientation orientation, float stripSize, LayoutParams *lay
|
||||
tabScroll_->Add(tabStrip_);
|
||||
Add(tabScroll_);
|
||||
} else {
|
||||
tabStrip_ = new ChoiceStrip(orientation, new LayoutParams(stripSize, WRAP_CONTENT));
|
||||
tabContainer_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(stripSize, FILL_PARENT));
|
||||
tabStrip_ = new ChoiceStrip(orientation, new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
tabStrip_->SetTopTabs(true);
|
||||
Add(tabStrip_);
|
||||
tabScroll_ = new ScrollView(orientation, new LinearLayoutParams(1.0f));
|
||||
tabScroll_->Add(tabStrip_);
|
||||
tabContainer_->Add(tabScroll_);
|
||||
Add(tabContainer_);
|
||||
}
|
||||
tabStrip_->OnChoice.Handle(this, &TabHolder::OnTabClick);
|
||||
|
||||
Add(new Spacer(4.0f))->SetSeparator();
|
||||
|
||||
contents_ = new AnchorLayout(new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
|
||||
Add(contents_)->SetClip(true);
|
||||
}
|
||||
|
||||
void TabHolder::AddBack(UIScreen *parent) {
|
||||
if (tabContainer_) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
tabContainer_->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 0.0f, Margins(0, 0, 10, 10))))->OnClick.Handle<UIScreen>(parent, &UIScreen::OnBack);
|
||||
}
|
||||
}
|
||||
|
||||
void TabHolder::AddTabContents(const std::string &title, View *tabContents) {
|
||||
tabContents->ReplaceLayoutParams(new AnchorLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
tabs_.push_back(tabContents);
|
||||
@ -1149,16 +1163,6 @@ bool ChoiceStrip::Key(const KeyInput &input) {
|
||||
return ret || ViewGroup::Key(input);
|
||||
}
|
||||
|
||||
void ChoiceStrip::Draw(UIContext &dc) {
|
||||
ViewGroup::Draw(dc);
|
||||
if (topTabs_) {
|
||||
if (orientation_ == ORIENT_HORIZONTAL)
|
||||
dc.Draw()->DrawImageCenterTexel(dc.theme->whiteImage, bounds_.x, bounds_.y2() - 4, bounds_.x2(), bounds_.y2(), dc.theme->itemDownStyle.background.color );
|
||||
else if (orientation_ == ORIENT_VERTICAL)
|
||||
dc.Draw()->DrawImageCenterTexel(dc.theme->whiteImage, bounds_.x2() - 4, bounds_.y, bounds_.x2(), bounds_.y2(), dc.theme->itemDownStyle.background.color );
|
||||
}
|
||||
}
|
||||
|
||||
std::string ChoiceStrip::DescribeText() const {
|
||||
auto u = GetI18NCategory(I18NCat::UI_ELEMENTS);
|
||||
return DescribeListUnordered(u->T("Choices:"));
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "Common/Input/GestureDetector.h"
|
||||
#include "Common/UI/View.h"
|
||||
|
||||
class UIScreen;
|
||||
|
||||
namespace UI {
|
||||
|
||||
class AnchorTranslateTween;
|
||||
@ -270,7 +272,6 @@ public:
|
||||
bool Key(const KeyInput &input) override;
|
||||
|
||||
void SetTopTabs(bool tabs) { topTabs_ = tabs; }
|
||||
void Draw(UIContext &dc) override;
|
||||
|
||||
std::string DescribeLog() const override { return "ChoiceStrip: " + View::DescribeLog(); }
|
||||
std::string DescribeText() const override;
|
||||
@ -298,6 +299,8 @@ public:
|
||||
tabStrip_->EnableChoice(tab, enabled);
|
||||
}
|
||||
|
||||
void AddBack(UIScreen *parent);
|
||||
|
||||
void SetCurrentTab(int tab, bool skipTween = false);
|
||||
|
||||
int GetCurrentTab() const { return currentTab_; }
|
||||
@ -309,6 +312,7 @@ private:
|
||||
void AddTabContents(const std::string &title, View *tabContents);
|
||||
EventReturn OnTabClick(EventParams &e);
|
||||
|
||||
LinearLayout *tabContainer_ = nullptr;
|
||||
ChoiceStrip *tabStrip_ = nullptr;
|
||||
ScrollView *tabScroll_ = nullptr;
|
||||
AnchorLayout *contents_ = nullptr;
|
||||
|
@ -213,7 +213,7 @@ static const ConfigSetting generalSettings[] = {
|
||||
ConfigSetting("DisableHTTPS", &g_Config.bDisableHTTPS, false, CfgFlag::DONT_SAVE),
|
||||
ConfigSetting("AutoLoadSaveState", &g_Config.iAutoLoadSaveState, 0, CfgFlag::PER_GAME),
|
||||
ConfigSetting("EnableCheats", &g_Config.bEnableCheats, false, CfgFlag::PER_GAME | CfgFlag::REPORT),
|
||||
ConfigSetting("CwCheatRefreshRate", &g_Config.iCwCheatRefreshRate, 77, CfgFlag::PER_GAME),
|
||||
ConfigSetting("CwCheatRefreshRate", &g_Config.iCwCheatRefreshIntervalMs, 77, CfgFlag::PER_GAME),
|
||||
ConfigSetting("CwCheatScrollPosition", &g_Config.fCwCheatScrollPosition, 0.0f, CfgFlag::PER_GAME),
|
||||
ConfigSetting("GameListScrollPosition", &g_Config.fGameListScrollPosition, 0.0f, CfgFlag::DEFAULT),
|
||||
ConfigSetting("DebugOverlay", &g_Config.iDebugOverlay, 0, CfgFlag::DONT_SAVE),
|
||||
|
@ -237,7 +237,7 @@ public:
|
||||
int iAutoLoadSaveState; // 0 = off, 1 = oldest, 2 = newest, >2 = slot number + 3
|
||||
bool bEnableCheats;
|
||||
bool bReloadCheats;
|
||||
int iCwCheatRefreshRate;
|
||||
int iCwCheatRefreshIntervalMs;
|
||||
float fCwCheatScrollPosition;
|
||||
float fGameListScrollPosition;
|
||||
int iBloomHack; //0 = off, 1 = safe, 2 = balanced, 3 = aggressive
|
||||
|
@ -270,7 +270,7 @@ static void __CheatStart() {
|
||||
}
|
||||
|
||||
static int GetRefreshMs() {
|
||||
int refresh = g_Config.iCwCheatRefreshRate;
|
||||
int refresh = g_Config.iCwCheatRefreshIntervalMs;
|
||||
|
||||
if (!cheatsEnabled)
|
||||
refresh = 1000;
|
||||
|
@ -158,9 +158,9 @@ public:
|
||||
if (referenceIndex == REF_INDEX_MODULE)
|
||||
return __KernelGetCurThreadModuleId();
|
||||
if (referenceIndex == REF_INDEX_USEC)
|
||||
return CoreTiming::GetGlobalTimeUs();
|
||||
return (uint32_t)CoreTiming::GetGlobalTimeUs(); // Loses information
|
||||
if (referenceIndex == REF_INDEX_USEC)
|
||||
return CoreTiming::GetTicks();
|
||||
return (uint32_t)CoreTiming::GetTicks();
|
||||
if ((referenceIndex & ~(REF_INDEX_FPU | REF_INDEX_FPU_INT)) < 32)
|
||||
return cpu->GetRegValue(1, referenceIndex & ~(REF_INDEX_FPU | REF_INDEX_FPU_INT));
|
||||
if ((referenceIndex & ~(REF_INDEX_VFPU | REF_INDEX_VFPU_INT)) < 128)
|
||||
|
@ -119,6 +119,8 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) {
|
||||
bool inJitSpace = MIPSComp::jit && MIPSComp::jit->CodeInRange(codePtr);
|
||||
if (!inJitSpace) {
|
||||
// This is a crash in non-jitted code. Not something we want to handle here, ignore.
|
||||
// Actually, we could handle crashes from the IR interpreter here, although recovering the call stack
|
||||
// might be tricky...
|
||||
inCrashHandler = false;
|
||||
return false;
|
||||
}
|
||||
|
@ -109,7 +109,8 @@ void CwCheatScreen::CreateViews() {
|
||||
leftColumn->Add(new Choice(cw->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile);
|
||||
#endif
|
||||
leftColumn->Add(new Choice(di->T("Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnDisableAll);
|
||||
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, 77, cw->T("Refresh Rate"), 1, screenManager()));
|
||||
leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshIntervalMs, 1, 1000, 77, cw->T("Refresh Interval"), 1, screenManager()))->SetFormat(di->T("%d ms"));
|
||||
|
||||
|
||||
rightScroll_ = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 0.5f));
|
||||
rightScroll_->SetTag("CwCheats");
|
||||
|
@ -360,6 +360,20 @@ static bool ReadFileToString(IFileSystem *fs, const char *filename, std::string
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ReadLocalFileToString(const Path &path, std::string *contents, std::mutex *mtx) {
|
||||
std::string data;
|
||||
if (!File::ReadFileToString(false, path, *contents)) {
|
||||
return false;
|
||||
}
|
||||
if (mtx) {
|
||||
std::lock_guard<std::mutex> lock(*mtx);
|
||||
*contents = std::move(data);
|
||||
} else {
|
||||
*contents = std::move(data);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ReadVFSToString(const char *filename, std::string *contents, std::mutex *mtx) {
|
||||
size_t sz;
|
||||
uint8_t *data = g_VFS.ReadFile(filename, &sz);
|
||||
@ -469,9 +483,9 @@ public:
|
||||
Path screenshot_png = GetSysDirectory(DIRECTORY_SCREENSHOT) / (info_->id + "_00000.png");
|
||||
// Try using png/jpg screenshots first
|
||||
if (File::Exists(screenshot_png))
|
||||
File::ReadFileToString(false, screenshot_png, info_->icon.data);
|
||||
ReadLocalFileToString(screenshot_png, &info_->icon.data, &info_->lock);
|
||||
else if (File::Exists(screenshot_jpg))
|
||||
File::ReadFileToString(false, screenshot_jpg, info_->icon.data);
|
||||
ReadLocalFileToString(screenshot_jpg, &info_->icon.data, &info_->lock);
|
||||
else
|
||||
// Read standard icon
|
||||
ReadVFSToString("unknown.png", &info_->icon.data, &info_->lock);
|
||||
@ -522,9 +536,9 @@ handleELF:
|
||||
Path screenshot_png = GetSysDirectory(DIRECTORY_SCREENSHOT) / (info_->id + "_00000.png");
|
||||
// Try using png/jpg screenshots first
|
||||
if (File::Exists(screenshot_png)) {
|
||||
File::ReadFileToString(false, screenshot_png, info_->icon.data);
|
||||
ReadLocalFileToString(screenshot_png, &info_->icon.data, &info_->lock);
|
||||
} else if (File::Exists(screenshot_jpg)) {
|
||||
File::ReadFileToString(false, screenshot_jpg, info_->icon.data);
|
||||
ReadLocalFileToString(screenshot_jpg, &info_->icon.data, &info_->lock);
|
||||
} else {
|
||||
// Read standard icon
|
||||
VERBOSE_LOG(LOADER, "Loading unknown.png because there was an ELF");
|
||||
@ -557,36 +571,38 @@ handleELF:
|
||||
}
|
||||
|
||||
case IdentifiedFileType::PPSSPP_SAVESTATE:
|
||||
{
|
||||
Path screenshotPath;
|
||||
{
|
||||
info_->SetTitle(SaveState::GetTitle(gamePath_));
|
||||
|
||||
std::lock_guard<std::mutex> guard(info_->lock);
|
||||
screenshotPath = gamePath_.WithReplacedExtension(".ppst", ".jpg");
|
||||
}
|
||||
|
||||
// Let's use the screenshot as an icon, too.
|
||||
Path screenshotPath = gamePath_.WithReplacedExtension(".ppst", ".jpg");
|
||||
if (File::Exists(screenshotPath)) {
|
||||
if (File::ReadFileToString(false, screenshotPath, info_->icon.data)) {
|
||||
if (ReadLocalFileToString(screenshotPath, &info_->icon.data, &info_->lock)) {
|
||||
info_->icon.dataLoaded = true;
|
||||
} else {
|
||||
ERROR_LOG(G3D, "Error loading screenshot data: '%s'", screenshotPath.c_str());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case IdentifiedFileType::PPSSPP_GE_DUMP:
|
||||
{
|
||||
Path screenshotPath;
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(info_->lock);
|
||||
screenshotPath = gamePath_.WithReplacedExtension(".ppdmp", ".png");
|
||||
}
|
||||
|
||||
// Let's use the comparison screenshot as an icon, if it exists.
|
||||
Path screenshotPath = gamePath_.WithReplacedExtension(".ppdmp", ".png");
|
||||
if (File::Exists(screenshotPath)) {
|
||||
if (File::ReadFileToString(false, screenshotPath, info_->icon.data)) {
|
||||
if (ReadLocalFileToString(screenshotPath, &info_->icon.data, &info_->lock)) {
|
||||
info_->icon.dataLoaded = true;
|
||||
} else {
|
||||
ERROR_LOG(G3D, "Error loading screenshot data: '%s'", screenshotPath.c_str());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -658,9 +674,9 @@ handleELF:
|
||||
Path screenshot_png = GetSysDirectory(DIRECTORY_SCREENSHOT) / (info_->id + "_00000.png");
|
||||
// Try using png/jpg screenshots first
|
||||
if (File::Exists(screenshot_png))
|
||||
info_->icon.dataLoaded = File::ReadFileToString(false, screenshot_png, info_->icon.data);
|
||||
info_->icon.dataLoaded = ReadLocalFileToString(screenshot_png, &info_->icon.data, &info_->lock);
|
||||
else if (File::Exists(screenshot_jpg))
|
||||
info_->icon.dataLoaded = File::ReadFileToString(false, screenshot_jpg, info_->icon.data);
|
||||
info_->icon.dataLoaded = ReadLocalFileToString(screenshot_jpg, &info_->icon.data, &info_->lock);
|
||||
else {
|
||||
DEBUG_LOG(LOADER, "Loading unknown.png because no icon was found");
|
||||
info_->icon.dataLoaded = ReadVFSToString("unknown.png", &info_->icon.data, &info_->lock);
|
||||
@ -842,6 +858,8 @@ void GameInfoCache::SetupTexture(std::shared_ptr<GameInfo> &info, Draw::DrawCont
|
||||
using namespace Draw;
|
||||
if (tex.data.size()) {
|
||||
if (!tex.texture) {
|
||||
// TODO: Use TempImage to semi-load the image in the worker task, then here we
|
||||
// could just call CreateTextureFromTempImage.
|
||||
tex.texture = CreateTextureFromFileData(thin3d, (const uint8_t *)tex.data.data(), (int)tex.data.size(), ImageFileType::DETECT, false, info->GetTitle().c_str());
|
||||
if (tex.texture) {
|
||||
tex.timeLoaded = time_now_d();
|
||||
|
@ -832,7 +832,7 @@ UI::EventReturn CreditsScreen::OnSupport(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn CreditsScreen::OnTwitter(UI::EventParams &e) {
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://twitter.com/#!/PPSSPP_emu");
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://twitter.com/PPSSPP_emu");
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,8 @@ void TabbedUIDialogScreenWithGameBackground::CreateViews() {
|
||||
root_->Add(verticalLayout);
|
||||
} else {
|
||||
tabHolder_ = new TabHolder(ORIENT_VERTICAL, 200, new AnchorLayoutParams(10, 0, 10, 0, false));
|
||||
tabHolder_->AddBack(this);
|
||||
root_->Add(tabHolder_);
|
||||
AddStandardBack(root_);
|
||||
}
|
||||
tabHolder_->SetTag(tag()); // take the tag from the screen.
|
||||
root_->SetDefaultFocusView(tabHolder_);
|
||||
|
@ -183,7 +183,7 @@ Cheats = الشفرات
|
||||
Edit Cheat File = عدل ملف الشفرة
|
||||
Import Cheats = إستورد من cheat.db
|
||||
Import from %s = إستورد من %s
|
||||
Refresh Rate = معدل التحديث
|
||||
Refresh interval = معدل التحديث
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Чийтове
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Внеси от cheat.db
|
||||
Import from %s = Внеси от %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Trucs
|
||||
Edit Cheat File = Editar el fitxer de trucs
|
||||
Import Cheats = Importar «cheat.db»
|
||||
Import from %s = Importar %s
|
||||
Refresh Rate = Freqüència de refrescament
|
||||
Refresh interval = Freqüència de refrescament
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheaty
|
||||
Edit Cheat File = Upravit soubor s cheaty
|
||||
Import Cheats = Importovat z cheat.db
|
||||
Import from %s = Importovat z %s
|
||||
Refresh Rate = Frekvence obnoveni
|
||||
Refresh interval = Frekvence obnoveni
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Snyd
|
||||
Edit Cheat File = Editer snydefil
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Importer fra %s
|
||||
Refresh Rate = Opdateringsrate
|
||||
Refresh interval = Opdateringsinterval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Cheatdatei ändern
|
||||
Import Cheats = Cheats importieren (aus cheat.db)
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Wiederholfrequenz
|
||||
Refresh interval = Wiederholfrequenz
|
||||
|
||||
[DesktopUI]
|
||||
# Wenn ihre Sprache nicht gut mit dem normalen Font angezeigt wird, können sie dieses Font mit dem Font ändern.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheat
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Patamanni cheat.db
|
||||
Import from %s = Patamanni %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -199,7 +199,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Trucos
|
||||
Edit Cheat File = Editar archivo de trucos
|
||||
Import Cheats = Importar archivo cheat.db
|
||||
Import from %s = Importar de %s
|
||||
Refresh Rate = Frecuencia de actualización
|
||||
Refresh interval = Frecuencia de actualización
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = trucos
|
||||
Edit Cheat File = Editar archivo de trucos
|
||||
Import Cheats = Importar archivo cheat.db
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Frecuencia de actualización
|
||||
Refresh interval = Frecuencia de actualización
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = کد های تقلب
|
||||
Edit Cheat File = ویرایش فایل کد ها
|
||||
Import Cheats = cheat.db وارد کردن از
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = بازیابی نرخ
|
||||
Refresh interval = بازیابی نرخ
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Huijaukset
|
||||
Edit Cheat File = Muokkaa huijaus tiedostoa
|
||||
Import Cheats = Tuo huijauksia
|
||||
Import from %s = %s
|
||||
Refresh Rate = Ruudunpäivitysnopeus
|
||||
Refresh interval = Ruudunpäivitysnopeus
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Codes de triche
|
||||
Edit Cheat File = Modifier le fichier de triche
|
||||
Import Cheats = Importer des codes de triche
|
||||
Import from %s = Importer de %s
|
||||
Refresh Rate = Taux de rafraîchissement
|
||||
Refresh interval = Taux de rafraîchissement
|
||||
|
||||
[DesktopUI]
|
||||
# PPSSPP peut utiliser n'importe quelle police installée sur votre système.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Trucos
|
||||
Edit Cheat File = Editar arquivo de trucos
|
||||
Import Cheats = Importar cheat.db
|
||||
Import from %s = Importar %s
|
||||
Refresh Rate = Frecuencia de actualización
|
||||
Refresh interval = Frecuencia de actualización
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Κωδικοί
|
||||
Edit Cheat File = Επεξεργασία αρχείου κωδικών
|
||||
Import Cheats = Εισαγωγή από cheat.db
|
||||
Import from %s = Εισαγωγή από %s
|
||||
Refresh Rate = Ρυθμός ανανέωσης
|
||||
Refresh interval = Ρυθμός ανανέωσης
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Šifre
|
||||
Edit Cheat File = Izmijeni cheat datoteku
|
||||
Import Cheats = Uvezi iz cheat.db
|
||||
Import from %s = Uvezi iz %s
|
||||
Refresh Rate = Brzina osvježavanja
|
||||
Refresh interval = Brzina osvježavanja
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Csalások
|
||||
Edit Cheat File = Csalás fájl szerkesztése
|
||||
Import Cheats = Importálás cheat.db-ből
|
||||
Import from %s = Importálás %s-ből
|
||||
Refresh Rate = Frissítési gyakoriság
|
||||
Refresh interval = Frissítési gyakoriság
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Pengecoh
|
||||
Edit Cheat File = Edit berkas pengecoh
|
||||
Import Cheats = Impor dari cheat.db
|
||||
Import from %s = Impor dari %s
|
||||
Refresh Rate = Perbarui penyegaran
|
||||
Refresh interval = Perbarui penyegaran
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Trucchi
|
||||
Edit Cheat File = Modifica file Trucchi
|
||||
Import Cheats = Importa da cheat.db
|
||||
Import from %s = Importa da %s
|
||||
Refresh Rate = Frequenza di Aggiornamento
|
||||
Refresh interval = Frequenza di Aggiornamento
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = チート
|
||||
Edit Cheat File = チートファイルを編集する
|
||||
Import Cheats = cheat.dbからインポートする
|
||||
Import from %s = %sからインポートする
|
||||
Refresh Rate = リフレッシュレート
|
||||
Refresh interval = リフレッシュレート
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Mbeling
|
||||
Edit Cheat File = Sunting berkas mbeling
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Njokot soko %s
|
||||
Refresh Rate = Restar rate
|
||||
Refresh interval = Restar rate
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = 치트
|
||||
Edit Cheat File = 치트 파일 수정
|
||||
Import Cheats = cheat.db에서 가져오기
|
||||
Import from %s = %s에서 가져오기
|
||||
Refresh Rate = 주사율
|
||||
Refresh interval = 주사율
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = ການໃຊ້ສູດໂກງ
|
||||
Edit Cheat File = ປັບແຕ່ງໄຟລ໌ສູດໂກງ
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = ນຳເຂົ້າຈາກໄຟລ໌ສູດໂກງ %s
|
||||
Refresh Rate = ອັດຕາການຟື້ນຟູ
|
||||
Refresh interval = ອັດຕາການຟື້ນຟູ
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Kodai
|
||||
Edit Cheat File = Redaguoti kodų failą
|
||||
Import Cheats = Importuoti iš cheat.db
|
||||
Import from %s = Importuoti iš %s
|
||||
Refresh Rate = Atsinaujinimo dažnis
|
||||
Refresh interval = Atsinaujinimo dažnis
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheat
|
||||
Edit Cheat File = Ubah cheat file
|
||||
Import Cheats = Import dari cheat.db
|
||||
Import from %s = Import dari %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Cheatbestand bewerken
|
||||
Import Cheats = Importeren van cheat.db
|
||||
Import from %s = Importeren van %s
|
||||
Refresh Rate = Vernieuwingsfrequentie
|
||||
Refresh interval = Vernieuwingsfrequentie
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Edit cheat file
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Kody
|
||||
Edit Cheat File = Edytuj plik kodów
|
||||
Import Cheats = Importuj z pliku cheat.db
|
||||
Import from %s = Importuj z pliku %s
|
||||
Refresh Rate = Szybkość odświeżania
|
||||
Refresh interval = Szybkość odświeżania
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -199,7 +199,7 @@ Cheats = Trapaças
|
||||
Edit Cheat File = Editar arquivo de trapaças
|
||||
Import Cheats = Importar do cheat.db
|
||||
Import from %s = Importar do %s
|
||||
Refresh Rate = Taxa de atualização
|
||||
Refresh interval = Taxa de atualização
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -199,7 +199,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Editar ficheiro de Cheats
|
||||
Import Cheats = Importar de cheat.db
|
||||
Import from %s = Importar de %s
|
||||
Refresh Rate = Taxa de atualização
|
||||
Refresh interval = Taxa de atualização
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -176,7 +176,7 @@ Edit Cheat File = Editare fișier trișare
|
||||
Import Cheats = Importă din cheat.db
|
||||
#Import %s = Importă din %s
|
||||
Import from %s = Import from %s
|
||||
Refresh Rate = Rată de împrospatare
|
||||
Refresh interval = Rată de împrospatare
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Читы
|
||||
Edit Cheat File = Изменить файл чита
|
||||
Import Cheats = Импортировать из cheat.db
|
||||
Import from %s = Импортировать из %s
|
||||
Refresh Rate = Частота обновления
|
||||
Refresh interval = Частота обновления
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Fusk
|
||||
Edit Cheat File = Redigera fusk-fil
|
||||
Import Cheats = Importera från cheat.db
|
||||
Import from %s = Importera från %s
|
||||
Refresh Rate = Uppdateringsfrekvens
|
||||
Refresh interval = Uppdateringsintervall
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Mga Daya
|
||||
Edit Cheat File = Edit Cheat File
|
||||
Import Cheats = Import from cheat.db
|
||||
Import from %s = Import ang mga daya mula sa %s
|
||||
Refresh Rate = Refresh rate
|
||||
Refresh interval = Refresh interval
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = การใช้สูตรโกง
|
||||
Edit Cheat File = ปรับแต่งไฟล์สูตรโกง
|
||||
Import Cheats = นำเข้าจากไฟล์สูตรโกง
|
||||
Import from %s = นำเข้าจาก %s
|
||||
Refresh Rate = อัตรารีเฟรช
|
||||
Refresh interval = อัตรารีเฟรช
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Hileler
|
||||
Edit Cheat File = Hile dosyasını düzenle
|
||||
Import Cheats = cheat.db'den hile al
|
||||
Import from %s = %s'den hile al
|
||||
Refresh Rate = Yenileme Hızı
|
||||
Refresh interval = Yenileme Hızı
|
||||
|
||||
[DesktopUI]
|
||||
# EN: If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Чит-коди
|
||||
Edit Cheat File = Змінити файл чит-коду
|
||||
Import Cheats = Імпортувати з cheat.db
|
||||
Import from %s = Імпортувати з %s
|
||||
Refresh Rate = Частота оновлення
|
||||
Refresh interval = Частота оновлення
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = Cheats
|
||||
Edit Cheat File = Sửa mục cheat
|
||||
Import Cheats = Nhập mã từ cheat.db
|
||||
Import from %s = Nhập mã từ %s
|
||||
Refresh Rate = Tần số làm mới
|
||||
Refresh interval = Tần số làm mới
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = 金手指
|
||||
Edit Cheat File = 编辑金手指文件
|
||||
Import Cheats = 从cheat.db导入
|
||||
Import from %s = 从%s导入
|
||||
Refresh Rate = 刷新率
|
||||
Refresh interval = 刷新率
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
@ -175,7 +175,7 @@ Cheats = 密技
|
||||
Edit Cheat File = 編輯密技檔案
|
||||
Import Cheats = 從 cheat.db 匯入
|
||||
Import from %s = 從 %s 匯入
|
||||
Refresh Rate = 重新整理速率
|
||||
Refresh interval = 重新整理速率
|
||||
|
||||
[DesktopUI]
|
||||
# If your language does not show well with the default font, you can use Font to specify a different one.
|
||||
|
Loading…
Reference in New Issue
Block a user