diff --git a/Core/Config.cpp b/Core/Config.cpp index 801aa78567..14a8c98c7b 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -209,7 +209,7 @@ static const ConfigSetting generalSettings[] = { ConfigSetting("CheckForNewVersion", &g_Config.bCheckForNewVersion, true, CfgFlag::DEFAULT), ConfigSetting("Language", &g_Config.sLanguageIni, &DefaultLangRegion, CfgFlag::DEFAULT), ConfigSetting("ForceLagSync2", &g_Config.bForceLagSync, false, CfgFlag::PER_GAME), - ConfigSetting("DiscordPresence", &g_Config.bDiscordPresence, true, CfgFlag::DEFAULT), // Or maybe it makes sense to have it per-game? Race conditions abound... + ConfigSetting("DiscordRichPresence", &g_Config.bDiscordRichPresence, false, CfgFlag::DEFAULT), ConfigSetting("UISound", &g_Config.bUISound, false, CfgFlag::DEFAULT), ConfigSetting("DisableHTTPS", &g_Config.bDisableHTTPS, false, CfgFlag::DONT_SAVE), diff --git a/Core/Config.h b/Core/Config.h index 50eef87096..7055b09a78 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -145,7 +145,7 @@ public: std::string sIgnoreCompatSettings; - bool bDiscordPresence; // Enables setting the Discord presence to the current game (or menu) + bool bDiscordRichPresence; // Enables setting the Discord presence to the current game (or menu) // GFX int iGPUBackend; diff --git a/UI/DiscordIntegration.cpp b/UI/DiscordIntegration.cpp index 748547c2a0..a72caa782e 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -45,8 +45,16 @@ Discord::~Discord() { } } +bool Discord::IsAvailable() { +#ifdef ENABLE_DISCORD + return true; +#else + return false; +#endif +} + bool Discord::IsEnabled() const { - return g_Config.bDiscordPresence; + return g_Config.bDiscordRichPresence; } void Discord::Init() { diff --git a/UI/DiscordIntegration.h b/UI/DiscordIntegration.h index df2586eba3..1e3a06946d 100644 --- a/UI/DiscordIntegration.h +++ b/UI/DiscordIntegration.h @@ -19,6 +19,8 @@ public: void SetPresenceMenu(); void ClearPresence(); + static bool IsAvailable(); + private: void Init(); bool IsEnabled() const; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 35213f4986..da0843d249 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -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.bDiscordRichPresence, 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"))); diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 16329dbd9b..750e8c421d 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -261,7 +261,7 @@ public: dc.Draw()->DrawImageRotated(dirImage, x, y, scale_, angle + PI, colorBg, false); dc.Draw()->DrawImageRotated(ImageID("I_ARROW"), x2, y2, scale_, angle + PI, color); } - scale_ = theScale_/layoutAreaScale; + scale_ = theScale_ / layoutAreaScale; } void GetContentDimensions(const UIContext &dc, float &w, float &h) const override { @@ -284,6 +284,8 @@ public: } void Draw(UIContext &dc) override { + scale_ = theScale_ * layoutAreaScale; + float opacity = GamepadGetOpacity(); uint32_t colorBg = colorAlpha(GetButtonColor(), opacity); @@ -292,6 +294,8 @@ public: dc.Draw()->DrawImage(stickBg, bounds_.centerX(), bounds_.centerY(), scale_, colorBg, ALIGN_CENTER); dc.Draw()->DrawImage(stickImage, bounds_.centerX(), bounds_.centerY(), scale_ * spacing_, colorBg, ALIGN_CENTER); + + scale_ = theScale_ / layoutAreaScale; } float GetSpacing() const override { return spacing_ * 3; } diff --git a/assets/compat.ini b/assets/compat.ini index 7e446b9db7..3351dcb908 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -837,6 +837,10 @@ UCES01160 = true # PlayStation Network Collection: Puzzle Pack UCES01159 = true +# Bust-a-move Deluxe / Ghost (#8795) +ULUS10057 = true +ULES00233 = true + [GoWFramerateHack60] # Replaces ForceMax60FPS for GOW games, should provide smoother experience # Also works around softlock in GOW:GOS , see #8299 diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 2dc6d936b8..eddb6d63a0 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -1272,7 +1272,7 @@ void retro_init(void) g_Config.flash0Directory = retro_base_dir / "flash0"; g_Config.internalDataDirectory = retro_base_dir; g_Config.bEnableNetworkChat = false; - g_Config.bDiscordPresence = false; + g_Config.bDiscordRichPresence = false; g_VFS.Register("", new DirectoryReader(retro_base_dir));