@@ -2716,6 +2716,10 @@ void video_driver_build_info(video_frame_info_t *video_info)
27162716 video_info -> black_frame_insertion = settings -> uints .video_black_frame_insertion ;
27172717 video_info -> hard_sync = settings -> bools .video_hard_sync ;
27182718 video_info -> hard_sync_frames = settings -> uints .video_hard_sync_frames ;
2719+ video_info -> runahead = settings -> bools .run_ahead_enabled ;
2720+ video_info -> runahead_second_instance = settings -> bools .run_ahead_secondary_instance ;
2721+ video_info -> preemptive_frames = settings -> bools .preemptive_frames_enable ;
2722+ video_info -> runahead_frames = settings -> uints .run_ahead_frames ;
27192723 video_info -> fps_show = settings -> bools .video_fps_show ;
27202724 video_info -> memory_show = settings -> bools .video_memory_show ;
27212725 video_info -> statistics_show = settings -> bools .video_statistics_show ;
@@ -3999,6 +4003,7 @@ void video_driver_frame(const void *data, unsigned width,
39994003 if (render_frame && video_info .statistics_show )
40004004 {
40014005 audio_statistics_t audio_stats ;
4006+ char runahead_stats [128 ];
40024007 double stddev = 0.0 ;
40034008 struct retro_system_av_info * av_info = & video_st -> av_info ;
40044009 unsigned red = 255 ;
@@ -4027,18 +4032,34 @@ void video_driver_frame(const void *data, unsigned width,
40274032
40284033 audio_compute_buffer_statistics (& audio_stats );
40294034
4035+ runahead_stats [0 ] = '\0' ;
4036+
4037+ if (video_info .runahead && !video_info .runahead_second_instance )
4038+ snprintf (runahead_stats , sizeof (runahead_stats ),
4039+ " -Run-Ahead Mode: Single Instance\n -Latency frames removed: %u\n" ,
4040+ video_info .runahead_frames );
4041+ else if (video_info .runahead && video_info .runahead_second_instance )
4042+ snprintf (runahead_stats , sizeof (runahead_stats ),
4043+ " -Run-Ahead Mode: Second Instance\n -Latency frames removed: %u\n" ,
4044+ video_info .runahead_frames );
4045+ else if (video_info .preemptive_frames )
4046+ snprintf (runahead_stats , sizeof (runahead_stats ),
4047+ " -Run-Ahead Mode: Preemptive Frames\n -Latency frames removed: %u\n" ,
4048+ video_info .runahead_frames );
4049+
40304050 snprintf (video_info .stat_text ,
40314051 sizeof (video_info .stat_text ),
40324052 "Video Statistics:\n -Frame rate: %6.2f fps\n -Frame time: %6.2f ms\n -Frame time deviation: %.3f %%\n"
4033- " -Frame delay (target/effective): %u/%u ms\n -Frame count: %" PRIu64 "\n -Viewport: %d x %d x %3.2f\n"
4053+ " -Frame count: %" PRIu64 "\n -Frame delay (target/effective): %u/%u ms\n%s -Viewport: %d x %d x %3.2f\n"
40344054 "Audio Statistics:\n -Average buffer saturation: %.2f %%\n -Standard deviation: %.2f %%\n -Time spent close to underrun: %.2f %%\n -Time spent close to blocking: %.2f %%\n -Sample count: %d\n"
40354055 "Core Geometry:\n -Size: %u x %u\n -Max Size: %u x %u\n -Aspect: %3.2f\nCore Timing:\n -FPS: %3.2f\n -Sample Rate: %6.2f\n" ,
40364056 last_fps ,
40374057 frame_time / 1000.0f ,
40384058 100.0f * stddev ,
4059+ video_st -> frame_count ,
40394060 video_st -> frame_delay_target ,
40404061 video_st -> frame_delay_effective ,
4041- video_st -> frame_count ,
4062+ runahead_stats ,
40424063 video_info .width ,
40434064 video_info .height ,
40444065 video_info .refresh_rate ,
0 commit comments