mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 03:45:45 -04:00
Allow submitting entries to Leaderboards only in Hardcore Mode.
This is a requirement from RetroAchievements.
This commit is contained in:
@ -587,6 +587,19 @@ static void DisplayAchievementSummary()
|
||||
{
|
||||
summary = GetHostInterface()->TranslateString("Cheevos", "This game has no achievements.");
|
||||
}
|
||||
if (GetLeaderboardCount() > 0)
|
||||
{
|
||||
summary.push_back('\n');
|
||||
if (g_challenge_mode)
|
||||
{
|
||||
summary.append(GetHostInterface()->TranslateString("Cheevos", "Leaderboards are enabled."));
|
||||
}
|
||||
else
|
||||
{
|
||||
summary.append(
|
||||
GetHostInterface()->TranslateString("Cheevos", "Leaderboards are DISABLED because Hardcore Mode is off."));
|
||||
}
|
||||
}
|
||||
|
||||
ImGuiFullscreen::AddNotification(10.0f, std::move(title), std::move(summary), s_game_icon);
|
||||
}
|
||||
@ -1346,6 +1359,13 @@ void SubmitLeaderboard(u32 leaderboard_id, int value)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_challenge_mode)
|
||||
{
|
||||
Log_WarningPrintf("Skipping sending leaderboard %u result to server because Challenge mode is off.",
|
||||
leaderboard_id);
|
||||
return;
|
||||
}
|
||||
|
||||
char url[512];
|
||||
rc_url_submit_lboard(url, sizeof(url), s_username.c_str(), s_login_token.c_str(), leaderboard_id, value);
|
||||
s_http_downloader->CreateRequest(url, SubmitLeaderboardCallback);
|
||||
|
Reference in New Issue
Block a user