mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Start properly namespacing monitor_* functions
This commit is contained in:
parent
a5b306406c
commit
0286078f8f
16
driver.c
16
driver.c
@ -249,12 +249,12 @@ static void adjust_system_rates(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* driver_set_monitor_refresh_rate:
|
||||
* video_monitor_set_refresh_rate:
|
||||
* @hz : New refresh rate for monitor.
|
||||
*
|
||||
* Sets monitor refresh rate to new value.
|
||||
**/
|
||||
void driver_set_monitor_refresh_rate(float hz)
|
||||
void video_monitor_set_refresh_rate(float hz)
|
||||
{
|
||||
char msg[PATH_MAX_LENGTH];
|
||||
snprintf(msg, sizeof(msg), "Setting refresh rate to: %.3f Hz.", hz);
|
||||
@ -765,11 +765,11 @@ void init_drivers(int flags)
|
||||
}
|
||||
|
||||
/**
|
||||
* compute_monitor_fps_statistics:
|
||||
* video_monitor_compute_fps_statistics:
|
||||
*
|
||||
* Computes monitor FPS statistics.
|
||||
**/
|
||||
static void compute_monitor_fps_statistics(void)
|
||||
static void video_monitor_compute_fps_statistics(void)
|
||||
{
|
||||
double avg_fps = 0.0, stddev = 0.0;
|
||||
unsigned samples = 0;
|
||||
@ -789,7 +789,7 @@ static void compute_monitor_fps_statistics(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (driver_monitor_fps_statistics(&avg_fps, &stddev, &samples))
|
||||
if (video_monitor_fps_statistics(&avg_fps, &stddev, &samples))
|
||||
{
|
||||
RARCH_LOG("Average monitor Hz: %.6f Hz. (%.3f %% frame time deviation, based on %u last samples).\n",
|
||||
avg_fps, 100.0 * stddev, samples);
|
||||
@ -819,7 +819,7 @@ static void uninit_video_input(void)
|
||||
deinit_video_filter();
|
||||
|
||||
rarch_main_command(RARCH_CMD_SHADER_DIR_DEINIT);
|
||||
compute_monitor_fps_statistics();
|
||||
video_monitor_compute_fps_statistics();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -889,7 +889,7 @@ void uninit_drivers(int flags)
|
||||
|
||||
|
||||
/**
|
||||
* driver_monitor_fps_statistics
|
||||
* video_monitor_fps_statistics
|
||||
* @refresh_rate : Monitor refresh rate.
|
||||
* @deviation : Deviation from measured refresh rate.
|
||||
* @sample_points : Amount of sampled points.
|
||||
@ -903,7 +903,7 @@ void uninit_drivers(int flags)
|
||||
* b) less than 2 frame time samples.
|
||||
* c) FPS monitor enable is off.
|
||||
**/
|
||||
bool driver_monitor_fps_statistics(double *refresh_rate,
|
||||
bool video_monitor_fps_statistics(double *refresh_rate,
|
||||
double *deviation, unsigned *sample_points)
|
||||
{
|
||||
unsigned i;
|
||||
|
8
driver.h
8
driver.h
@ -348,15 +348,15 @@ void find_prev_driver(const char *label, char *str, size_t sizeof_str);
|
||||
void find_next_driver(const char *label, char *str, size_t sizeof_str);
|
||||
|
||||
/**
|
||||
* driver_set_monitor_refresh_rate:
|
||||
* video_monitor_set_refresh_rate:
|
||||
* @hz : New refresh rate for monitor.
|
||||
*
|
||||
* Sets monitor refresh rate to new value.
|
||||
**/
|
||||
void driver_set_monitor_refresh_rate(float hz);
|
||||
void video_monitor_set_refresh_rate(float hz);
|
||||
|
||||
/**
|
||||
* driver_monitor_fps_statistics
|
||||
* video_monitor_fps_statistics
|
||||
* @refresh_rate : Monitor refresh rate.
|
||||
* @deviation : Deviation from measured refresh rate.
|
||||
* @sample_points : Amount of sampled points.
|
||||
@ -370,7 +370,7 @@ void driver_set_monitor_refresh_rate(float hz);
|
||||
* b) less than 2 frame time samples.
|
||||
* c) FPS monitor enable is off.
|
||||
**/
|
||||
bool driver_monitor_fps_statistics(double *refresh_rate,
|
||||
bool video_monitor_fps_statistics(double *refresh_rate,
|
||||
double *deviation, unsigned *sample_points);
|
||||
|
||||
/**
|
||||
|
@ -292,16 +292,16 @@ void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines)
|
||||
if (tvmode == VI_PAL)
|
||||
{
|
||||
if (modetype == VI_NON_INTERLACE)
|
||||
driver_set_monitor_refresh_rate(50.0801f);
|
||||
video_monitor_set_refresh_rate(50.0801f);
|
||||
else
|
||||
driver_set_monitor_refresh_rate(50.0f);
|
||||
video_monitor_set_refresh_rate(50.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (modetype == VI_NON_INTERLACE)
|
||||
driver_set_monitor_refresh_rate(59.8261f);
|
||||
video_monitor_set_refresh_rate(59.8261f);
|
||||
else
|
||||
driver_set_monitor_refresh_rate(59.94f);
|
||||
video_monitor_set_refresh_rate(59.94f);
|
||||
}
|
||||
|
||||
/* Don't spam the queue when scrolling through resolutions. */
|
||||
|
@ -1009,10 +1009,10 @@ static int setting_data_action_ok_video_refresh_rate_auto(
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (driver_monitor_fps_statistics(&video_refresh_rate,
|
||||
if (video_monitor_fps_statistics(&video_refresh_rate,
|
||||
&deviation, &sample_points))
|
||||
{
|
||||
driver_set_monitor_refresh_rate(video_refresh_rate);
|
||||
video_monitor_set_refresh_rate(video_refresh_rate);
|
||||
/* Incase refresh rate update forced non-block video. */
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
}
|
||||
@ -1317,7 +1317,7 @@ static void menu_common_setting_set_label_st_float(rarch_setting_t *setting,
|
||||
double deviation = 0.0;
|
||||
unsigned sample_points = 0;
|
||||
|
||||
if (driver_monitor_fps_statistics(&video_refresh_rate, &deviation, &sample_points))
|
||||
if (video_monitor_fps_statistics(&video_refresh_rate, &deviation, &sample_points))
|
||||
snprintf(type_str, type_str_size, "%.3f Hz (%.1f%% dev, %u samples)",
|
||||
video_refresh_rate, 100.0 * deviation, sample_points);
|
||||
else
|
||||
@ -3098,7 +3098,7 @@ static void general_write_handler(void *data)
|
||||
{
|
||||
if (driver.video && driver.video_data)
|
||||
{
|
||||
driver_set_monitor_refresh_rate(*setting->value.fraction);
|
||||
video_monitor_set_refresh_rate(*setting->value.fraction);
|
||||
|
||||
/* In case refresh rate update forced non-block video. */
|
||||
rarch_cmd = RARCH_CMD_VIDEO_SET_BLOCKING_STATE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user