mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Changing the initialization quirk to communicate by retro_serialize and
the variable size quirk to use a core and front flag.
This commit is contained in:
parent
919897c464
commit
1483aa710f
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
*/
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user