Merge pull request #5747 from meleu/patch-9

cheevos: do not show "0 of 0 cheevos unlocked" msg
This commit is contained in:
Twinaphex 2017-11-23 17:10:51 +01:00 committed by GitHub
commit 3c99ccbea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 16 deletions

View File

@ -2829,6 +2829,8 @@ static int cheevos_iterate(coro_t* coro)
CORO_GOSUB(PLAYING);
if(CHEEVOS_VAR_SETTINGS->bools.cheevos_verbose_enable)
{
if(cheevos_locals.core.count > 0)
{
const cheevo_t* cheevo = cheevos_locals.core.cheevos;
const cheevo_t* end = cheevo + cheevos_locals.core.count;
@ -2850,6 +2852,10 @@ static int cheevos_iterate(coro_t* coro)
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 6 * 60, false);
}
else
runloop_msg_queue_push("This game has no achievements.", 0, 5 * 60, false);
}
CORO_STOP();