mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-21 03:50:28 +00:00
Create video_monitor_reset
This commit is contained in:
parent
684b9decb0
commit
a0ba714239
4
driver.c
4
driver.c
@ -17,7 +17,6 @@
|
||||
#include "driver.h"
|
||||
#include "general.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "compat/posix_string.h"
|
||||
#include "gfx/video_monitor.h"
|
||||
#include "audio/audio_monitor.h"
|
||||
@ -362,7 +361,6 @@ void init_drivers(int flags)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
|
||||
if (flags & DRIVER_VIDEO)
|
||||
driver->video_data_own = false;
|
||||
@ -385,7 +383,7 @@ void init_drivers(int flags)
|
||||
|
||||
if (flags & DRIVER_VIDEO)
|
||||
{
|
||||
runloop->measure_data.frame_time_samples_count = 0;
|
||||
video_monitor_reset();
|
||||
|
||||
init_video();
|
||||
|
||||
|
@ -235,3 +235,11 @@ bool video_monitor_get_fps(char *buf, size_t size,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void video_monitor_reset(void)
|
||||
{
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
|
||||
if (runloop)
|
||||
runloop->measure_data.frame_time_samples_count = 0;
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ bool video_monitor_fps_statistics(double *refresh_rate,
|
||||
bool video_monitor_get_fps(char *buf, size_t size,
|
||||
char *buf_fps, size_t size_fps);
|
||||
|
||||
void video_monitor_reset(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -383,13 +383,7 @@ static int setting_action_start_libretro_device_type(void *data)
|
||||
static int setting_action_start_video_refresh_rate_auto(
|
||||
void *data)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
runloop->measure_data.frame_time_samples_count = 0;
|
||||
video_monitor_reset();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user