diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 8433bd213c..5ec9baf3bf 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -527,11 +527,14 @@ void CreditsScreen::CreateViews() { back->OnClick.Handle(this, &CreditsScreen::OnOK); root_->SetDefaultFocusView(back); if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { - root_->Add(new Button(cr->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); + root_->Add(new Button(cr->T("Buy Gold"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); } - root_->Add(new Button(cr->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(cr->T("Privacy Policy"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 232, false)))->OnClick.Handle(this, &CreditsScreen::OnPrivacy); + root_->Add(new Button(cr->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); +#if (PPSSPP_PLATFORM(WINDOWS) || PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(LINUX)) && !PPSSPP_PLATFORM(ANDROID) + root_->Add(new Button(cr->T("Discord"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 232, false)))->OnClick.Handle(this, &CreditsScreen::OnDiscord); +#endif + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); + root_->Add(new Button(cr->T("Privacy Policy"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnPrivacy); #ifdef __ANDROID__ root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnShare); root_->Add(new Button(cr->T("Twitter @PPSSPP_emu"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnTwitter); @@ -576,6 +579,11 @@ UI::EventReturn CreditsScreen::OnForums(UI::EventParams &e) { return UI::EVENT_DONE; } +UI::EventReturn CreditsScreen::OnDiscord(UI::EventParams &e) { + LaunchBrowser("https://discord.gg/5NJB6dD"); + return UI::EVENT_DONE; +} + UI::EventReturn CreditsScreen::OnShare(UI::EventParams &e) { I18NCategory *cr = GetI18NCategory("PSPCredits"); System_SendMessage("sharetext", cr->T("CheckOutPPSSPP", "Check out PPSSPP, the awesome PSP emulator: http://www.ppsspp.org/")); diff --git a/UI/MiscScreens.h b/UI/MiscScreens.h index 4c08772a0a..34b0e0f40b 100644 --- a/UI/MiscScreens.h +++ b/UI/MiscScreens.h @@ -144,6 +144,7 @@ private: UI::EventReturn OnPPSSPPOrg(UI::EventParams &e); UI::EventReturn OnPrivacy(UI::EventParams &e); UI::EventReturn OnForums(UI::EventParams &e); + UI::EventReturn OnDiscord(UI::EventParams &e); UI::EventReturn OnShare(UI::EventParams &e); UI::EventReturn OnTwitter(UI::EventParams &e); diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 0999a47c7e..5a241f7553 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -144,6 +144,7 @@ namespace MainWindow { const std::wstring visitForum = ConvertUTF8ToWString(des->T("PPSSPP Forums")); const std::wstring buyGold = ConvertUTF8ToWString(des->T("Buy Gold")); const std::wstring gitHub = ConvertUTF8ToWString(des->T("GitHub")); + const std::wstring discord = ConvertUTF8ToWString(des->T("Discord")); const std::wstring aboutPPSSPP = ConvertUTF8ToWString(des->T("About PPSSPP...")); // Simply remove the old help menu and create a new one. @@ -157,6 +158,7 @@ namespace MainWindow { // Repeat the process for other languages, if necessary. AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_BUYGOLD, buyGold.c_str()); AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_GITHUB, gitHub.c_str()); + AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_DISCORD, discord.c_str()); AppendMenu(helpMenu, MF_SEPARATOR, 0, 0); AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_ABOUT, aboutPPSSPP.c_str()); } @@ -1008,6 +1010,10 @@ namespace MainWindow { ShellExecute(NULL, L"open", L"https://github.com/hrydgard/ppsspp/", NULL, NULL, SW_SHOWNORMAL); break; + case ID_HELP_DISCORD: + ShellExecute(NULL, L"open", L"https://discord.gg/5NJB6dD", NULL, NULL, SW_SHOWNORMAL); + break; + case ID_HELP_ABOUT: DialogManager::EnableAll(FALSE); DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); diff --git a/Windows/resource.h b/Windows/resource.h index 06b23bde50..9c3c1a7b38 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -340,6 +340,7 @@ #define ID_OPTIONS_WINDOW9X 40175 #define ID_OPTIONS_WINDOW10X 40176 #define ID_EMULATION_PAUSE 40177 +#define ID_HELP_DISCORD 40178 // Dummy option to let the buffered rendering hotkey cycle through all the options. #define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500