Added LoadGameByFilenameAsync and CloseGame to AchievementManager

LoadGameByFilenameAsync sets up a volume reader and hashes the volume, then uses that hash to make the three consecutive API requests to resolve hash, start session and load game data.

CloseGame resets the m_is_game_loaded flag, wipes the queue, and destroys all the game data responses.
This commit is contained in:
LillyJadeKatrin
2023-04-11 00:04:08 -04:00
parent bd75ce6e6d
commit 8b57c4b239
4 changed files with 126 additions and 14 deletions

View File

@ -38,6 +38,7 @@
#include "Common/Timer.h"
#include "Common/Version.h"
#include "Core/AchievementManager.h"
#include "Core/Boot/Boot.h"
#include "Core/BootManager.h"
#include "Core/Config/MainSettings.h"
@ -283,6 +284,10 @@ void Stop() // - Hammertime!
if (GetState() == State::Stopping || GetState() == State::Uninitialized)
return;
#ifdef USE_RETRO_ACHIEVEMENTS
AchievementManager::GetInstance()->CloseGame();
#endif // USE_RETRO_ACHIEVEMENTS
s_is_stopping = true;
CallOnStateChangedCallbacks(State::Stopping);