diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake
index fbc42e10c0..c8e0c6f8f3 100644
--- a/cmake/BuildParameters.cmake
+++ b/cmake/BuildParameters.cmake
@@ -8,7 +8,6 @@ option(DISABLE_BUILD_DATE "Disable including the binary compile date")
option(ENABLE_TESTS "Enables building the unit tests" ON)
option(LTO_PCSX2_CORE "Enable LTO/IPO/LTCG on the subset of pcsx2 that benefits most from it but not anything else")
option(USE_VTUNE "Plug VTUNE to profile GS JIT.")
-option(USE_ACHIEVEMENTS "Build with RetroAchievements support" ON)
option(USE_DISCORD_PRESENCE "Enable support for Discord Rich Presence" ON)
#-------------------------------------------------------------------------------
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index 5434c6e915..c17df0c50c 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -137,6 +137,7 @@ disable_compiler_warnings_for_target(cpuinfo)
add_subdirectory(3rdparty/zydis EXCLUDE_FROM_ALL)
add_subdirectory(3rdparty/zstd EXCLUDE_FROM_ALL)
add_subdirectory(3rdparty/libzip EXCLUDE_FROM_ALL)
+add_subdirectory(3rdparty/rcheevos EXCLUDE_FROM_ALL)
if(USE_OPENGL)
add_subdirectory(3rdparty/glad EXCLUDE_FROM_ALL)
@@ -154,6 +155,10 @@ disable_compiler_warnings_for_target(speex)
# Find the Qt components that we need.
find_package(Qt6 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets Network LinguistTools REQUIRED)
+if(WIN32)
+ add_subdirectory(3rdparty/rainterface EXCLUDE_FROM_ALL)
+endif()
+
if (APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET AND "${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_LESS 10.15)
get_target_property(QT_FEATURES Qt6::Core QT_ENABLED_PUBLIC_FEATURES)
if (cxx17_filesystem IN_LIST QT_FEATURES)
@@ -162,14 +167,6 @@ if (APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET AND "${CMAKE_OSX_DEPLOYMENT_TARGET}" V
endif()
endif()
-# rcheevos backend for RetroAchievements.
-if(USE_ACHIEVEMENTS)
- add_subdirectory(3rdparty/rcheevos EXCLUDE_FROM_ALL)
- if(WIN32)
- add_subdirectory(3rdparty/rainterface EXCLUDE_FROM_ALL)
- endif()
-endif()
-
# Discord-RPC library for rich presence.
if(USE_DISCORD_PRESENCE)
add_subdirectory(3rdparty/rapidjson EXCLUDE_FROM_ALL)
diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt
index 91a61a66a7..8ea29704f2 100644
--- a/pcsx2-qt/CMakeLists.txt
+++ b/pcsx2-qt/CMakeLists.txt
@@ -44,6 +44,12 @@ target_sources(pcsx2-qt PRIVATE
GameList/GameListRefreshThread.h
GameList/GameListWidget.cpp
GameList/GameListWidget.h
+ Settings/AchievementLoginDialog.cpp
+ Settings/AchievementLoginDialog.h
+ Settings/AchievementLoginDialog.ui
+ Settings/AchievementSettingsWidget.cpp
+ Settings/AchievementSettingsWidget.h
+ Settings/AchievementSettingsWidget.ui
Settings/AdvancedSettingsWidget.cpp
Settings/AdvancedSettingsWidget.h
Settings/AdvancedSettingsWidget.ui
@@ -168,17 +174,6 @@ target_sources(pcsx2-qt PRIVATE
resources/resources.qrc
)
-if(USE_ACHIEVEMENTS)
- target_sources(pcsx2-qt PRIVATE
- Settings/AchievementLoginDialog.cpp
- Settings/AchievementLoginDialog.h
- Settings/AchievementLoginDialog.ui
- Settings/AchievementSettingsWidget.cpp
- Settings/AchievementSettingsWidget.h
- Settings/AchievementSettingsWidget.ui
- )
-endif()
-
file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Translations/*.ts)
target_precompile_headers(pcsx2-qt PRIVATE PrecompiledHeader.h)
diff --git a/pcsx2-qt/QtHost.cpp b/pcsx2-qt/QtHost.cpp
index 03e0f8b912..1378e1977a 100644
--- a/pcsx2-qt/QtHost.cpp
+++ b/pcsx2-qt/QtHost.cpp
@@ -1110,7 +1110,6 @@ void Host::OnSaveStateSaved(const std::string_view& filename)
emit g_emu_thread->onSaveStateSaved(QtUtils::StringViewToQString(filename));
}
-#ifdef ENABLE_ACHIEVEMENTS
void Host::OnAchievementsLoginRequested(Achievements::LoginRequestReason reason)
{
emit g_emu_thread->onAchievementsLoginRequested(reason);
@@ -1151,7 +1150,6 @@ void Host::OnAchievementsRefreshed()
emit g_emu_thread->onAchievementsRefreshed(game_id, game_info, achievement_count, max_points);
}
-#endif
void Host::VSyncOnCPUThread()
{
diff --git a/pcsx2-qt/Settings/SettingsDialog.cpp b/pcsx2-qt/Settings/SettingsDialog.cpp
index 1fce21b20d..cf7c3f6087 100644
--- a/pcsx2-qt/Settings/SettingsDialog.cpp
+++ b/pcsx2-qt/Settings/SettingsDialog.cpp
@@ -194,7 +194,6 @@ void SettingsDialog::setupUi(const GameList::Entry* game)
QString help_text =
tr("Achievements Settings
"
"These options control the RetroAchievements implementation in PCSX2, allowing you to earn achievements in your games.");
-#ifdef ENABLE_ACHIEVEMENTS
if (Achievements::IsUsingRAIntegration())
{
QLabel* placeholder_label =
@@ -207,12 +206,6 @@ void SettingsDialog::setupUi(const GameList::Entry* game)
addWidget((m_achievement_settings = new AchievementSettingsWidget(this, m_ui.settingsContainer)), std::move(title),
std::move(icon_text), std::move(help_text));
}
-#else
- QLabel* placeholder_label =
- new QLabel(tr("This PCSX2 build was not compiled with RetroAchievements support."), m_ui.settingsContainer);
- placeholder_label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- addWidget(placeholder_label, std::move(title), std::move(icon_text), std::move(help_text));
-#endif
}
if (show_advanced_settings)
diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj
index 467cce131a..ad1e158716 100644
--- a/pcsx2-qt/pcsx2-qt.vcxproj
+++ b/pcsx2-qt/pcsx2-qt.vcxproj
@@ -49,7 +49,7 @@
%(AdditionalIncludeDirectories);$(ProjectDir)\Settings;$(ProjectDir)\GameList;$(ProjectDir)\Tools\InputRecording;$(ProjectDir)\Debugger;$(ProjectDir)\Debugger\Models
Use
PrecompiledHeader.h
- LZMA_API_STATIC;BUILD_DX=1;ENABLE_RAINTEGRATION;ENABLE_ACHIEVEMENTS;ENABLE_DISCORD_PRESENCE;ENABLE_OPENGL;ENABLE_VULKAN;%(PreprocessorDefinitions)
+ LZMA_API_STATIC;BUILD_DX=1;ENABLE_RAINTEGRATION;ENABLE_DISCORD_PRESENCE;ENABLE_OPENGL;ENABLE_VULKAN;%(PreprocessorDefinitions)
QT_NO_EXCEPTIONS;%(PreprocessorDefinitions)
true
diff --git a/pcsx2/Achievements.cpp b/pcsx2/Achievements.cpp
index c8b5aab83e..9c4cee02ac 100644
--- a/pcsx2/Achievements.cpp
+++ b/pcsx2/Achievements.cpp
@@ -15,8 +15,6 @@
#include "PrecompiledHeader.h"
-#ifdef ENABLE_ACHIEVEMENTS
-
#include "Achievements.h"
#include "CDVD/CDVD.h"
#include "Elfheader.h"
@@ -2319,4 +2317,3 @@ void Achievements::RAIntegration::RACallbackWriteMemory(unsigned int address, un
#endif // ENABLE_RAINTEGRATION
-#endif // ENABLE_ACHIEVEMENTS
diff --git a/pcsx2/Achievements.h b/pcsx2/Achievements.h
index 27509b57c2..305aa53efa 100644
--- a/pcsx2/Achievements.h
+++ b/pcsx2/Achievements.h
@@ -27,8 +27,6 @@
#include
#include
-#ifdef ENABLE_ACHIEVEMENTS
-
namespace Achievements
{
enum class LoginRequestReason
@@ -191,73 +189,6 @@ namespace Achievements
bool ChallengeModeActive();
} // namespace Achievements
-#else
-
-// Make noops when compiling without cheevos.
-namespace Achievements
-{
- static inline void Initialize()
- {
- }
-
- static inline void UpdateSettings(const Pcsx2Config::AchievementsOptions& old_config)
- {
- }
-
- static inline void Shutdown()
- {
- }
-
- static inline bool OnReset()
- {
- return true;
- }
- static inline void LoadState(const u8* state_data, u32 state_data_size)
- {
- }
- static inline std::vector SaveState()
- {
- return {};
- }
- static inline void GameChanged()
- {
- }
-
- static constexpr inline bool ChallengeModeActive()
- {
- return false;
- }
-
- static inline bool ResetChallengeMode()
- {
- return false;
- }
-
- static inline void DisableChallengeMode()
- {
- }
-
- static inline bool ConfirmChallengeModeDisable(const char* trigger)
- {
- return true;
- }
-
- static inline void OnPaused(bool paused)
- {
- }
-
- static inline void VSyncUpdate()
- {
- }
-
- static std::string SafeGetRichPresenceString()
- {
- return {};
- }
-} // namespace Achievements
-
-#endif
-
/// Functions implemented in the frontend.
namespace Host
{
diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt
index 11db95d61f..9feae9b89e 100644
--- a/pcsx2/CMakeLists.txt
+++ b/pcsx2/CMakeLists.txt
@@ -858,30 +858,14 @@ if(APPLE)
)
endif()
-if(USE_ACHIEVEMENTS)
- target_compile_definitions(PCSX2_FLAGS INTERFACE
- ENABLE_ACHIEVEMENTS
- )
- target_link_libraries(PCSX2_FLAGS INTERFACE
- rcheevos
- )
- if(WIN32)
- # RAIntegration is only supported on Windows.
- target_compile_definitions(PCSX2_FLAGS INTERFACE
- ENABLE_RAINTEGRATION
- )
- target_link_libraries(PCSX2_FLAGS INTERFACE
- rainterface
- )
- endif()
+if(WIN32)
+ # RAIntegration is only supported on Windows.
+ target_compile_definitions(PCSX2_FLAGS INTERFACE ENABLE_RAINTEGRATION)
+ target_link_libraries(PCSX2_FLAGS INTERFACE rainterface)
endif()
if(USE_DISCORD_PRESENCE)
- target_compile_definitions(PCSX2_FLAGS INTERFACE
- ENABLE_DISCORD_PRESENCE
- )
- target_link_libraries(PCSX2_FLAGS INTERFACE
- discord-rpc
- )
+ target_compile_definitions(PCSX2_FLAGS INTERFACE ENABLE_DISCORD_PRESENCE)
+ target_link_libraries(PCSX2_FLAGS INTERFACE discord-rpc)
endif()
if(WIN32)
list(APPEND pcsx2InputSources
@@ -1149,6 +1133,7 @@ target_link_libraries(PCSX2_FLAGS INTERFACE
cpuinfo
zydis
cubeb
+ rcheevos
SDL2::SDL2
ZLIB::ZLIB
SoundTouch::SoundTouch
diff --git a/pcsx2/Config.h b/pcsx2/Config.h
index 7bca67bfe5..8d253ded24 100644
--- a/pcsx2/Config.h
+++ b/pcsx2/Config.h
@@ -1241,7 +1241,6 @@ struct Pcsx2Config
// ------------------------------------------------------------------------
-#ifdef ENABLE_ACHIEVEMENTS
struct AchievementsOptions
{
BITFIELD32()
@@ -1272,7 +1271,6 @@ struct Pcsx2Config
return !this->operator==(right);
}
};
-#endif
// ------------------------------------------------------------------------
@@ -1327,9 +1325,7 @@ struct Pcsx2Config
FilenameOptions BaseFilenames;
-#ifdef ENABLE_ACHIEVEMENTS
AchievementsOptions Achievements;
-#endif
// Memorycard options - first 2 are default slots, last 6 are multitap 1 and 2
// slots (3 each)
diff --git a/pcsx2/Hotkeys.cpp b/pcsx2/Hotkeys.cpp
index dc217baf45..286df3994b 100644
--- a/pcsx2/Hotkeys.cpp
+++ b/pcsx2/Hotkeys.cpp
@@ -143,7 +143,6 @@ DEFINE_HOTKEY("OpenPauseMenu", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NO
if (!pressed && VMManager::HasValidVM())
FullscreenUI::OpenPauseMenu();
})
-#ifdef ENABLE_ACHIEVEMENTS
DEFINE_HOTKEY("OpenAchievementsList", TRANSLATE_NOOP("Hotkeys", "System"),
TRANSLATE_NOOP("Hotkeys", "Open Achievements List"), [](s32 pressed) {
if (!pressed)
@@ -154,7 +153,6 @@ DEFINE_HOTKEY("OpenLeaderboardsList", TRANSLATE_NOOP("Hotkeys", "System"),
if (!pressed)
FullscreenUI::OpenLeaderboardsWindow();
})
-#endif
DEFINE_HOTKEY(
"TogglePause", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Pause"), [](s32 pressed) {
if (!pressed && VMManager::HasValidVM())
diff --git a/pcsx2/ImGui/FullscreenUI.cpp b/pcsx2/ImGui/FullscreenUI.cpp
index d2eed9826a..215dcd7489 100644
--- a/pcsx2/ImGui/FullscreenUI.cpp
+++ b/pcsx2/ImGui/FullscreenUI.cpp
@@ -178,19 +178,15 @@ namespace FullscreenUI
GameList,
Settings,
PauseMenu,
-#ifdef ENABLE_ACHIEVEMENTS
Achievements,
Leaderboards,
-#endif
};
enum class PauseSubMenu
{
None,
Exit,
-#ifdef ENABLE_ACHIEVEMENTS
Achievements,
-#endif
};
enum class SettingsPage
@@ -482,7 +478,6 @@ namespace FullscreenUI
static std::vector s_game_list_sorted_entries;
static GameListPage s_game_list_page = GameListPage::Grid;
-#ifdef ENABLE_ACHIEVEMENTS
//////////////////////////////////////////////////////////////////////////
// Achievements
//////////////////////////////////////////////////////////////////////////
@@ -498,7 +493,6 @@ namespace FullscreenUI
const Achievements::LeaderboardEntry& lbEntry, float rank_column_width, float name_column_width, float column_spacing);
static std::optional s_open_leaderboard_id;
-#endif
} // namespace FullscreenUI
//////////////////////////////////////////////////////////////////////////
@@ -653,7 +647,6 @@ void FullscreenUI::CheckForConfigChanges(const Pcsx2Config& old_config)
if (!IsInitialized())
return;
-#ifdef ENABLE_ACHIEVEMENTS
// If achievements got disabled, we might have the menu open...
// That means we're going to be reaching achievement state.
if (old_config.Achievements.Enabled && !EmuConfig.Achievements.Enabled)
@@ -667,7 +660,6 @@ void FullscreenUI::CheckForConfigChanges(const Pcsx2Config& old_config)
});
MTGS::WaitGS(false, false, false);
}
-#endif
}
void FullscreenUI::OnVMStarted()
@@ -827,14 +819,12 @@ void FullscreenUI::Render()
ImGuiFullscreen::BeginLayout();
-#ifdef ENABLE_ACHIEVEMENTS
// Primed achievements must come first, because we don't want the pause screen to be behind them.
if (EmuConfig.Achievements.PrimedIndicators && s_current_main_window == MainWindowType::None &&
Achievements::GetPrimedAchievementCount() > 0)
{
DrawPrimedAchievementsIcons();
}
-#endif
switch (s_current_main_window)
{
@@ -850,14 +840,12 @@ void FullscreenUI::Render()
case MainWindowType::PauseMenu:
DrawPauseMenu(s_current_main_window);
break;
-#ifdef ENABLE_ACHIEVEMENTS
case MainWindowType::Achievements:
DrawAchievementsWindow();
break;
case MainWindowType::Leaderboards:
DrawLeaderboardsWindow();
break;
-#endif
default:
break;
}
@@ -4700,11 +4688,7 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
// title info
{
-#ifdef ENABLE_ACHIEVEMENTS
const bool has_rich_presence = Achievements::IsActive() && !Achievements::GetRichPresenceString().empty();
-#else
- const bool has_rich_presence = false;
-#endif
const float image_width = has_rich_presence ? 60.0f : 50.0f;
const float image_height = has_rich_presence ? 90.0f : 75.0f;
@@ -4734,7 +4718,6 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
}
DrawShadowedText(dl, g_medium_font, subtitle_pos, text_color, s_current_game_subtitle.c_str());
-#ifdef ENABLE_ACHIEVEMENTS
if (has_rich_presence)
{
const auto lock = Achievements::GetLock();
@@ -4758,7 +4741,6 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
DrawShadowedText(dl, g_medium_font, rp_pos, text_color, rp.data(), rp.data() + rp.size(), wrap_width);
}
}
-#endif
GSTexture* const cover = GetCoverForCurrentGame();
@@ -4817,9 +4799,7 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
static constexpr u32 submenu_item_count[] = {
11, // None
4, // Exit
-#ifdef ENABLE_ACHIEVEMENTS
3, // Achievements
-#endif
};
const bool just_focused = ResetFocusHere();
@@ -4862,7 +4842,6 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
SwitchToGameSettings();
}
-#ifdef ENABLE_ACHIEVEMENTS
if (ActiveButton(FSUI_ICONSTR(ICON_FA_TROPHY, "Achievements"), false,
Achievements::HasActiveGame() && Achievements::SafeHasAchievementsOrLeaderboards()))
{
@@ -4874,9 +4853,6 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
else
OpenPauseSubMenu(PauseSubMenu::Achievements);
}
-#else
- ActiveButton(FSUI_ICONSTR(ICON_FA_TROPHY, "Achievements"), false, false);
-#endif
if (ActiveButton(FSUI_ICONSTR(ICON_FA_CAMERA, "Save Screenshot"), false))
{
@@ -4936,7 +4912,6 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
}
break;
-#ifdef ENABLE_ACHIEVEMENTS
case PauseSubMenu::Achievements:
{
if (just_focused)
@@ -4952,7 +4927,6 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
SwitchToLeaderboardsWindow();
}
break;
-#endif
}
EndMenuButtons();
@@ -4960,11 +4934,9 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
EndFullscreenWindow();
}
-#ifdef ENABLE_ACHIEVEMENTS
// Primed achievements must come first, because we don't want the pause screen to be behind them.
if (Achievements::GetPrimedAchievementCount() > 0)
DrawPrimedAchievementsList();
-#endif
}
void FullscreenUI::InitializePlaceholderSaveStateListEntry(SaveStateListEntry* li, s32 slot)
@@ -6497,8 +6469,6 @@ void FullscreenUI::ProgressCallback::SetCancelled()
m_cancelled = true;
}
-#ifdef ENABLE_ACHIEVEMENTS
-
void FullscreenUI::OpenAchievementsWindow()
{
if (!VMManager::HasValidVM() || !Achievements::IsActive())
@@ -7455,30 +7425,6 @@ void FullscreenUI::DrawAchievementsLoginWindow()
ImGui::PopStyleVar(2);
}
-#else
-
-void FullscreenUI::OpenAchievementsWindow()
-{
-}
-
-void FullscreenUI::OpenLeaderboardsWindow()
-{
-}
-
-void FullscreenUI::DrawAchievementsSettingsPage(std::unique_lock& settings_lock)
-{
- BeginMenuButtons();
- ActiveButton(FSUI_ICONSTR(ICON_FA_BAN, "This build was not compiled with RetroAchievements support."), false, false,
- ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY);
- EndMenuButtons();
-}
-
-void FullscreenUI::DrawAchievementsLoginWindow()
-{
-}
-
-#endif
-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Translation String Area
// To avoid having to type T_RANSLATE("FullscreenUI", ...) everywhere, we use the shorter macros at the top
@@ -8341,4 +8287,4 @@ TRANSLATE_NOOP("FullscreenUI", "Card Enabled");
TRANSLATE_NOOP("FullscreenUI", "Card Name");
TRANSLATE_NOOP("FullscreenUI", "Eject Card");
// TRANSLATION-STRING-AREA-END
-#endif
\ No newline at end of file
+#endif
diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp
index 1b1904114e..8700ad6716 100644
--- a/pcsx2/Pcsx2Config.cpp
+++ b/pcsx2/Pcsx2Config.cpp
@@ -1428,8 +1428,6 @@ bool Pcsx2Config::PadOptions::Port::operator!=(const PadOptions::Port& right) co
return !this->operator==(right);
}
-#ifdef ENABLE_ACHIEVEMENTS
-
Pcsx2Config::AchievementsOptions::AchievementsOptions()
{
Enabled = false;
@@ -1466,8 +1464,6 @@ void Pcsx2Config::AchievementsOptions::LoadSave(SettingsWrapper& wrap)
}
}
-#endif
-
Pcsx2Config::Pcsx2Config()
{
bitset = 0;
@@ -1549,9 +1545,7 @@ void Pcsx2Config::LoadSaveCore(SettingsWrapper& wrap)
Debugger.LoadSave(wrap);
Trace.LoadSave(wrap);
-#ifdef ENABLE_ACHIEVEMENTS
Achievements.LoadSave(wrap);
-#endif
SettingsWrapEntry(GzipIsoIndexTemplate);
SettingsWrapEntry(PINESlot);
diff --git a/pcsx2/SaveState.cpp b/pcsx2/SaveState.cpp
index 1630e12f3d..bed63cc1bd 100644
--- a/pcsx2/SaveState.cpp
+++ b/pcsx2/SaveState.cpp
@@ -653,7 +653,6 @@ public:
bool IsRequired() const { return true; }
};
-#ifdef ENABLE_ACHIEVEMENTS
class SaveStateEntry_Achievements final : public BaseSavestateEntry
{
~SaveStateEntry_Achievements() override = default;
@@ -694,7 +693,6 @@ class SaveStateEntry_Achievements final : public BaseSavestateEntry
bool IsRequired() const override { return false; }
};
-#endif
// (cpuRegs, iopRegs, VPU/GIF/DMAC structures should all remain as part of a larger unified
// block, since they're all PCSX2-dependent and having separate files in the archie for them
@@ -715,9 +713,7 @@ static const std::unique_ptr SavestateEntries[] = {
std::unique_ptr(new SavestateEntry_USB),
std::unique_ptr(new SavestateEntry_PAD),
std::unique_ptr(new SavestateEntry_GS),
-#ifdef ENABLE_ACHIEVEMENTS
std::unique_ptr(new SaveStateEntry_Achievements),
-#endif
};
std::unique_ptr SaveState_DownloadState(Error* error)
diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp
index c6e27c0b16..c9ceb2bfcc 100644
--- a/pcsx2/VMManager.cpp
+++ b/pcsx2/VMManager.cpp
@@ -1186,7 +1186,6 @@ bool VMManager::Initialize(VMBootParameters boot_params)
Hle_ClearElfPath();
}
-#ifdef ENABLE_ACHIEVEMENTS
// Check for resuming with hardcore mode.
Achievements::ResetChallengeMode();
if (!state_to_load.empty() && Achievements::ChallengeModeActive() &&
@@ -1194,7 +1193,6 @@ bool VMManager::Initialize(VMBootParameters boot_params)
{
return false;
}
-#endif
s_limiter_mode = GetInitialLimiterMode();
s_target_speed = GetTargetSpeedForLimiterMode(s_limiter_mode);
@@ -1427,14 +1425,12 @@ void VMManager::Reset()
return;
}
-#ifdef ENABLE_ACHIEVEMENTS
if (!Achievements::OnReset())
return;
// Re-enforce hardcode mode constraints if we're now enabling it.
if (Achievements::ResetChallengeMode())
ApplySettings();
-#endif
vu1Thread.WaitVU();
vu1Thread.Reset();
@@ -1694,12 +1690,8 @@ u32 VMManager::DeleteSaveStates(const char* game_serial, u32 game_crc, bool also
bool VMManager::LoadState(const char* filename)
{
-#ifdef ENABLE_ACHIEVEMENTS
if (Achievements::ChallengeModeActive() && !Achievements::ConfirmChallengeModeDisable("Loading state"))
- {
return false;
- }
-#endif
// TODO: Save the current state so we don't need to reset.
if (DoLoadState(filename))
@@ -1720,12 +1712,8 @@ bool VMManager::LoadStateFromSlot(s32 slot)
return false;
}
-#ifdef ENABLE_ACHIEVEMENTS
if (Achievements::ChallengeModeActive() && !Achievements::ConfirmChallengeModeDisable("Loading state"))
- {
return false;
- }
-#endif
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_FOLDER_OPEN,
fmt::format(TRANSLATE_FS("VMManager", "Loading state from slot {}..."), slot), Host::OSD_QUICK_DURATION);
@@ -1912,10 +1900,8 @@ void VMManager::FrameAdvance(u32 num_frames /*= 1*/)
if (!HasValidVM())
return;
-#ifdef ENABLE_ACHIEVEMENTS
if (Achievements::ChallengeModeActive() && !Achievements::ConfirmChallengeModeDisable("Frame advancing"))
return;
-#endif
s_frame_advance_count = num_frames;
SetState(VMState::Running);
diff --git a/pcsx2/pcsx2.vcxproj b/pcsx2/pcsx2.vcxproj
index eca9076c58..592dc8cee2 100644
--- a/pcsx2/pcsx2.vcxproj
+++ b/pcsx2/pcsx2.vcxproj
@@ -64,7 +64,7 @@
Use
PrecompiledHeader.h
PrecompiledHeader.h;%(ForcedIncludeFiles)
- LZMA_API_STATIC;ST_NO_EXCEPTION_HANDLING;ENABLE_DISCORD_PRESENCE;ENABLE_RAINTEGRATION;ENABLE_ACHIEVEMENTS;ENABLE_OPENGL;ENABLE_VULKAN;%(PreprocessorDefinitions)
+ LZMA_API_STATIC;ST_NO_EXCEPTION_HANDLING;ENABLE_DISCORD_PRESENCE;ENABLE_RAINTEGRATION;ENABLE_OPENGL;ENABLE_VULKAN;%(PreprocessorDefinitions)
XBYAK_NO_EXCEPTION;ZYCORE_STATIC_DEFINE;ZYDIS_STATIC_DEFINE;%(PreprocessorDefinitions)
$(IntDir)%(RelativeDir)