Switching serialization quirks to uint64_t for consistency with other

bitfields
This commit is contained in:
Gregor Richards 2016-09-30 15:37:02 -04:00
parent 2c0eb77756
commit 90bd741786
6 changed files with 13 additions and 13 deletions

4
core.h
View File

@ -178,9 +178,9 @@ bool core_set_environment(retro_ctx_environ_info_t *info);
bool core_serialize_size(retro_ctx_size_info_t *info); bool core_serialize_size(retro_ctx_size_info_t *info);
uint32_t core_serialization_quirks(void); uint64_t core_serialization_quirks(void);
void core_set_serialization_quirks(uint32_t quirks); void core_set_serialization_quirks(uint64_t quirks);
bool core_serialize(retro_ctx_serialize_info_t *info); bool core_serialize(retro_ctx_serialize_info_t *info);

View File

@ -52,7 +52,7 @@ static bool core_game_loaded = false;
static bool core_input_polled = false; static bool core_input_polled = false;
static bool core_has_set_input_descriptors = false; static bool core_has_set_input_descriptors = false;
static struct retro_callbacks retro_ctx; static struct retro_callbacks retro_ctx;
static uint32_t core_serialization_quirks_v = 0; static uint64_t core_serialization_quirks_v = 0;
static void core_input_state_poll_maybe(void) static void core_input_state_poll_maybe(void)
{ {
@ -313,12 +313,12 @@ bool core_serialize_size(retro_ctx_size_info_t *info)
return true; return true;
} }
uint32_t core_serialization_quirks(void) uint64_t core_serialization_quirks(void)
{ {
return core_serialization_quirks_v; return core_serialization_quirks_v;
} }
void core_set_serialization_quirks(uint32_t quirks) void core_set_serialization_quirks(uint64_t quirks)
{ {
core_serialization_quirks_v = quirks; core_serialization_quirks_v = quirks;
} }

View File

@ -996,7 +996,7 @@ struct retro_hw_render_context_negotiation_interface
* one it was saved on. */ * one it was saved on. */
#define RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS 44 #define RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS 44
/* uint32_t * -- /* uint64_t * --
* Sets quirk flags associated with serialization. * Sets quirk flags associated with serialization.
*/ */

View File

@ -1016,7 +1016,7 @@ bool netplay_init_serialization(netplay_t *netplay)
} }
/* Once initialized, we no longer exhibit this quirk */ /* Once initialized, we no longer exhibit this quirk */
netplay->quirks &= ~((uint32_t) NETPLAY_QUIRK_INITIALIZATION); netplay->quirks &= ~((uint64_t) NETPLAY_QUIRK_INITIALIZATION);
return true; return true;
} }
@ -1062,7 +1062,7 @@ static bool netplay_init_buffers(netplay_t *netplay, unsigned frames)
**/ **/
netplay_t *netplay_new(const char *server, uint16_t port, netplay_t *netplay_new(const char *server, uint16_t port,
unsigned frames, unsigned check_frames, const struct retro_callbacks *cb, unsigned frames, unsigned check_frames, const struct retro_callbacks *cb,
bool spectate, const char *nick, uint32_t quirks) bool spectate, const char *nick, uint64_t quirks)
{ {
netplay_t *netplay = (netplay_t*)calloc(1, sizeof(*netplay)); netplay_t *netplay = (netplay_t*)calloc(1, sizeof(*netplay));
if (!netplay) if (!netplay)
@ -1398,8 +1398,8 @@ bool init_netplay(bool is_spectate, const char *server, unsigned port)
{ {
struct retro_callbacks cbs = {0}; struct retro_callbacks cbs = {0};
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
uint32_t serialization_quirks = 0; uint64_t serialization_quirks = 0;
uint32_t quirks = 0; uint64_t quirks = 0;
if (!netplay_enabled) if (!netplay_enabled)
return false; return false;
@ -1415,7 +1415,7 @@ bool init_netplay(bool is_spectate, const char *server, unsigned port)
/* Map the core's quirks to our quirks */ /* Map the core's quirks to our quirks */
serialization_quirks = core_serialization_quirks(); serialization_quirks = core_serialization_quirks();
if ((serialization_quirks & ~((uint32_t) NETPLAY_QUIRK_MAP_UNDERSTOOD))) if ((serialization_quirks & ~((uint64_t) NETPLAY_QUIRK_MAP_UNDERSTOOD)))
{ {
/* Quirks we don't support! Just disable everything. */ /* Quirks we don't support! Just disable everything. */
quirks |= NETPLAY_QUIRK_NO_SAVESTATES; quirks |= NETPLAY_QUIRK_NO_SAVESTATES;

View File

@ -149,7 +149,7 @@ size_t audio_sample_batch_net(const int16_t *data, size_t frames);
netplay_t *netplay_new(const char *server, netplay_t *netplay_new(const char *server,
uint16_t port, unsigned frames, unsigned check_frames, uint16_t port, unsigned frames, unsigned check_frames,
const struct retro_callbacks *cb, bool spectate, const struct retro_callbacks *cb, bool spectate,
const char *nick, uint32_t quirks); const char *nick, uint64_t quirks);
/** /**
* netplay_free: * netplay_free:

View File

@ -140,7 +140,7 @@ struct netplay
bool force_rewind; bool force_rewind;
/* Quirks in the savestate implementation */ /* Quirks in the savestate implementation */
unsigned quirks; uint64_t quirks;
/* Force our state to be sent to the other side. Used when they request a /* Force our state to be sent to the other side. Used when they request a
* savestate, to send at the next pre-frame. */ * savestate, to send at the next pre-frame. */