Index: kernel/arch/dreamcast/include/dc/pvr.h =================================================================== --- kernel/arch/dreamcast/include/dc/pvr.h (revision 103) +++ kernel/arch/dreamcast/include/dc/pvr.h (working copy) @@ -533,7 +533,10 @@ is a super-set of frame count. */ int pvr_get_stats(pvr_stats_t *stat); +/* Reset current PVR statistics to initial values. */ +void pvr_reset_stats(); + /* Palette management ************************************************/ /* In addition to its 16-bit truecolor modes, the PVR also supports some Index: kernel/arch/dreamcast/hardware/pvr/pvr_misc.c =================================================================== --- kernel/arch/dreamcast/hardware/pvr/pvr_misc.c (revision 103) +++ kernel/arch/dreamcast/hardware/pvr/pvr_misc.c (working copy) @@ -59,6 +59,18 @@ return 0; } +void pvr_reset_stats() { + pvr_state.vbl_count = 0; + pvr_state.frame_last_time = 0; + pvr_state.reg_start_time = 0; + pvr_state.rnd_start_time = 0; + pvr_state.frame_last_len = -1; + pvr_state.reg_last_len = -1; + pvr_state.rnd_last_len = -1; + pvr_state.vtx_buf_used = 0; + pvr_state.vtx_buf_used_max = 0; +} + /******** INTERNAL STUFF ************************************************/ /* Update statistical counters */ Index: kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c =================================================================== --- kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c (revision 103) +++ kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c (working copy) @@ -90,15 +90,7 @@ pvr_state.flip_completed = 1; /* Clear out our stats */ - pvr_state.vbl_count = 0; - pvr_state.frame_last_time = 0; - pvr_state.reg_start_time = 0; - pvr_state.rnd_start_time = 0; - pvr_state.frame_last_len = -1; - pvr_state.reg_last_len = -1; - pvr_state.rnd_last_len = -1; - pvr_state.vtx_buf_used = 0; - pvr_state.vtx_buf_used_max = 0; + pvr_reset_stats(); /* If we're on a VGA box, disable vertical smoothing */ if (vid_mode->cable_type == CT_VGA) {