From d20bde8a1f69c0e585e7a0921b69c4bd94d2d193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Nov 2024 19:46:55 +0100 Subject: [PATCH 1/4] Delay UMD access to pass load time check in Bust-a-Move Deluxe/Ghost. Fixes #8795 --- assets/compat.ini | 4 ++++ 1 file changed, 4 insertions(+) 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 From 6b753c1d634c6e67714c27874d8226edc07a0e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Nov 2024 19:53:29 +0100 Subject: [PATCH 2/4] Fix scaling issue in touch control layout screen, thanks @iota97 See #19573 --- UI/TouchControlLayoutScreen.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } From 55d110493aad7797282fcb827648d1df3e8a9386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Nov 2024 21:31:45 +0100 Subject: [PATCH 3/4] Hide the Discord Rich Presence option on platforms where we don't support it --- UI/DiscordIntegration.cpp | 8 ++++++++ UI/DiscordIntegration.h | 2 ++ UI/GameSettingsScreen.cpp | 6 +++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UI/DiscordIntegration.cpp b/UI/DiscordIntegration.cpp index 748547c2a0..85458b1f32 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -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; } 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..31527e2beb 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.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"))); From 1f8549045d17ae3253f7bf2da9d2137154fb2495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Nov 2024 21:36:30 +0100 Subject: [PATCH 4/4] Default Discord rich presence to off --- Core/Config.cpp | 2 +- Core/Config.h | 2 +- UI/DiscordIntegration.cpp | 2 +- UI/GameSettingsScreen.cpp | 2 +- libretro/libretro.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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 85458b1f32..a72caa782e 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -54,7 +54,7 @@ bool Discord::IsAvailable() { } bool Discord::IsEnabled() const { - return g_Config.bDiscordPresence; + return g_Config.bDiscordRichPresence; } void Discord::Init() { diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 31527e2beb..da0843d249 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -918,7 +918,7 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti } if (Discord::IsAvailable()) { - networkingSettings->Add(new CheckBox(&g_Config.bDiscordPresence, n->T("Send Discord Presence information"))); + networkingSettings->Add(new CheckBox(&g_Config.bDiscordRichPresence, n->T("Send Discord Presence information"))); } networkingSettings->Add(new ItemHeader(n->T("AdHoc Server"))); 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));