Start adding OSD statistics - doesn't work yet for SDL2/SDL

This commit is contained in:
twinaphex 2018-03-23 17:43:49 +01:00
parent 0ece3d8397
commit 4d1b4f905f
56 changed files with 465 additions and 149 deletions

View File

@ -1215,6 +1215,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("builtin_mediaplayer_enable", &settings->bools.multimedia_builtin_mediaplayer_enable, false, false /* TODO */, false);
SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, true, false);
SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, false, false);
SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, false, false);
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, true, false);
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);

View File

@ -92,6 +92,7 @@ typedef struct settings
bool video_shared_context;
bool video_force_srgb_disable;
bool video_fps_show;
bool video_statistics_show;
bool video_framecount_show;
bool video_msg_bgcolor_enable;

View File

@ -737,6 +737,7 @@ static bool ctr_frame(void* data, const void* frame,
GPU_SetTexEnv(2, GPU_PREVIOUS, GPU_PREVIOUS, 0, 0, 0, 0, 0);
}
#ifdef HAVE_MENU
if (ctr->menu_texture_enable)
{
if(ctr->menu_texture_frame_enable)
@ -770,6 +771,18 @@ static bool ctr_frame(void* data, const void* frame,
ctr->msg_rendering_enabled = false;
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
#endif
if (msg)
font_driver_render_msg(video_info, NULL, msg, NULL);

View File

@ -1268,6 +1268,20 @@ static bool d3d11_gfx_frame(
D3D11SetVertexBuffer(context, 0, d3d11->sprites.vbo, sizeof(d3d11_sprite_t), 0);
menu_driver_frame(video_info);
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
D3D11SetViewports(context, 1, &d3d11->viewport);
D3D11SetBlendState(d3d11->context, d3d11->blend_enable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
D3D11SetVertexBuffer(context, 0, d3d11->sprites.vbo, sizeof(d3d11_sprite_t), 0);
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
#ifdef HAVE_OVERLAY
if (d3d11->overlays.enabled)

View File

@ -1454,7 +1454,21 @@ static bool d3d12_gfx_frame(
D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->sprites.vbo_view);
menu_driver_frame(video_info);
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe_blend);
D3D12RSSetViewports(d3d12->queue.cmd, 1, &d3d12->chain.viewport);
D3D12RSSetScissorRects(d3d12->queue.cmd, 1, &d3d12->chain.scissorRect);
D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->sprites.vbo_view);
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
#ifdef HAVE_OVERLAY
if (d3d12->overlays.enabled)
{

View File

@ -1624,6 +1624,17 @@ static bool d3d8_frame(void *data, const void *frame,
d3d8_set_viewports(d3d->dev, &screen_vp);
menu_driver_frame(video_info);
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
#endif
#ifdef HAVE_OVERLAY

View File

@ -1601,6 +1601,20 @@ static bool d3d9_frame(void *data, const void *frame,
d3d9_set_viewports(d3d->dev, &screen_vp);
menu_driver_frame(video_info);
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
d3d9_set_viewports(d3d->dev, &screen_vp);
d3d9_begin_scene(d3d->dev);
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
d3d9_end_scene(d3d->dev);
}
}
#endif
#ifdef HAVE_OVERLAY

View File

@ -1324,6 +1324,17 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width,
menu_driver_frame(video_info);
#endif
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
if (msg)
{

View File

@ -1144,6 +1144,24 @@ static bool gl_frame(void *data, const void *frame,
if (gl->menu_texture)
gl_draw_texture(gl, video_info);
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
#if 0
osd_params->y = 0.350f;
osd_params->scale = 0.75f;
font_driver_render_msg(video_info, NULL, video_info->chat_text,
(const struct font_params*)&video_info->osd_stat_params);
#endif
}
}
#endif
if (!string_is_empty(msg))

View File

@ -1342,6 +1342,17 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
if (wiiu->menu.enable)
menu_driver_frame(video_info);
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
if (msg)
font_driver_render_msg(video_info, NULL, msg, NULL);

View File

@ -692,8 +692,10 @@ static void sdl2_poke_texture_enable(void *data,
{
sdl2_video_t *vid = (sdl2_video_t*)data;
if (vid)
vid->menu.active = enable;
if (!vid)
return;
vid->menu.active = enable;
}
static void sdl2_poke_set_osd_msg(void *data,

View File

@ -369,7 +369,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width,
SDL_BlitSurface(vid->menu.frame, NULL, vid->screen, NULL);
if (msg)
sdl_render_msg(vid, vid->screen, msg, vid->screen->w, vid->screen->h, vid->screen->format);
sdl_render_msg(vid, vid->screen,
msg, vid->screen->w, vid->screen->h, vid->screen->format);
if (SDL_MUSTLOCK(vid->screen))
SDL_UnlockSurface(vid->screen);

View File

@ -207,6 +207,17 @@ static bool switch_frame(void *data, const void *frame,
#endif
}
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
#endif
#if 0

View File

@ -250,6 +250,17 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
}
}
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
if(!string_is_empty(msg))
font_driver_render_msg(video_info, NULL, msg, NULL);

View File

@ -1841,6 +1841,17 @@ static bool vulkan_frame(void *data, const void *frame,
vulkan_draw_quad(vk, &quad);
}
}
else if (video_info->statistics_show)
{
struct font_params *osd_params = video_info ?
(struct font_params*)&video_info->osd_stat_params : NULL;
if (osd_params)
{
font_driver_render_msg(video_info, NULL, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params);
}
}
#endif
if (msg)

View File

@ -75,29 +75,28 @@ static const struct font_glyph *caca_font_get_glyph(
static void caca_render_msg(video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
float x, y, scale;
unsigned width, height;
unsigned newX, newY;
unsigned align;
caca_raster_t *font = (caca_raster_t*)data;
const struct font_params *params = (const struct font_params*)userdata;
if (!font || string_is_empty(msg))
return;
if (params)
{
x = params->x;
y = params->y;
x = params->x;
y = params->y;
scale = params->scale;
align = params->text_align;
}
else
{
x = video_info->font_msg_pos_x;
y = video_info->font_msg_pos_y;
x = video_info->font_msg_pos_x;
y = video_info->font_msg_pos_y;
scale = 1.0f;
align = TEXT_ALIGN_LEFT;
}

View File

@ -358,15 +358,15 @@ static void ctr_font_render_message(
static void ctr_font_render_msg(
video_frame_info_t *video_info,
void* data, const char* msg,
const void* userdata)
const struct font_params *params)
{
float x, y, scale, drop_mod, drop_alpha;
int drop_x, drop_y;
unsigned max_glyphs;
enum text_alignment text_align;
unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark;
unsigned color, color_dark, r, g, b,
alpha, r_dark, g_dark, b_dark, alpha_dark;
ctr_font_t * font = (ctr_font_t*)data;
const struct font_params* params = (const struct font_params*)userdata;
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -375,19 +375,21 @@ static void ctr_font_render_msg(
if (params)
{
x = params->x;
y = params->y;
scale = params->scale;
text_align = params->text_align;
drop_x = params->drop_x;
drop_y = params->drop_y;
drop_mod = params->drop_mod;
drop_alpha = params->drop_alpha;
r = FONT_COLOR_GET_RED(params->color);
g = FONT_COLOR_GET_GREEN(params->color);
b = FONT_COLOR_GET_BLUE(params->color);
alpha = FONT_COLOR_GET_ALPHA(params->color);
color = params->color;
x = params->x;
y = params->y;
scale = params->scale;
text_align = params->text_align;
drop_x = params->drop_x;
drop_y = params->drop_y;
drop_mod = params->drop_mod;
drop_alpha = params->drop_alpha;
r = FONT_COLOR_GET_RED(params->color);
g = FONT_COLOR_GET_GREEN(params->color);
b = FONT_COLOR_GET_BLUE(params->color);
alpha = FONT_COLOR_GET_ALPHA(params->color);
color = params->color;
}
else
{

View File

@ -276,14 +276,15 @@ static void d3d11_font_render_message(
}
static void d3d11_font_render_msg(
video_frame_info_t* video_info, void* data, const char* msg, const void* userdata)
video_frame_info_t* video_info, void* data,
const char* msg, const struct font_params *params)
{
float x, y, scale, drop_mod, drop_alpha;
int drop_x, drop_y;
enum text_alignment text_align;
unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark;
unsigned color, color_dark, r, g, b,
alpha, r_dark, g_dark, b_dark, alpha_dark;
d3d11_font_t* font = (d3d11_font_t*)data;
const struct font_params* params = (const struct font_params*)userdata;
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -300,10 +301,12 @@ static void d3d11_font_render_msg(
drop_y = params->drop_y;
drop_mod = params->drop_mod;
drop_alpha = params->drop_alpha;
r = FONT_COLOR_GET_RED(params->color);
g = FONT_COLOR_GET_GREEN(params->color);
b = FONT_COLOR_GET_BLUE(params->color);
alpha = FONT_COLOR_GET_ALPHA(params->color);
color = DXGI_COLOR_RGBA(r, g, b, alpha);
}
else
@ -313,11 +316,11 @@ static void d3d11_font_render_msg(
scale = 1.0f;
text_align = TEXT_ALIGN_LEFT;
r = (video_info->font_msg_color_r * 255);
g = (video_info->font_msg_color_g * 255);
b = (video_info->font_msg_color_b * 255);
alpha = 255;
color = DXGI_COLOR_RGBA(r, g, b, alpha);
r = (video_info->font_msg_color_r * 255);
g = (video_info->font_msg_color_g * 255);
b = (video_info->font_msg_color_b * 255);
alpha = 255;
color = DXGI_COLOR_RGBA(r, g, b, alpha);
drop_x = -2;
drop_y = -2;
@ -334,14 +337,16 @@ static void d3d11_font_render_msg(
color_dark = DXGI_COLOR_RGBA(r_dark, g_dark, b_dark, alpha_dark);
d3d11_font_render_message(
video_info, font, msg, scale, color_dark, x + scale * drop_x / width,
video_info, font, msg, scale, color_dark,
x + scale * drop_x / width,
y + scale * drop_y / height, text_align);
}
d3d11_font_render_message(video_info, font, msg, scale, color, x, y, text_align);
d3d11_font_render_message(video_info, font, msg, scale,
color, x, y, text_align);
}
static const struct font_glyph* d3d11_font_get_glyph(void* data, uint32_t code)
static const struct font_glyph* d3d11_font_get_glyph(void *data, uint32_t code)
{
d3d11_font_t* font = (d3d11_font_t*)data;
@ -354,7 +359,10 @@ static const struct font_glyph* d3d11_font_get_glyph(void* data, uint32_t code)
return font->font_driver->get_glyph((void*)font->font_driver, code);
}
static void d3d11_font_bind_block(void* data, void* userdata) { (void)data; }
static void d3d11_font_bind_block(void* data, void *userdata)
{
(void)data;
}
font_renderer_t d3d11_font = {
d3d11_font_init_font,

View File

@ -293,14 +293,14 @@ static void d3d12_font_render_message(
static void d3d12_font_render_msg(
video_frame_info_t* video_info, void* data,
const char* msg, const void* userdata)
const char* msg, const struct font_params *params)
{
float x, y, scale, drop_mod, drop_alpha;
int drop_x, drop_y;
enum text_alignment text_align;
unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark;
unsigned color, color_dark, r, g, b,
alpha, r_dark, g_dark, b_dark, alpha_dark;
d3d12_font_t* font = (d3d12_font_t*)data;
const struct font_params* params = (const struct font_params*)userdata;
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -317,6 +317,7 @@ static void d3d12_font_render_msg(
drop_y = params->drop_y;
drop_mod = params->drop_mod;
drop_alpha = params->drop_alpha;
r = FONT_COLOR_GET_RED(params->color);
g = FONT_COLOR_GET_GREEN(params->color);
b = FONT_COLOR_GET_BLUE(params->color);
@ -330,11 +331,11 @@ static void d3d12_font_render_msg(
scale = 1.0f;
text_align = TEXT_ALIGN_LEFT;
r = (video_info->font_msg_color_r * 255);
g = (video_info->font_msg_color_g * 255);
b = (video_info->font_msg_color_b * 255);
alpha = 255;
color = DXGI_COLOR_RGBA(r, g, b, alpha);
r = (video_info->font_msg_color_r * 255);
g = (video_info->font_msg_color_g * 255);
b = (video_info->font_msg_color_b * 255);
alpha = 255;
color = DXGI_COLOR_RGBA(r, g, b, alpha);
drop_x = -2;
drop_y = -2;

View File

@ -129,14 +129,13 @@ static int d3dfonts_w32_get_message_width(void* data, const char* msg,
static void d3dfonts_w32_render_msg(video_frame_info_t *video_info,
void *data, const char *msg, const void *userdata)
void *data, const char *msg, const struct font_params *params)
{
unsigned format;
unsigned a, r, g, b;
RECT rect, rect_shifted;
RECT *p_rect_shifted = NULL;
RECT *p_rect = NULL;
const struct font_params *params = (const struct font_params*)userdata;
d3dfonts_t *d3dfonts = (d3dfonts_t*)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -154,7 +153,6 @@ static void d3dfonts_w32_render_msg(video_frame_info_t *video_info,
if(params)
{
a = FONT_COLOR_GET_ALPHA(params->color);
r = FONT_COLOR_GET_RED(params->color);
g = FONT_COLOR_GET_GREEN(params->color);

View File

@ -82,46 +82,43 @@ static const struct font_glyph *gdi_font_get_glyph(
static void gdi_render_msg(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
float x, y, scale;
gdi_raster_t *font = (gdi_raster_t*)data;
unsigned newX, newY, len;
unsigned align;
const struct font_params *params = (const struct font_params*)userdata;
unsigned width = video_info->width;
unsigned height = video_info->height;
unsigned red;
unsigned green;
unsigned blue;
gdi_raster_t *font = (gdi_raster_t*)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
if (!font || string_is_empty(msg))
if (!font || string_is_empty(msg) || !font->gdi)
return;
if (params)
{
x = params->x;
y = params->y;
scale = params->scale;
align = params->text_align;
red = FONT_COLOR_GET_RED(params->color);
green = FONT_COLOR_GET_GREEN(params->color);
blue = FONT_COLOR_GET_BLUE(params->color);
x = params->x;
y = params->y;
scale = params->scale;
align = params->text_align;
red = FONT_COLOR_GET_RED(params->color);
green = FONT_COLOR_GET_GREEN(params->color);
blue = FONT_COLOR_GET_BLUE(params->color);
}
else
{
x = video_info->font_msg_pos_x;
y = video_info->font_msg_pos_y;
scale = 1.0f;
align = TEXT_ALIGN_LEFT;
red = video_info->font_msg_color_r * 255.0f;
green = video_info->font_msg_color_g * 255.0f;
blue = video_info->font_msg_color_b * 255.0f;
x = video_info->font_msg_pos_x;
y = video_info->font_msg_pos_y;
scale = 1.0f;
align = TEXT_ALIGN_LEFT;
red = video_info->font_msg_color_r * 255.0f;
green = video_info->font_msg_color_g * 255.0f;
blue = video_info->font_msg_color_b * 255.0f;
}
if (!font->gdi)
return;
len = utf8len(msg);
switch (align)

View File

@ -244,7 +244,8 @@ static int gl_get_message_width(void *data, const char *msg,
return delta_x * scale;
}
static void gl_raster_font_draw_vertices(gl_raster_t *font, const video_coords_t *coords,
static void gl_raster_font_draw_vertices(gl_raster_t *font,
const video_coords_t *coords,
video_frame_info_t *video_info)
{
video_shader_ctx_coords_t coords_data;
@ -414,7 +415,7 @@ static void gl_raster_font_setup_viewport(unsigned width, unsigned height,
static void gl_raster_font_render_msg(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
GLfloat color[4];
int drop_x, drop_y;
@ -424,7 +425,6 @@ static void gl_raster_font_render_msg(
gl_raster_t *font = (gl_raster_t*)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
const struct font_params *params = (const struct font_params*)userdata;
if (!font || string_is_empty(msg))
return;
@ -441,9 +441,9 @@ static void gl_raster_font_render_msg(
drop_mod = params->drop_mod;
drop_alpha = params->drop_alpha;
color[0] = FONT_COLOR_GET_RED(params->color) / 255.0f;
color[0] = FONT_COLOR_GET_RED(params->color) / 255.0f;
color[1] = FONT_COLOR_GET_GREEN(params->color) / 255.0f;
color[2] = FONT_COLOR_GET_BLUE(params->color) / 255.0f;
color[2] = FONT_COLOR_GET_BLUE(params->color) / 255.0f;
color[3] = FONT_COLOR_GET_ALPHA(params->color) / 255.0f;
/* If alpha is 0.0f, turn it into default 1.0f */

View File

@ -67,20 +67,18 @@ static void libdbg_font_free_font(void *data, bool is_threaded)
static void libdbg_font_render_msg(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
float x, y, scale;
unsigned color;
const struct font_params *params = (const struct font_params*)userdata;
(void)data;
if (params)
{
x = params->x;
y = params->y;
scale = params->scale;
color = params->color;
x = params->x;
y = params->y;
scale = params->scale;
color = params->color;
}
else
{

View File

@ -76,32 +76,28 @@ static const struct font_glyph *vga_font_get_glyph(
static void vga_render_msg(video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
float x, y, scale;
unsigned width, height;
unsigned newX, newY;
unsigned align;
vga_raster_t *font = (vga_raster_t*)data;
const struct font_params *params = (const struct font_params*)userdata;
(void)newX;
(void)newY;
if (!font || string_is_empty(msg))
return;
if (params)
{
x = params->x;
y = params->y;
x = params->x;
y = params->y;
scale = params->scale;
align = params->text_align;
}
else
{
x = video_info->font_msg_pos_x;
y = video_info->font_msg_pos_y;
x = video_info->font_msg_pos_x;
y = video_info->font_msg_pos_y;
scale = 1.0f;
align = TEXT_ALIGN_LEFT;
}

View File

@ -264,15 +264,15 @@ static void vita2d_font_render_message(
static void vita2d_font_render_msg(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
float x, y, scale, drop_mod, drop_alpha;
int drop_x, drop_y;
unsigned max_glyphs;
enum text_alignment text_align;
unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark;
unsigned color, color_dark, r, g, b,
alpha, r_dark, g_dark, b_dark, alpha_dark;
vita_font_t *font = (vita_font_t *)data;
const struct font_params *params = (const struct font_params*)userdata;
unsigned width = video_info->width;
unsigned height = video_info->height;

View File

@ -329,7 +329,7 @@ static void vulkan_raster_font_flush(vulkan_raster_t *font)
static void vulkan_raster_font_render_msg(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
float color[4], color_dark[4];
int drop_x, drop_y;
@ -341,7 +341,6 @@ static void vulkan_raster_font_render_msg(
vulkan_raster_t *font = (vulkan_raster_t*)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
const struct font_params *params = (const struct font_params*)userdata;
if (!font || !msg || !*msg)
return;

View File

@ -289,15 +289,15 @@ static void wiiu_font_render_message(
static void wiiu_font_render_msg(
video_frame_info_t *video_info,
void* data, const char* msg,
const void* userdata)
const struct font_params *params)
{
float x, y, scale, drop_mod, drop_alpha;
int drop_x, drop_y;
unsigned max_glyphs;
enum text_alignment text_align;
unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark;
wiiu_font_t * font = (wiiu_font_t*)data;
const struct font_params* params = (const struct font_params*)userdata;
unsigned color, color_dark, r, g, b,
alpha, r_dark, g_dark, b_dark, alpha_dark;
wiiu_font_t *font = (wiiu_font_t*)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -314,6 +314,7 @@ static void wiiu_font_render_msg(
drop_y = params->drop_y;
drop_mod = params->drop_mod;
drop_alpha = params->drop_alpha;
r = FONT_COLOR_GET_RED(params->color);
g = FONT_COLOR_GET_GREEN(params->color);
b = FONT_COLOR_GET_BLUE(params->color);

View File

@ -80,11 +80,10 @@ static void xfonts_free_font(void *data, bool is_threaded)
static void xfonts_render_msg(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *userdata)
const struct font_params *params)
{
wchar_t str[PATH_MAX_LENGTH];
float x, y;
const struct font_params *params = (const struct font_params*)userdata;
xfonts_t *xfonts = (xfonts_t*)data;
if (params)
@ -98,7 +97,8 @@ static void xfonts_render_msg(
y = video_info->font_msg_pos_y;
}
d3d8_device_get_backbuffer(xfonts->d3d->dev, -1, 0, D3DBACKBUFFER_TYPE_MONO, &xfonts->surf);
d3d8_device_get_backbuffer(xfonts->d3d->dev,
-1, 0, D3DBACKBUFFER_TYPE_MONO, &xfonts->surf);
mbstowcs(str, msg, sizeof(str) / sizeof(wchar_t));

View File

@ -769,12 +769,11 @@ static void xdk360_draw_text(xdk360_video_font_t *font,
static void xdk360_render_msg(
video_frame_info_t *video_info,
void *data, const char *str_msg,
const void *userdata)
const struct font_params *params)
{
float x, y;
wchar_t msg[PATH_MAX_LENGTH];
xdk360_video_font_t *font = (xdk360_video_font_t*)data;
const struct font_params *params = (const struct font_params*)userdata;
if (params)
{

View File

@ -777,18 +777,24 @@ static char* font_driver_reshape_msg(const char* msg)
void font_driver_render_msg(
video_frame_info_t *video_info,
void *font_data,
const char *msg, const void *params)
const char *msg,
const struct font_params *params)
{
font_data_t *font = (font_data_t*)(font_data ? font_data : video_font_driver);
font_data_t *font = (font_data_t*)(font_data
? font_data : video_font_driver);
if (msg && *msg && font && font->renderer && font->renderer->render_msg)
{
#ifdef HAVE_LANGEXTRA
char* new_msg = font_driver_reshape_msg(msg);
font->renderer->render_msg(video_info, font->renderer_data, new_msg, params);
free(new_msg);
char *new_msg = font_driver_reshape_msg(msg);
#else
font->renderer->render_msg(video_info, font->renderer_data, msg, params);
char *new_msg = msg;
#endif
font->renderer->render_msg(video_info,
font->renderer_data, new_msg, params);
#ifdef HAVE_LANGEXTRA
free(new_msg);
#endif
}
}

View File

@ -26,30 +26,6 @@
RETRO_BEGIN_DECLS
enum font_driver_render_api
{
FONT_DRIVER_RENDER_DONT_CARE,
FONT_DRIVER_RENDER_OPENGL_API,
FONT_DRIVER_RENDER_D3D8_API,
FONT_DRIVER_RENDER_D3D9_API,
FONT_DRIVER_RENDER_D3D11_API,
FONT_DRIVER_RENDER_D3D12_API,
FONT_DRIVER_RENDER_VITA2D,
FONT_DRIVER_RENDER_CTR,
FONT_DRIVER_RENDER_WIIU,
FONT_DRIVER_RENDER_VULKAN_API,
FONT_DRIVER_RENDER_CACA,
FONT_DRIVER_RENDER_GDI,
FONT_DRIVER_RENDER_VGA
};
enum text_alignment
{
TEXT_ALIGN_LEFT = 0,
TEXT_ALIGN_RIGHT,
TEXT_ALIGN_CENTER
};
/* All coordinates and offsets are top-left oriented.
*
* This is a texture-atlas approach which allows text to
@ -111,7 +87,7 @@ typedef struct font_renderer
void (*render_msg)(
video_frame_info_t *video_info,
void *data, const char *msg,
const void *params);
const struct font_params *params);
const char *ident;
const struct font_glyph *(*get_glyph)(void *data, uint32_t code);
@ -152,7 +128,7 @@ int font_renderer_create_default(const void **driver,
void **handle, const char *font_path, unsigned font_size);
void font_driver_render_msg(video_frame_info_t *video_info,
void *font_data, const char *msg, const void *params);
void *font_data, const char *msg, const struct font_params *params);
void font_driver_bind_block(void *font_data, void *block);

View File

@ -78,6 +78,34 @@ enum rarch_display_type
RARCH_DISPLAY_OSX
};
enum font_driver_render_api
{
FONT_DRIVER_RENDER_DONT_CARE,
FONT_DRIVER_RENDER_OPENGL_API,
FONT_DRIVER_RENDER_D3D8_API,
FONT_DRIVER_RENDER_D3D9_API,
FONT_DRIVER_RENDER_D3D11_API,
FONT_DRIVER_RENDER_D3D12_API,
FONT_DRIVER_RENDER_VITA2D,
FONT_DRIVER_RENDER_CTR,
FONT_DRIVER_RENDER_WIIU,
FONT_DRIVER_RENDER_VULKAN_API,
FONT_DRIVER_RENDER_CACA,
FONT_DRIVER_RENDER_GDI,
FONT_DRIVER_RENDER_VGA
};
enum text_alignment
{
TEXT_ALIGN_LEFT = 0,
TEXT_ALIGN_RIGHT,
TEXT_ALIGN_CENTER
};
#ifndef COLOR_ABGR
#define COLOR_ABGR(r, g, b, a) (((unsigned)(a) << 24) | ((b) << 16) | ((g) << 8) | ((r) << 0))
#endif
#define LAST_ASPECT_RATIO ASPECT_RATIO_CUSTOM
/* ABGR color format defines */

View File

@ -1321,9 +1321,13 @@ bool video_monitor_fps_statistics(double *refresh_rate,
accum_var += diff * diff;
}
*deviation = sqrt((double)accum_var / (samples - 1)) / avg;
*refresh_rate = 1000000.0 / avg;
*sample_points = samples;
*deviation = sqrt((double)accum_var / (samples - 1)) / avg;
if (refresh_rate)
*refresh_rate = 1000000.0 / avg;
if (sample_points)
*sample_points = samples;
return true;
}
@ -2381,8 +2385,8 @@ void video_driver_frame(const void *data, unsigned width,
unsigned write_index =
video_driver_frame_time_count++ &
(MEASURE_FRAME_TIME_SAMPLES_COUNT - 1);
video_driver_frame_time_samples[write_index] = new_time - fps_time;
frame_time = new_time - fps_time;
video_driver_frame_time_samples[write_index] = frame_time;
fps_time = new_time;
if (video_driver_frame_count == 1)
@ -2501,6 +2505,51 @@ void video_driver_frame(const void *data, unsigned width,
#endif
}
if (video_info.statistics_show)
{
double stddev = 0.0;
struct retro_system_av_info *av_info = &video_driver_av_info;
bool measure_frame_time = video_monitor_fps_statistics(NULL, &stddev, NULL);
unsigned red = 255;
unsigned green = 255;
unsigned blue = 255;
unsigned alpha = 255;
video_info.osd_stat_params.x = 0.010f;
video_info.osd_stat_params.y = 0.950f;
video_info.osd_stat_params.scale = 1.0f;
video_info.osd_stat_params.full_screen = true;
video_info.osd_stat_params.drop_x = -2;
video_info.osd_stat_params.drop_y = -2;
video_info.osd_stat_params.drop_mod = 0.3f;
video_info.osd_stat_params.drop_alpha = 1.0f;
video_info.osd_stat_params.color = COLOR_ABGR(red, green, blue, alpha);
snprintf(video_info.stat_text,
sizeof(video_info.stat_text),
"Frontend Statistics:\n -Frame rate: %6.2f\n -Frame time: %6.2f\n -Frame time deviation: %6.2f\n"
" -Frame count: %" PRIu64"\n -Viewport: %d x %d x %3.2f\n"
"Core Geometry:\n -Size: %u x %u\n -Aspect: %3.2f\nCore Timing:\n -FPS: %3.2f\n -Sample Rate: %6.2f\n",
video_info.frame_rate,
video_info.frame_time,
100.0 * stddev,
video_info.frame_count,
video_info.width,
video_info.height,
video_info.refresh_rate,
av_info->geometry.base_width,
av_info->geometry.base_height,
av_info->geometry.aspect_ratio,
av_info->timing.fps,
av_info->timing.sample_rate);
/* TODO/FIXME - add OSD chat text here */
#if 0
snprintf(video_info.chat_text, sizeof(video_info.chat_text),
"anon: does retroarch netplay have in-game chat?\nradius: I don't know \u2605");
#endif
}
video_driver_active = current_video->frame(
video_driver_data, data, width, height,
video_driver_frame_count,
@ -2608,6 +2657,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
video_info->hard_sync = settings->bools.video_hard_sync;
video_info->hard_sync_frames = settings->uints.video_hard_sync_frames;
video_info->fps_show = settings->bools.video_fps_show;
video_info->statistics_show = settings->bools.video_statistics_show;
video_info->framecount_show = settings->bools.video_framecount_show;
video_info->scale_integer = settings->bools.video_scale_integer;
video_info->aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;

View File

@ -402,6 +402,7 @@ typedef struct video_frame_info
bool black_frame_insertion;
bool hard_sync;
bool fps_show;
bool statistics_show;
bool framecount_show;
bool scale_integer;
bool post_filter_record;
@ -450,11 +451,31 @@ typedef struct video_frame_info
float xmb_alpha_factor;
char fps_text[128];
char stat_text[256];
char chat_text[256];
uint64_t frame_count;
float frame_time;
float frame_rate;
struct
{
float x;
float y;
float scale;
/* Drop shadow color multiplier. */
float drop_mod;
/* Drop shadow offset.
* If both are 0, no drop shadow will be rendered. */
int drop_x, drop_y;
/* Drop shadow alpha */
float drop_alpha;
/* ABGR. Use the macros. */
uint32_t color;
bool full_screen;
enum text_alignment text_align;
} osd_stat_params;
void (*cb_update_window_title)(void*, void *);
void (*cb_swap_buffers)(void*, void *);
bool (*cb_get_metrics)(void *data, enum display_metric_types type,

View File

@ -3419,3 +3419,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES,
"Watch shader files for changes")
MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES,
"Auto-apply changes made to shader files on disk.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3207,3 +3207,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3199,3 +3199,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3315,3 +3315,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3072,3 +3072,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -5801,3 +5801,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES,
"Auto-aplica los cambios hechos a los archivos shader del disco"
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3237,3 +3237,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Qualité du ré-échantilloneur audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3295,3 +3295,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Qualità del Resampler Audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Abbassare questo valore per favorire prestazioni/bassa latenza rispetto alla qualità audio, aumentare se si desidera una migliore qualità audio a scapito delle prestazioni/minore latenza.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3313,3 +3313,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES,
"シェーダーファイルの変更を監視")
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SHOW_DECORATIONS,
"ウィンドウ枠を表示")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3200,3 +3200,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -427,6 +427,8 @@ MSG_HASH(MENU_ENUM_LABEL_FAVORITES_TAB,
"favorites_tab")
MSG_HASH(MENU_ENUM_LABEL_FPS_SHOW,
"fps_show")
MSG_HASH(MENU_ENUM_LABEL_STATISTICS_SHOW,
"statistics_show")
MSG_HASH(MENU_ENUM_LABEL_FRAME_THROTTLE_ENABLE,
"fastforward_ratio_throttle_enable")
MSG_HASH(MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS,

View File

@ -3074,3 +3074,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3335,3 +3335,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -4180,3 +4180,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Qualidade da Reamostragem do Áudio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Abaixe esse valor para favorecer o desempenho/baixa latência em relação à qualidade de áudio, aumente se desejar melhor qualidade de áudio à custa do desempenho/baixa latência.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3174,3 +3174,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Qualidade de reamostragem de som")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Baixe este valor para favorecer o desempenho ou baixar a latência sobre a qualidade do som, ou aumente caso pretenda melhor qualidade de som a troco de desempenho/baixa latência.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3258,3 +3258,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3435,3 +3435,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES,
"Auto-apply changes made to shader files on disk.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SHOW_DECORATIONS,
"Show Window Decorations")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -3227,3 +3227,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
"Audio Resampler Quality")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
"Display Statistics")
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Show onscreen technical statistics.")

View File

@ -89,6 +89,7 @@ default_sublabel_macro(action_bind_sublabel_user_language, MENU_
default_sublabel_macro(action_bind_sublabel_max_swapchain_images, MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES )
default_sublabel_macro(action_bind_sublabel_online_updater, MENU_ENUM_SUBLABEL_ONLINE_UPDATER)
default_sublabel_macro(action_bind_sublabel_fps_show, MENU_ENUM_SUBLABEL_FPS_SHOW)
default_sublabel_macro(action_bind_sublabel_statistics_show, MENU_ENUM_SUBLABEL_STATISTICS_SHOW)
default_sublabel_macro(action_bind_sublabel_netplay_settings, MENU_ENUM_SUBLABEL_NETPLAY)
default_sublabel_macro(action_bind_sublabel_user_bind_settings, MENU_ENUM_SUBLABEL_INPUT_USER_BINDS)
default_sublabel_macro(action_bind_sublabel_input_hotkey_settings, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS)
@ -1397,6 +1398,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_max_swapchain_images);
break;
case MENU_ENUM_LABEL_STATISTICS_SHOW:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_statistics_show);
break;
case MENU_ENUM_LABEL_FPS_SHOW:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_fps_show);
break;

View File

@ -4997,6 +4997,15 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_VIDEO_FONT_ENABLE,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_FPS_SHOW,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_STATISTICS_SHOW,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_VIDEO_FONT_PATH,
PARSE_ONLY_PATH, false);
@ -5759,12 +5768,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_FPS_SHOW,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
PARSE_ACTION, false);

View File

@ -3313,6 +3313,21 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_statistics_show,
MENU_ENUM_LABEL_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
fps_show,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_framecount_show,

View File

@ -1126,6 +1126,7 @@ enum msg_hash_enums
MENU_LABEL(SHADER_PREV),
MENU_LABEL(FRAME_ADVANCE),
MENU_LABEL(FPS_SHOW),
MENU_LABEL(STATISTICS_SHOW),
MENU_LABEL(FRAMECOUNT_SHOW),
MENU_LABEL(MOVIE_RECORD_TOGGLE),
MENU_ENUM_LABEL_L_X_PLUS,