Merge pull request #10633 from jdgleaver/cheevos-disable

Don't perform unnecessary cheevos initialisation when cheevos are disabled
This commit is contained in:
Autechre 2020-05-15 15:22:16 +02:00 committed by GitHub
commit c31d4e6b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2921,11 +2921,13 @@ bool rcheevos_load(const void *data)
retro_task_t *task = NULL; retro_task_t *task = NULL;
const struct retro_game_info *info = NULL; const struct retro_game_info *info = NULL;
rcheevos_coro_t *coro = NULL; rcheevos_coro_t *coro = NULL;
settings_t *settings = config_get_ptr();
bool cheevos_enable = settings && settings->bools.cheevos_enable;
rcheevos_loaded = false; rcheevos_loaded = false;
rcheevos_hardcore_paused = false; rcheevos_hardcore_paused = false;
if (!rcheevos_locals.core_supports || !data) if (!cheevos_enable || !rcheevos_locals.core_supports || !data)
{ {
rcheevos_hardcore_paused = true; rcheevos_hardcore_paused = true;
return false; return false;