core_[un]serialize waits for initialization quirk.

This commit is contained in:
Gregor Richards 2016-09-30 14:51:05 -04:00
parent 3fa3fe0fcd
commit 2c0eb77756

View File

@ -282,6 +282,8 @@ bool core_unserialize(retro_ctx_serialize_info_t *info)
{ {
if (!info) if (!info)
return false; return false;
if (core_serialization_quirks_v & RETRO_SERIALIZATION_QUIRK_INITIALIZING)
return false;
if (!core.retro_unserialize(info->data_const, info->size)) if (!core.retro_unserialize(info->data_const, info->size))
return false; return false;
@ -292,20 +294,12 @@ bool core_unserialize(retro_ctx_serialize_info_t *info)
return true; return true;
} }
uint32_t core_serialization_quirks(void)
{
return core_serialization_quirks_v;
}
void core_set_serialization_quirks(uint32_t quirks)
{
core_serialization_quirks_v = quirks;
}
bool core_serialize(retro_ctx_serialize_info_t *info) bool core_serialize(retro_ctx_serialize_info_t *info)
{ {
if (!info) if (!info)
return false; return false;
if (core_serialization_quirks_v & RETRO_SERIALIZATION_QUIRK_INITIALIZING)
return false;
if (!core.retro_serialize(info->data, info->size)) if (!core.retro_serialize(info->data, info->size))
return false; return false;
return true; return true;
@ -319,6 +313,16 @@ bool core_serialize_size(retro_ctx_size_info_t *info)
return true; return true;
} }
uint32_t core_serialization_quirks(void)
{
return core_serialization_quirks_v;
}
void core_set_serialization_quirks(uint32_t quirks)
{
core_serialization_quirks_v = quirks;
}
bool core_frame(retro_ctx_frame_info_t *info) bool core_frame(retro_ctx_frame_info_t *info)
{ {
if (!info || !retro_ctx.frame_cb) if (!info || !retro_ctx.frame_cb)