From 598e06faa86899dc264b3e0a5f73def3a1a55f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 21 Oct 2013 12:21:22 +0200 Subject: [PATCH] Make Home in the game browser available on linux/mac/etc too. Misc tweaks. --- Core/MIPS/x86/Asm.cpp | 12 +++++------ UI/MainScreen.cpp | 13 ++++++------ UI/MiscScreens.cpp | 47 ++++++++++--------------------------------- 3 files changed, 24 insertions(+), 48 deletions(-) diff --git a/Core/MIPS/x86/Asm.cpp b/Core/MIPS/x86/Asm.cpp index bf535db911..6a94931954 100644 --- a/Core/MIPS/x86/Asm.cpp +++ b/Core/MIPS/x86/Asm.cpp @@ -15,21 +15,21 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ +#include "math/math_util.h" + #include "ABI.h" #include "x64Emitter.h" -#include "../../MemMap.h" - #include "Core/Core.h" +#include "Core/MemMap.h" #include "Core/System.h" #include "Core/MIPS/MIPS.h" #include "Core/CoreTiming.h" #include "Common/MemoryUtil.h" -#include "Jit.h" -#include "../JitCommon/JitCommon.h" -#include "../../Core.h" -#include "Asm.h" +#include "Core/MIPS/JitCommon/JitCommon.h" +#include "Core/MIPS/x86/Asm.h" +#include "Core/MIPS/x86/Jit.h" using namespace Gen; diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 536247bc5b..34e6e5bb62 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -212,7 +212,6 @@ public: void SetPath(const std::string &path); void GetListing(std::vector &fileInfo, const char *filter = 0); - void Navigate(const std::string &path); std::string GetPath() { @@ -237,7 +236,7 @@ public: }; // Normalize slashes. -void PathBrowser::SetPath(const std::string &path) { +void PathBrowser::SetPath(const std::string &path) { if (path[0] == '!') { path_ = path; return; @@ -305,7 +304,7 @@ public: UI::Event OnChoice; UI::Event OnHoldChoice; - + private: void Refresh(); @@ -358,6 +357,8 @@ UI::EventReturn GameBrowser::HomeClick(UI::EventParams &e) { if (!folder.size()) return UI::EVENT_DONE; path_.SetPath(folder); +#else + path_.SetPath(getenv("HOME")); #endif g_Config.currentDirectory = path_.GetPath(); @@ -378,10 +379,10 @@ void GameBrowser::Refresh() { LinearLayout *topBar = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); Margins pathMargins(5, 0); topBar->Add(new TextView(path_.GetFriendlyPath().c_str(), ALIGN_VCENTER, 0.7f, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 1.0f, pathMargins))); -#ifdef ANDROID - topBar->Add(new Choice(m->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick); -#elif defined(_WIN32) +#if defined(_WIN32) topBar->Add(new Choice(m->T("Browse", "Browse...")))->OnClick.Handle(this, &GameBrowser::HomeClick); +#else + topBar->Add(new Choice(m->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick); #endif ChoiceStrip *layoutChoice = topBar->Add(new ChoiceStrip(ORIENT_HORIZONTAL)); layoutChoice->AddChoice(I_GRID); diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 36f08ebf98..7043071557 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -313,7 +313,7 @@ void LogoScreen::render() { if (bootFilename_.size()) { ui_draw2d.DrawTextShadow(UBUNTU24, bootFilename_.c_str(), dp_xres / 2, dp_yres / 2 + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); } - + dc.End(); dc.Flush(); } @@ -328,14 +328,14 @@ void CreditsScreen::CreateViews() { #ifndef GOLD root_->Add(new Button(c->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); #endif - if(g_Config.sLanguageIni == "zh_CN" ||g_Config.sLanguageIni == "zh_TW") { - root_->Add(new Button(c->T("PPSSPP Chinese Forum"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnChineseForum); - root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); - root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 228, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); + if (g_Config.sLanguageIni == "zh_CN" ||g_Config.sLanguageIni == "zh_TW") { + root_->Add(new Button(c->T("PPSSPP Chinese Forum"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnChineseForum); + root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 228, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); } else { - root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); - root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); + root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); } #ifdef GOLD root_->Add(new ImageView(I_ICONGOLD, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); @@ -390,12 +390,11 @@ void CreditsScreen::render() { const char * credits[] = { "PPSSPP", "", - c->T("title", "A fast and portable PSP emulator"), + c->T("title", "A fast and portable PSP emulator"), "", "", c->T("created", "Created by"), "Henrik Rydg\xc3\xa5rd", - "(aka hrydgard, ector)", "", "", c->T("contributors", "Contributors:"), @@ -436,7 +435,8 @@ void CreditsScreen::render() { c->T("specialthanks", "Special thanks to:"), "Keith Galocy at nVidia (hw, advice)", "Orphis (build server)", - "angelxwind (iOS build server)", + "angelxwind (iOS builds)", + "W.MS (iOS builds)", "solarmystic (testing)", "all the forum mods", "", @@ -478,11 +478,10 @@ void CreditsScreen::render() { "", "", c->T("info1", "PPSSPP is only intended to play games you own."), - "", c->T("info2", "Please make sure that you own the rights to any games"), c->T("info3", "you play by owning the UMD or by buying the digital"), c->T("info4", "download from the PSN store on your real PSP."), - "", + "", "", c->T("info5", "PSP is a trademark by Sony, Inc."), }; @@ -509,30 +508,6 @@ void CreditsScreen::render() { y += itemHeight; } - /* - I18NCategory *c = GetI18NCategory("PSPCredits"); - I18NCategory *d = GetI18NCategory("Dialog"); - - if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), 200, 0, d->T("Back"), ALIGN_BOTTOMRIGHT)) { - screenManager()->finishDialog(this, DR_OK); - } - -#ifdef ANDROID -#ifndef GOLD - if (UIButton(GEN_ID, Pos(10, dp_yres - 10), 300, 0, c->T("Buy PPSSPP Gold"), ALIGN_BOTTOMLEFT)) { - LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); - } -#endif -#else -#ifndef GOLD - if (UIButton(GEN_ID, Pos(10, dp_yres - 10), 300, 0, c->T("Buy PPSSPP Gold"), ALIGN_BOTTOMLEFT)) { - LaunchBrowser("http://central.ppsspp.org/buygold"); - } -#endif -#endif - UIEnd(); - */ - dc.End(); dc.Flush(); }