Update URLs, fix feedback from #16851

This commit is contained in:
Henrik Rydgård 2023-01-29 00:25:00 +01:00
parent f7d9f6d0e8
commit 4287365411
10 changed files with 28 additions and 25 deletions

View File

@ -871,9 +871,8 @@ public:
: CheckBox(nullptr, text, smallText, layoutParams), bitfield_(bitfield), bit_(bit) {
}
BitCheckBox(int *bitfield, int bit, const std::string &text, const std::string &smallText = "", LayoutParams *layoutParams = nullptr) : BitCheckBox((uint32_t *)bitfield, (uint32_t)bit, text, smallText, layoutParams) {
}
BitCheckBox(int *bitfield, int bit, const std::string &text, const std::string &smallText = "", LayoutParams *layoutParams = nullptr) : BitCheckBox((uint32_t *)bitfield, (uint32_t)bit, text, smallText, layoutParams) {}
void Toggle() override;
bool Toggled() const override;

View File

@ -31,12 +31,6 @@ extern const char *PPSSPP_GIT_VERSION;
extern bool jitForcedOff;
// should this be here?!
// for Config.iShowStatusFlags
#define STATUS_SHOW_FPS_COUNTER (1 << 1)
#define STATUS_SHOW_SPEED_COUNTER (1 << 2)
#define STATUS_SHOW_BATTERY_PERCENT (1 << 3)
enum ChatPositions {
BOTTOM_LEFT = 0,
BOTTOM_CENTER = 1,
@ -276,7 +270,7 @@ public:
// UI
bool bShowDebuggerOnLoad;
int iShowStatusFlags; // Should we rename this now?
int iShowStatusFlags;
bool bShowRegionOnGameIcon;
bool bShowIDOnGameIcon;
float fGameGridScale;

View File

@ -22,6 +22,7 @@
#ifndef _MSC_VER
#include <strings.h>
#endif
#include "Common/Common.h"
#include "Common/CommonFuncs.h"
const int PSP_MODEL_FAT = 0;
@ -129,3 +130,10 @@ enum class AnalogFpsMode {
MAPPED_DIRECTION = 1,
MAPPED_DIR_TO_OPPOSITE_DIR = 2,
};
// for Config.iShowStatusFlags
enum class ShowStatusFlags {
FPS_COUNTER = 1 << 1,
SPEED_COUNTER = 1 << 2,
BATTERY_PERCENT = 1 << 3,
};

View File

@ -423,7 +423,7 @@ void MainWindow::forumAct()
void MainWindow::goldAct()
{
QDesktopServices::openUrl(QUrl("https://central.ppsspp.org/buygold"));
QDesktopServices::openUrl(QUrl("https://www.ppsspp.org/buygold"));
}
void MainWindow::gitAct()

View File

@ -1310,16 +1310,16 @@ static void DrawFPS(UIContext *ctx, const Bounds &bounds) {
float vps, fps, actual_fps;
__DisplayGetFPS(&vps, &fps, &actual_fps);
char fpsbuf[256] = {""};
if (g_Config.iShowStatusFlags & STATUS_SHOW_FPS_COUNTER) {
if (g_Config.iShowStatusFlags & (int)ShowStatusFlags::FPS_COUNTER) {
snprintf(fpsbuf, sizeof(fpsbuf), "%s FPS: %0.1f", fpsbuf, actual_fps);
}
if (g_Config.iShowStatusFlags & STATUS_SHOW_SPEED_COUNTER) {
if (g_Config.iShowStatusFlags & (int)ShowStatusFlags::SPEED_COUNTER) {
snprintf(fpsbuf, sizeof(fpsbuf), "%s Speed: %0.1f%%", fpsbuf, vps / (59.94f / 100.0f));
}
#ifdef CAN_DISPLAY_CURRENT_BATTERY_CAPACITY
if (g_Config.iShowStatusFlags & STATUS_SHOW_BATTERY_PERCENT) {
if (g_Config.iShowStatusFlags & (int)ShowStatusFlags::BATTERY_PERCENT) {
snprintf(fpsbuf, sizeof(fpsbuf), "%s Battery: %d%%", fpsbuf, getCurrentBatteryCapacity());
}
#endif

View File

@ -564,12 +564,12 @@ void GameSettingsScreen::CreateViews() {
});
graphicsSettings->Add(new ItemHeader(gr->T("Overlay Information")));
graphicsSettings->Add(new BitCheckBox(&g_Config.iShowStatusFlags, STATUS_SHOW_FPS_COUNTER, gr->T("Show FPS Counter")));
graphicsSettings->Add(new BitCheckBox(&g_Config.iShowStatusFlags, STATUS_SHOW_SPEED_COUNTER, gr->T("Show Speed")));
graphicsSettings->Add(new BitCheckBox(&g_Config.iShowStatusFlags, (int)ShowStatusFlags::FPS_COUNTER, gr->T("Show FPS Counter")));
graphicsSettings->Add(new BitCheckBox(&g_Config.iShowStatusFlags, (int)ShowStatusFlags::SPEED_COUNTER, gr->T("Show Speed")));
#ifdef CAN_DISPLAY_CURRENT_BATTERY_CAPACITY
graphicsSettings->Add(new BitCheckBox(&g_Config.iShowStatusFlags, STATUS_SHOW_BATTERY_PERCENT, gr->T("Show Battery %")));
graphicsSettings->Add(new BitCheckBox(&g_Config.iShowStatusFlags, (int)ShowStatusFlags::BATTERY_PERCENT, gr->T("Show Battery %")));
#endif
graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gr->T("Show Debug Statistics")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
// Audio

View File

@ -1024,10 +1024,10 @@ void MainScreen::CreateViews() {
scrollHomebrew->SetTag("MainScreenHomebrew");
GameBrowser *tabAllGames = new GameBrowser(Path(g_Config.currentDirectory), BrowseFlags::STANDARD, &g_Config.bGridView2, screenManager(),
mm->T("How to get games"), "https://www.ppsspp.org/getgames.html",
mm->T("How to get games"), "https://www.ppsspp.org/getgames",
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
GameBrowser *tabHomebrew = new GameBrowser(GetSysDirectory(DIRECTORY_GAME), BrowseFlags::HOMEBREW_STORE, &g_Config.bGridView3, screenManager(),
mm->T("How to get homebrew & demos", "How to get homebrew && demos"), "https://www.ppsspp.org/gethomebrew.html",
mm->T("How to get homebrew & demos", "How to get homebrew && demos"), "https://www.ppsspp.org/gethomebrew",
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
scrollAllGames_->Add(tabAllGames);
@ -1221,7 +1221,7 @@ UI::EventReturn MainScreen::OnDownloadUpgrade(UI::EventParams &e) {
LaunchBrowser("market://details?id=org.ppsspp.ppsspp");
}
#elif PPSSPP_PLATFORM(WINDOWS)
LaunchBrowser("https://www.ppsspp.org/downloads.html");
LaunchBrowser("https://www.ppsspp.org/download");
#else
// Go directly to ppsspp.org and let the user sort it out
// (for details and in case downloads doesn't have their platform.)
@ -1406,7 +1406,7 @@ UI::EventReturn MainScreen::OnSupport(UI::EventParams &e) {
#ifdef __ANDROID__
LaunchBrowser("market://details?id=org.ppsspp.ppssppgold");
#else
LaunchBrowser("https://central.ppsspp.org/buygold");
LaunchBrowser("https://www.ppsspp.org/buygold");
#endif
return UI::EVENT_DONE;
}

View File

@ -302,6 +302,8 @@ void MemStickScreen::CreateViews() {
}
UI::EventReturn MemStickScreen::OnHelp(UI::EventParams &params) {
// I'm letting the old redirect handle this one, as the target is within /docs on the website,
// and that structure may change a bit.
LaunchBrowser("https://www.ppsspp.org/guide_storage.html");
return UI::EVENT_DONE;

View File

@ -842,7 +842,7 @@ UI::EventReturn CreditsScreen::OnSupport(UI::EventParams &e) {
#ifdef __ANDROID__
LaunchBrowser("market://details?id=org.ppsspp.ppssppgold");
#else
LaunchBrowser("https://central.ppsspp.org/buygold");
LaunchBrowser("https://www.ppsspp.org/buygold");
#endif
return UI::EVENT_DONE;
}
@ -862,7 +862,7 @@ UI::EventReturn CreditsScreen::OnPPSSPPOrg(UI::EventParams &e) {
}
UI::EventReturn CreditsScreen::OnPrivacy(UI::EventParams &e) {
LaunchBrowser("https://www.ppsspp.org/privacy.html");
LaunchBrowser("https://www.ppsspp.org/privacy");
return UI::EVENT_DONE;
}

View File

@ -919,7 +919,7 @@ namespace MainWindow {
break;
case ID_HELP_BUYGOLD:
ShellExecute(NULL, L"open", L"https://central.ppsspp.org/buygold", NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, L"open", L"https://www.ppsspp.org/buygold", NULL, NULL, SW_SHOWNORMAL);
break;
case ID_HELP_OPENFORUM: