Make quirks a bidirectional interface, so the frontend can refuse quirks

it doesn't support, in particular variable sized states.
This commit is contained in:
Gregor Richards 2016-09-30 15:51:15 -04:00
parent 90bd741786
commit fad6e2e87e
2 changed files with 12 additions and 2 deletions

View File

@ -1609,7 +1609,16 @@ bool rarch_environment_cb(unsigned cmd, void *data)
}
case RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS:
core_set_serialization_quirks(*((uint32_t *) data));
core_set_serialization_quirks(*((uint64_t *) data));
/* Zero any unrecognized quirks */
*((uint64_t *) data) &= ~((uint64_t)
((RETRO_SERIALIZATION_QUIRK_ARCHITECTURE_DEPENDENT-1) |
RETRO_SERIALIZATION_QUIRK_ARCHITECTURE_DEPENDENT));
/* And zero variable-sized serialization, which we don't support */
*((uint64_t *) data) &= ~((uint64_t) RETRO_SERIALIZATION_QUIRK_VARIABLE_SIZE);
break;
/* Default */

View File

@ -997,7 +997,8 @@ struct retro_hw_render_context_negotiation_interface
#define RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS 44
/* uint64_t * --
* Sets quirk flags associated with serialization.
* Sets quirk flags associated with serialization. The frontend will zero any flags it doesn't
* recognize or support.
*/