diff --git a/core_impl.c b/core_impl.c index cd86d1b058..9f1cb1ebbf 100644 --- a/core_impl.c +++ b/core_impl.c @@ -282,8 +282,6 @@ bool core_unserialize(retro_ctx_serialize_info_t *info) { if (!info) return false; - if (core_serialization_quirks_v & RETRO_SERIALIZATION_QUIRK_INITIALIZING) - return false; if (!core.retro_unserialize(info->data_const, info->size)) return false; @@ -298,8 +296,6 @@ bool core_serialize(retro_ctx_serialize_info_t *info) { if (!info) return false; - if (core_serialization_quirks_v & RETRO_SERIALIZATION_QUIRK_INITIALIZING) - return false; if (!core.retro_serialize(info->data, info->size)) return false; return true; diff --git a/dynamic.c b/dynamic.c index 03345d02ca..e6d1c45d2e 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1611,16 +1611,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) case RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS: { uint64_t *quirks = (uint64_t *) data; - core_set_serialization_quirks(*quirks); - - /* Zero any unrecognized quirks, and zero unsupported VARIABLE_SIZE */ - *quirks &= (RETRO_SERIALIZATION_QUIRK_INCOMPLETE - |RETRO_SERIALIZATION_QUIRK_MUST_INITIALIZE - |RETRO_SERIALIZATION_QUIRK_INITIALIZING - |RETRO_SERIALIZATION_QUIRK_SINGLE_SESSION - |RETRO_SERIALIZATION_QUIRK_ARCHITECTURE_DEPENDENT); - break; } diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h index 59914d2c59..241f1006d6 100644 --- a/libretro-common/include/libretro.h +++ b/libretro-common/include/libretro.h @@ -982,13 +982,15 @@ struct retro_hw_render_context_negotiation_interface * rerecording. */ #define RETRO_SERIALIZATION_QUIRK_INCOMPLETE (1 << 0) /* The core must spend some time initializing before serialization is - * safe. */ + * supported. */ #define RETRO_SERIALIZATION_QUIRK_MUST_INITIALIZE (1 << 1) /* If MUST_INITIALIZE is set, this should also be set if initialization is * in progress. */ -#define RETRO_SERIALIZATION_QUIRK_INITIALIZING (1 << 2) /* Serialization size may change within a session. */ -#define RETRO_SERIALIZATION_QUIRK_VARIABLE_SIZE (1 << 3) +#define RETRO_SERIALIZATION_QUIRK_CORE_VARIABLE_SIZE (1 << 2) +/* Set by the frontend to acknowledge that it supports variable-sized + * states. */ +#define RETRO_SERIALIZATION_QUIRK_FRONT_VARIABLE_SIZE (1 << 3) /* Serialized state can only be loaded during the same session. */ #define RETRO_SERIALIZATION_QUIRK_SINGLE_SESSION (1 << 4) /* Serialized state cannot be loaded on a different architecture from the @@ -998,7 +1000,7 @@ struct retro_hw_render_context_negotiation_interface #define RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS 44 /* uint64_t * -- * Sets quirk flags associated with serialization. The frontend will zero any flags it doesn't - * recognize or support. Should be set during retro_init or retro_load_game. + * recognize or support. Should be set in either retro_init or retro_load_game, but not both. */