Merge pull request #9586 from JoeOsborn/patch-1

Fix BSV recording/playback
This commit is contained in:
Twinaphex 2019-10-11 13:54:13 +02:00 committed by GitHub
commit 2fe4cf6ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12290,7 +12290,7 @@ static int16_t input_state(unsigned port, unsigned device,
if (BSV_MOVIE_IS_PLAYBACK_ON())
{
int16_t bsv_result;
if (intfstream_read(bsv_movie_state_handle->file, &bsv_result, 1) == 1)
if (intfstream_read(bsv_movie_state_handle->file, &bsv_result, 2) == 2)
return swap_if_big16(bsv_result);
bsv_movie_state.movie_end = true;
}
@ -12321,7 +12321,7 @@ static int16_t input_state(unsigned port, unsigned device,
if (BSV_MOVIE_IS_PLAYBACK_OFF())
{
result = swap_if_big16(result);
intfstream_write(bsv_movie_state_handle->file, &result, 1);
intfstream_write(bsv_movie_state_handle->file, &result, 2);
}
return result;