Take out fps_monitor_enable
This commit is contained in:
parent
7e2a1ed4ab
commit
9627117166
|
@ -278,7 +278,7 @@ static void apple_gfx_ctx_update_window_title(void *data)
|
|||
#ifdef OSX
|
||||
static char buf[128], buf_fps[128];
|
||||
bool got_text = video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
static const char* const text = buf; /* < Can't access buffer directly in the block */
|
||||
if (got_text)
|
||||
[[g_view window] setTitle:[NSString stringWithCString:text encoding:NSUTF8StringEncoding]];
|
||||
|
|
|
@ -379,7 +379,6 @@ struct settings
|
|||
bool menu_show_start_screen;
|
||||
#endif
|
||||
bool fps_show;
|
||||
bool fps_monitor_enable;
|
||||
bool load_dummy_on_core_shutdown;
|
||||
|
||||
bool core_specific_config;
|
||||
|
|
|
@ -1024,7 +1024,6 @@ static bool gx_frame(void *data, const void *frame,
|
|||
const char *msg)
|
||||
{
|
||||
char fps_txt[128], fps_text_buf[128];
|
||||
bool fps_draw = g_settings.fps_show;
|
||||
gx_video_t *gx = (gx_video_t*)data;
|
||||
struct __gx_regdef *__gx = (struct __gx_regdef*)__gxregs;
|
||||
u8 clear_efb = GX_FALSE;
|
||||
|
@ -1114,9 +1113,9 @@ static bool gx_frame(void *data, const void *frame,
|
|||
GX_DrawDone();
|
||||
|
||||
video_monitor_get_fps(fps_txt, sizeof(fps_txt),
|
||||
fps_draw ? fps_text_buf : NULL, sizeof(fps_text_buf));
|
||||
fps_text_buf, sizeof(fps_text_buf));
|
||||
|
||||
if (fps_draw)
|
||||
if (g_settings.fps_draw)
|
||||
{
|
||||
char mem1_txt[128];
|
||||
unsigned x = 15;
|
||||
|
|
|
@ -267,16 +267,10 @@ static void android_gfx_ctx_set_resize(void *data,
|
|||
static void android_gfx_ctx_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_setings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -352,15 +352,11 @@ static void gfx_ctx_qnx_set_resize(void *data, unsigned width, unsigned height)
|
|||
static void gfx_ctx_qnx_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -125,10 +125,9 @@ static void gfx_ctx_d3d_update_title(void *data)
|
|||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
char buf[128], buffer_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
if (video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)))
|
||||
buffer_fps, sizeof(buffer_fps)))
|
||||
{
|
||||
#ifndef _XBOX
|
||||
SetWindowText(d3d->hWnd, buf);
|
||||
|
|
|
@ -264,15 +264,9 @@ static void gfx_ctx_drm_egl_set_resize(void *data,
|
|||
static void gfx_ctx_drm_egl_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -86,15 +86,11 @@ static void gfx_ctx_emscripten_set_resize(void *data,
|
|||
static void gfx_ctx_emscripten_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -191,14 +191,13 @@ static void gfx_ctx_glx_update_window_title(void *data)
|
|||
{
|
||||
char buf[128], buf_fps[128];
|
||||
gfx_ctx_glx_data_t *glx = NULL;
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
glx = (gfx_ctx_glx_data_t*)driver.video_context_data;
|
||||
|
||||
if (video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps)))
|
||||
buf_fps, sizeof(buf_fps)))
|
||||
XStoreName(glx->g_dpy, glx->g_win, buf);
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
|
|
|
@ -198,15 +198,11 @@ static void gfx_ctx_mali_fbdev_set_resize(void *data,
|
|||
static void gfx_ctx_mali_fbdev_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -216,13 +216,9 @@ static void gfx_ctx_ps3_update_window_title(void *data)
|
|||
{
|
||||
(void)data;
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -276,13 +276,12 @@ static void sdl_ctx_update_window_title(void *data)
|
|||
{
|
||||
char buf[128], buf_fps[128];
|
||||
gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)driver.video_context_data;
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
if (!sdl)
|
||||
return;
|
||||
|
||||
if (video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps)))
|
||||
buf_fps, sizeof(buf_fps)))
|
||||
{
|
||||
#ifdef HAVE_SDL2
|
||||
SDL_SetWindowTitle(sdl->g_win, buf);
|
||||
|
|
|
@ -118,15 +118,11 @@ static void gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height)
|
|||
static void gfx_ctx_vc_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -187,15 +187,11 @@ static void gfx_ctx_vivante_set_resize(void *data,
|
|||
static void gfx_ctx_vivante_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!fps_draw)
|
||||
return;
|
||||
|
||||
video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps));
|
||||
buf_fps, sizeof(buf_fps));
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
}
|
||||
|
|
|
@ -331,14 +331,13 @@ static void gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
|
|||
static void gfx_ctx_wl_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)
|
||||
driver.video_context_data;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (video_monitor_get_fps(buf, sizeof(buf), g_settings.fps_show ?
|
||||
buf_fps : NULL, sizeof(buf_fps)))
|
||||
if (video_monitor_get_fps(buf, sizeof(buf),
|
||||
buf_fps, sizeof(buf_fps)))
|
||||
wl_shell_surface_set_title(wl->g_shell_surf, buf);
|
||||
|
||||
if (g_settings.fps_show)
|
||||
|
|
|
@ -346,12 +346,11 @@ static void gfx_ctx_wgl_set_resize(void *data,
|
|||
static void gfx_ctx_wgl_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps)))
|
||||
buf_fps, sizeof(buf_fps)))
|
||||
SetWindowText(g_hwnd, buf);
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
|
|
|
@ -211,12 +211,11 @@ static void gfx_ctx_xegl_set_resize(void *data,
|
|||
static void gfx_ctx_xegl_update_window_title(void *data)
|
||||
{
|
||||
char buf[128], buf_fps[128];
|
||||
bool fps_draw = g_settings.fps_show || g_settings.fps_monitor_enable;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (video_monitor_get_fps(buf, sizeof(buf),
|
||||
g_settings.fps_show ? buf_fps : NULL, sizeof(buf_fps)))
|
||||
buf_fps, sizeof(buf_fps)))
|
||||
XStoreName(g_dpy, g_win, buf);
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
|
|
|
@ -120,8 +120,7 @@ bool video_monitor_fps_statistics(double *refresh_rate,
|
|||
unsigned samples = min(MEASURE_FRAME_TIME_SAMPLES_COUNT,
|
||||
g_runloop.measure_data.frame_time_samples_count);
|
||||
|
||||
if (!g_settings.fps_monitor_enable ||
|
||||
g_settings.video.threaded || (samples < 2))
|
||||
if (g_settings.video.threaded || (samples < 2))
|
||||
return false;
|
||||
|
||||
/* Measure statistics on frame time (microsecs), *not* FPS. */
|
||||
|
|
|
@ -1317,7 +1317,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
|||
CONFIG_GET_BOOL(ui.menubar_enable, "ui_menubar_enable");
|
||||
CONFIG_GET_BOOL(ui.suspend_screensaver_enable, "suspend_screensaver_enable");
|
||||
CONFIG_GET_BOOL(fps_show, "fps_show");
|
||||
CONFIG_GET_BOOL(fps_monitor_enable, "fps_monitor_enable");
|
||||
CONFIG_GET_BOOL(load_dummy_on_core_shutdown, "load_dummy_on_core_shutdown");
|
||||
|
||||
CONFIG_GET_PATH(libretro_info_path, "libretro_info_path");
|
||||
|
@ -1844,7 +1843,6 @@ bool config_save_file(const char *path)
|
|||
config_set_bool(conf, "fps_show", g_settings.fps_show);
|
||||
config_set_bool(conf, "ui_menubar_enable", g_settings.ui.menubar_enable);
|
||||
config_set_bool(conf, "suspend_screensaver_enable", g_settings.ui.suspend_screensaver_enable);
|
||||
config_set_bool(conf, "fps_monitor_enable", g_settings.fps_monitor_enable);
|
||||
config_set_path(conf, "libretro_path", g_settings.libretro);
|
||||
config_set_path(conf, "libretro_directory", g_settings.libretro_directory);
|
||||
config_set_path(conf, "libretro_info_path", g_settings.libretro_info_path);
|
||||
|
|
|
@ -3855,17 +3855,6 @@ static bool setting_data_append_list_video_options(
|
|||
general_read_handler);
|
||||
settings_list_current_add_range(list, list_info, 0, 0, 0.001, true, false);
|
||||
|
||||
CONFIG_BOOL(g_settings.fps_monitor_enable,
|
||||
"fps_monitor_enable",
|
||||
"Monitor FPS Enable",
|
||||
true,
|
||||
"OFF",
|
||||
"ON",
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
CONFIG_FLOAT(
|
||||
g_settings.video.refresh_rate,
|
||||
"video_refresh_rate_auto",
|
||||
|
|
Loading…
Reference in New Issue