mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +00:00
Hide the Discord Rich Presence option on platforms where we don't support it
This commit is contained in:
parent
6b753c1d63
commit
55d110493a
@ -45,6 +45,14 @@ Discord::~Discord() {
|
||||
}
|
||||
}
|
||||
|
||||
bool Discord::IsAvailable() {
|
||||
#ifdef ENABLE_DISCORD
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Discord::IsEnabled() const {
|
||||
return g_Config.bDiscordPresence;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ public:
|
||||
void SetPresenceMenu();
|
||||
void ClearPresence();
|
||||
|
||||
static bool IsAvailable();
|
||||
|
||||
private:
|
||||
void Init();
|
||||
bool IsEnabled() const;
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include "UI/Theme.h"
|
||||
#include "UI/RetroAchievementScreens.h"
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
#include "UI/DiscordIntegration.h"
|
||||
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/File/AndroidContentURI.h"
|
||||
@ -915,7 +916,10 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti
|
||||
wlanChannelChoice->HideChoice(i + 2);
|
||||
wlanChannelChoice->HideChoice(i + 7);
|
||||
}
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bDiscordPresence, n->T("Send Discord Presence information")));
|
||||
|
||||
if (Discord::IsAvailable()) {
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bDiscordPresence, n->T("Send Discord Presence information")));
|
||||
}
|
||||
|
||||
networkingSettings->Add(new ItemHeader(n->T("AdHoc Server")));
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bEnableAdhocServer, n->T("Enable built-in PRO Adhoc Server", "Enable built-in PRO Adhoc Server")));
|
||||
|
Loading…
Reference in New Issue
Block a user