mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 10:10:57 +00:00
Added a define to save the achievements JSON
This commit is contained in:
parent
6930262ec2
commit
8a50b7373b
@ -65,6 +65,10 @@
|
||||
* from retroachievements.org. */
|
||||
#undef CHEEVOS_JSON_OVERRIDE
|
||||
|
||||
/* Define this macro with a string to save the JSON file to disk with
|
||||
* that name. */
|
||||
#define CHEEVOS_SAVE_JSON "megamanx11.json"
|
||||
|
||||
/* Define this macro to have the password and token logged. THIS WILL DISCLOSE
|
||||
* THE USER'S PASSWORD, TAKE CARE! */
|
||||
#undef CHEEVOS_LOG_PASSWORD
|
||||
@ -3103,6 +3107,13 @@ found:
|
||||
if (cheevos_get_by_game_id(&json, game_id, &timeout) == 0 && json != NULL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CHEEVOS_SAVE_JSON
|
||||
{
|
||||
FILE* file = fopen(CHEEVOS_SAVE_JSON, "w");
|
||||
fwrite((void*)json, 1, strlen(json), file);
|
||||
fclose(file);
|
||||
}
|
||||
#endif
|
||||
if (!settings->bools.cheevos_enable || !cheevos_parse(json))
|
||||
{
|
||||
cheevos_deactivate_unlocks(game_id, &timeout);
|
||||
|
Loading…
Reference in New Issue
Block a user