mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 12:55:47 -04:00
Cheevos: Add RAIntergration support
This commit is contained in:
@ -113,6 +113,11 @@ bool CommonHostInterface::Initialize()
|
||||
CreateImGuiContext();
|
||||
|
||||
#ifdef WITH_CHEEVOS
|
||||
#ifdef WITH_RAINTEGRATION
|
||||
if (GetBoolSettingValue("Cheevos", "UseRAIntegration", false))
|
||||
Cheevos::SwitchToRAIntegration();
|
||||
#endif
|
||||
|
||||
UpdateCheevosActive();
|
||||
#endif
|
||||
|
||||
@ -3287,6 +3292,10 @@ void CommonHostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||
si.SetBoolValue("Cheevos", "UseFirstDiscFromPlaylist", true);
|
||||
si.DeleteValue("Cheevos", "Username");
|
||||
si.DeleteValue("Cheevos", "Token");
|
||||
|
||||
#ifdef WITH_RAINTEGRATION
|
||||
si.SetBoolValue("Cheevos", "UseRAIntegration", false);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -4377,6 +4386,11 @@ void CommonHostInterface::UpdateCheevosActive()
|
||||
const bool cheevos_rich_presence = GetBoolSettingValue("Cheevos", "RichPresence", true);
|
||||
const bool cheevos_hardcore = GetBoolSettingValue("Cheevos", "ChallengeMode", false);
|
||||
|
||||
#ifdef WITH_RAINTEGRATION
|
||||
if (Cheevos::IsUsingRAIntegration())
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (cheevos_enabled != Cheevos::IsActive() || cheevos_test_mode != Cheevos::IsTestModeActive() ||
|
||||
cheevos_unofficial_test_mode != Cheevos::IsUnofficialTestModeActive() ||
|
||||
cheevos_use_first_disc_from_playlist != Cheevos::IsUsingFirstDiscFromPlaylist() ||
|
||||
|
@ -2328,6 +2328,17 @@ void DrawSettingsWindow()
|
||||
|
||||
case SettingsPage::AchievementsSetings:
|
||||
{
|
||||
#ifdef WITH_RAINTEGRATION
|
||||
if (Cheevos::IsUsingRAIntegration())
|
||||
{
|
||||
BeginMenuButtons();
|
||||
ActiveButton(ICON_FA_BAN " RAIntegration is being used instead of the built-in cheevos implementation.",
|
||||
false, false, ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY);
|
||||
EndMenuButtons();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_CHEEVOS
|
||||
BeginMenuButtons();
|
||||
|
||||
|
Reference in New Issue
Block a user