Merge pull request #17724 from pstef/negative-accumulator

Allow frame_time_accumulator to go negative
This commit is contained in:
LibretroAdmin 2025-03-23 02:29:41 -07:00 committed by GitHub
commit 8ae97ac91e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -3645,7 +3645,7 @@ void video_driver_frame(const void *data, unsigned width,
static retro_time_t curr_time;
static retro_time_t fps_time;
static float last_fps, frame_time;
static uint16_t frame_time_accumulator;
static int32_t frame_time_accumulator;
/* Mark the start of nonblock state for
* ignoring initial previous frame time */
static int8_t nonblock_active;
@ -3729,7 +3729,7 @@ void video_driver_frame(const void *data, unsigned width,
|| (last_frame_duped && !!data))
)
{
uint16_t frame_time_accumulator_prev = frame_time_accumulator;
int32_t frame_time_accumulator_prev = frame_time_accumulator;
uint16_t frame_time_delta = new_time - last_time;
uint16_t frame_time_target = video_info.frame_time_target;