From b9b8f524b327678dff68724634811e086f58a7a0 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 13 May 2016 08:37:06 +0100 Subject: [PATCH] Also save game when unlocking a stats trophy. --- src/game/trophies.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/trophies.c b/src/game/trophies.c index eff2b82..d6483c0 100644 --- a/src/game/trophies.c +++ b/src/game/trophies.c @@ -217,7 +217,7 @@ void awardTrophy(char *id) t->awardDate = time(NULL); t->notify = 1; - SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Awarding trophy '%s'", id); + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Awarding trophy '%s'", t->id); app.saveGame = 1; } @@ -400,6 +400,10 @@ void awardStatsTrophies(void) t->awarded = 1; t->awardDate = time(NULL); t->notify = 1; + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Awarding trophy '%s'", t->id); + + app.saveGame = 1; } } }