Fix latency header in video stats (#17451)

This commit is contained in:
sonninnos 2025-01-21 05:31:13 +02:00 committed by GitHub
parent a49196ee30
commit 3797d4deb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 35 additions and 33 deletions

View File

@ -4156,8 +4156,10 @@ void video_driver_frame(const void *data, unsigned width,
video_info.height,
video_info.scale_width,
video_info.scale_height,
(float)video_info.scale_width / ((rotation % 2) ? (float)video_st->frame_cache_height : (float)video_st->frame_cache_width),
(float)video_info.scale_height / ((rotation % 2) ? (float)video_st->frame_cache_width : (float)video_st->frame_cache_height),
(float)video_info.scale_width / ((rotation % 2)
? (float)video_st->frame_cache_height : (float)video_st->frame_cache_width),
(float)video_info.scale_height / ((rotation % 2)
? (float)video_st->frame_cache_width : (float)video_st->frame_cache_height),
video_info.refresh_rate,
last_fps,
frame_time / 1000.0f,
@ -4172,10 +4174,10 @@ void video_driver_frame(const void *data, unsigned width,
audio_stats.samples
);
/* TODO/FIXME - localize */
if ( (video_st->frame_delay_target > 0)
|| (video_info.runahead && !video_info.runahead_second_instance))
|| (video_info.runahead)
|| (video_info.preemptive_frames))
__len += strlcpy(video_info.stat_text + __len, "LATENCY\n",
sizeof(video_info.stat_text) - __len);