mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
fix rewind not working when RetroAchievements cannot identify game
This commit is contained in:
parent
af7f1f7f91
commit
dfcf0c042c
2
deps/rcheevos/src/rc_client.c
vendored
2
deps/rcheevos/src/rc_client.c
vendored
@ -5384,7 +5384,7 @@ size_t rc_client_progress_size(rc_client_t* client)
|
||||
return client->state.external_client->progress_size();
|
||||
#endif
|
||||
|
||||
if (!client->game)
|
||||
if (!rc_client_is_game_loaded(client))
|
||||
return 0;
|
||||
|
||||
rc_mutex_lock(&client->state.mutex);
|
||||
|
@ -448,8 +448,20 @@ bool content_serialize_state_rewind(void* buffer, size_t buffer_size)
|
||||
{
|
||||
rastate_size_info_t size;
|
||||
size_t len = content_get_rastate_size(&size, true);
|
||||
if (len == 0 || len > buffer_size)
|
||||
if (len == 0)
|
||||
return false;
|
||||
if (len > buffer_size)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
static size_t last_reported_len = 0;
|
||||
if (len != last_reported_len)
|
||||
{
|
||||
last_reported_len = len;
|
||||
RARCH_WARN("Rewind state size exceeds frame size (%zu > %zu).\n", len, buffer_size);
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
return content_write_serialized_state(buffer, &size, true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user