Merge pull request #12083 from Jamiras/cheevos_load_state_async

(cheevos) ensure hardcore remains disabled through load process
This commit is contained in:
Autechre 2021-02-28 23:54:10 +01:00 committed by GitHub
commit 5ff75cab0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -954,6 +954,11 @@ static void task_load_handler(retro_task_t *task)
goto error;
}
#ifdef HAVE_CHEEVOS
if (rcheevos_hardcore_active())
task_set_cancelled(task, true);
#endif
remaining = MIN(state->size - state->bytes_read, SAVE_STATE_CHUNK);
bytes_read = intfstream_read(state->file,
(uint8_t*)state->data + state->bytes_read, remaining);
@ -1133,6 +1138,11 @@ static void content_load_state_cb(retro_task_t *task,
settings_t *settings = config_get_ptr();
bool block_sram_overwrite = settings->bools.block_sram_overwrite;
#ifdef HAVE_CHEEVOS
if (rcheevos_hardcore_active())
goto error;
#endif
RARCH_LOG("[State]: %s \"%s\", %u %s.\n",
msg_hash_to_str(MSG_LOADING_STATE),
load_data->path,