From ef0eba5c5f8c379bc9cef29ebc02a81f4bacddd2 Mon Sep 17 00:00:00 2001 From: Joe Osborn Date: Fri, 11 Oct 2019 07:37:58 -0400 Subject: [PATCH] Fix BSV recording/playback Inputs are 16-bit numbers, but the file writing routines were called with just one byte lengths. This change fixes BSV recording and playback for me. --- retroarch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroarch.c b/retroarch.c index e06bd2306b..c597e89255 100644 --- a/retroarch.c +++ b/retroarch.c @@ -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;