Merge pull request #11669 from LillyJadeKatrin/retroachievements-rcheevos-integration

Retroachievements rcheevos integration
This commit is contained in:
Pierre Bourdon
2023-04-04 12:34:20 +02:00
committed by GitHub
25 changed files with 398 additions and 2 deletions

View File

@ -686,4 +686,9 @@ endif()
if(USE_DISCORD_PRESENCE)
target_compile_definitions(dolphin-emu PRIVATE -DUSE_DISCORD_PRESENCE)
endif()
endif()
if(USE_RETRO_ACHIEVEMENTS)
target_link_libraries(dolphin-emu PRIVATE rcheevos)
target_compile_definitions(dolphin-emu PRIVATE -DUSE_RETRO_ACHIEVEMENTS)
endif()

View File

@ -436,6 +436,7 @@
<Import Project="$(ExternalsDir)mbedtls\exports.props" />
<Import Project="$(ExternalsDir)mGBA\exports.props" />
<Import Project="$(ExternalsDir)picojson\exports.props" />
<Import Project="$(ExternalsDir)rcheevos\exports.props" />
<Import Project="$(ExternalsDir)SFML\exports.props" />
<Import Project="$(ExternalsDir)soundtouch\exports.props" />
<Import Project="$(ExternalsDir)zstd\exports.props" />

View File

@ -37,6 +37,7 @@
#include "Common/Version.h"
#include "Common/WindowSystemInfo.h"
#include "Core/AchievementManager.h"
#include "Core/Boot/Boot.h"
#include "Core/BootManager.h"
#include "Core/CommonTitles.h"
@ -222,6 +223,11 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters,
InitControllers();
#ifdef USE_RETRO_ACHIEVEMENTS
// This has to be done before CreateComponents() so it's initialized.
AchievementManager::GetInstance()->Init();
#endif // USE_RETRO_ACHIEVEMENTS
CreateComponents();
ConnectGameList();
@ -301,6 +307,10 @@ MainWindow::~MainWindow()
Settings::Instance().ResetNetPlayClient();
Settings::Instance().ResetNetPlayServer();
#ifdef USE_RETRO_ACHIEVEMENTS
AchievementManager::GetInstance()->Shutdown();
#endif // USE_RETRO_ACHIEVEMENTS
delete m_render_widget;
delete m_netplay_dialog;