mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-20 07:42:38 +00:00
Add RARCH_DISPLAY_CTL_MONITOR_RESET
This commit is contained in:
parent
21cabec759
commit
e1ac9aed6b
3
driver.c
3
driver.c
@ -382,8 +382,7 @@ void init_drivers(int flags)
|
||||
const struct retro_hw_render_callback *hw_render =
|
||||
(const struct retro_hw_render_callback*)video_driver_callback();
|
||||
|
||||
video_monitor_reset();
|
||||
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_MONITOR_RESET, NULL);
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_INIT, NULL);
|
||||
|
||||
if (!driver->video_cache_context_ack
|
||||
|
@ -1031,11 +1031,6 @@ bool video_monitor_get_fps(char *buf, size_t size,
|
||||
return true;
|
||||
}
|
||||
|
||||
void video_monitor_reset(void)
|
||||
{
|
||||
video_state.frame_time_samples_count = 0;
|
||||
}
|
||||
|
||||
float video_driver_get_aspect_ratio(void)
|
||||
{
|
||||
return video_state.aspect_ratio;
|
||||
@ -1154,6 +1149,9 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
|
||||
return init_video();
|
||||
case RARCH_DISPLAY_CTL_DEINIT:
|
||||
return uninit_video_input();
|
||||
case RARCH_DISPLAY_CTL_MONITOR_RESET:
|
||||
video_state.frame_time_samples_count = 0;
|
||||
return true;
|
||||
case RARCH_DISPLAY_CTL_SET_ASPECT_RATIO:
|
||||
if (!poke || !poke->set_aspect_ratio)
|
||||
return false;
|
||||
|
@ -223,6 +223,7 @@ enum rarch_display_ctl_state
|
||||
RARCH_DISPLAY_CTL_NONE = 0,
|
||||
RARCH_DISPLAY_CTL_INIT,
|
||||
RARCH_DISPLAY_CTL_DEINIT,
|
||||
RARCH_DISPLAY_CTL_MONITOR_RESET,
|
||||
RARCH_DISPLAY_CTL_APPLY_STATE_CHANGES,
|
||||
RARCH_DISPLAY_CTL_FIND_DRIVER,
|
||||
RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE,
|
||||
|
@ -75,8 +75,6 @@ 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
|
||||
|
@ -880,7 +880,7 @@ static int setting_action_start_libretro_device_type(void *data)
|
||||
static int setting_action_start_video_refresh_rate_auto(
|
||||
void *data)
|
||||
{
|
||||
video_monitor_reset();
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_MONITOR_RESET, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user