Skip to content

Commit

Permalink
Added Notification Popups for No Achievement Data
Browse files Browse the repository at this point in the history
Added OnScreenDisplay messages to LoadGameByFilenameAsync to notify the player when any of the potential failures occur.
  • Loading branch information
LillyJadeKatrin committed May 24, 2023
1 parent b0eb4cc commit 22af13f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Core/Core/AchievementManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,27 @@ void AchievementManager::LoadGameByFilenameAsync(const std::string& iso_path,
if (resolve_hash_response != ResponseType::SUCCESS || m_game_id == 0)
{
callback(resolve_hash_response);
OSD::AddMessage("No RetroAchievements data found for this game.", OSD::Duration::VERY_LONG,
OSD::Color::RED);
return;
}

const auto start_session_response = StartRASession();
if (start_session_response != ResponseType::SUCCESS)
{
callback(start_session_response);
OSD::AddMessage("Failed to connect to RetroAchievements server.", OSD::Duration::VERY_LONG,
OSD::Color::RED);
return;
}

const auto fetch_game_data_response = FetchGameData();
m_is_game_loaded = fetch_game_data_response == ResponseType::SUCCESS;
if (!m_is_game_loaded)
{
OSD::AddMessage("Unable to retrieve data from RetroAchievements server.",
OSD::Duration::VERY_LONG, OSD::Color::RED);
}

// Claim the lock, then queue the fetch unlock data calls, then initialize the unlock map in
// ActivateDeactiveAchievements. This allows the calls to process while initializing the
Expand Down

0 comments on commit 22af13f

Please sign in to comment.