Fix bsv playback from a starting state for dosbox (#14939)

This relaxes a warning about save state sizes for cores like
dosbox-pure that don't report accurate save state sizes.

Before, the warning would be issued and the state would not be loaded;
now, the warning is issued and the state is loaded anyway.

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
This commit is contained in:
Joe Osborn 2023-02-02 11:44:30 -08:00 committed by GitHub
parent f2ee255698
commit 23976e9b44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -105,16 +105,16 @@ static bool bsv_movie_init_playback(
return false;
}
core_serialize_size( &info);
if (info.size == state_size)
/* For cores like dosbox, the reported size is not always
correct. So we just give a warning if they don't match up. */
serial_info.data_const = handle->state;
serial_info.size = state_size;
core_unserialize(&serial_info);
if (info.size != state_size)
{
serial_info.data_const = handle->state;
serial_info.size = state_size;
core_unserialize(&serial_info);
}
else
RARCH_WARN("%s\n",
msg_hash_to_str(MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION));
}
}
handle->min_file_pos = sizeof(header) + state_size;