mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Clean up and reduce refresh rate logging (#16259)
This commit is contained in:
parent
8f1678f865
commit
25c15834c3
@ -1174,7 +1174,7 @@ bool video_display_server_set_resolution(unsigned width, unsigned height,
|
||||
int int_hz, float hz, int center, int monitor_index, int xoffset, int padjust)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
RARCH_DBG("[Video]: Display server set resolution, hz: %f\n",hz);
|
||||
RARCH_DBG("[Video]: Display server set resolution to %ux%u %.3f Hz.\n", width, height, hz);
|
||||
if (current_display_server && current_display_server->set_resolution)
|
||||
return current_display_server->set_resolution(
|
||||
video_st->current_display_server_data, width, height, int_hz,
|
||||
@ -1291,7 +1291,7 @@ void video_switch_refresh_rate_maybe(
|
||||
bool video_display_server_set_refresh_rate(float hz)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
RARCH_DBG("[Video]: Display server set refresh rate %f\n", hz);
|
||||
RARCH_DBG("[Video]: Display server set refresh rate to %.3f Hz.\n", hz);
|
||||
if (current_display_server && current_display_server->set_resolution)
|
||||
return current_display_server->set_resolution(
|
||||
video_st->current_display_server_data, 0, 0, (int)hz,
|
||||
@ -1308,9 +1308,18 @@ void video_display_server_restore_refresh_rate(void)
|
||||
|
||||
if (!refresh_rate_original || refresh_rate_current == refresh_rate_original)
|
||||
return;
|
||||
RARCH_DBG("[Video]: Display server restore refresh rate %f\n", refresh_rate_original);
|
||||
video_monitor_set_refresh_rate(refresh_rate_original);
|
||||
video_display_server_set_refresh_rate(refresh_rate_original);
|
||||
|
||||
RARCH_DBG("[Video]: Restoring original refresh rate: %.3f Hz.\n", video_st->video_refresh_rate_original);
|
||||
|
||||
if (video_display_server_set_refresh_rate(refresh_rate_original))
|
||||
{
|
||||
/* Set the av_info fps also to the original refresh rate */
|
||||
/* to avoid re-initialization problems */
|
||||
struct retro_system_av_info *av_info = &video_st->av_info;
|
||||
av_info->timing.fps = video_st->video_refresh_rate_original;
|
||||
|
||||
video_monitor_set_refresh_rate(refresh_rate_original);
|
||||
}
|
||||
}
|
||||
|
||||
const char *video_display_server_get_output_options(void)
|
||||
|
@ -8156,14 +8156,8 @@ bool retroarch_main_quit(void)
|
||||
/* Restore original refresh rate, if it has been changed
|
||||
* automatically in SET_SYSTEM_AV_INFO */
|
||||
if (video_st->video_refresh_rate_original)
|
||||
{
|
||||
RARCH_DBG("[Video]: Restoring original refresh rate: %f Hz\n", video_st->video_refresh_rate_original);
|
||||
/* Set the av_info fps also to the original refresh rate */
|
||||
/* to avoid re-initialization problems */
|
||||
av_info->timing.fps = video_st->video_refresh_rate_original;
|
||||
|
||||
video_display_server_restore_refresh_rate();
|
||||
}
|
||||
|
||||
if (!(runloop_st->flags & RUNLOOP_FLAG_SHUTDOWN_INITIATED))
|
||||
{
|
||||
if (settings->bools.savestate_auto_save &&
|
||||
|
@ -4097,13 +4097,7 @@ void runloop_event_deinit_core(void)
|
||||
/* Restore original refresh rate, if it has been changed
|
||||
* automatically in SET_SYSTEM_AV_INFO */
|
||||
if (video_st->video_refresh_rate_original)
|
||||
{
|
||||
/* Set the av_info fps also to the original refresh rate */
|
||||
/* to avoid re-initialization problems */
|
||||
struct retro_system_av_info *av_info = &video_st->av_info;
|
||||
av_info->timing.fps = video_st->video_refresh_rate_original;
|
||||
video_display_server_restore_refresh_rate();
|
||||
}
|
||||
|
||||
/* Recalibrate frame delay target */
|
||||
if (settings->bools.video_frame_delay_auto)
|
||||
|
Loading…
x
Reference in New Issue
Block a user