mirror of
https://github.com/libretro/RetroArch
synced 2025-03-21 04:21:13 +00:00
commit
4e3ba81757
@ -433,13 +433,7 @@ static void* ctr_init(const video_info_t* video,
|
|||||||
driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &refresh_rate);
|
driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &refresh_rate);
|
||||||
aptHook(&ctr->lcd_aptHook, ctr_lcd_aptHook, ctr);
|
aptHook(&ctr->lcd_aptHook, ctr_lcd_aptHook, ctr);
|
||||||
|
|
||||||
if (!font_driver_init_first(NULL, NULL, ctr, *settings->path.font
|
font_driver_init_osd(ctr, false, FONT_DRIVER_RENDER_CTR);
|
||||||
? settings->path.font : NULL, settings->video.font_size, false,
|
|
||||||
FONT_DRIVER_RENDER_CTR))
|
|
||||||
{
|
|
||||||
RARCH_ERR("Font: Failed to initialize font renderer.\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ctr->msg_rendering_enabled = false;
|
ctr->msg_rendering_enabled = false;
|
||||||
ctr->menu_texture_frame_enable = false;
|
ctr->menu_texture_frame_enable = false;
|
||||||
|
@ -815,13 +815,7 @@ static bool d3d_initialize(d3d_video_t *d3d, const video_info_t *info)
|
|||||||
strlcpy(settings->path.font, "game:\\media\\Arial_12.xpr",
|
strlcpy(settings->path.font, "game:\\media\\Arial_12.xpr",
|
||||||
sizeof(settings->path.font));
|
sizeof(settings->path.font));
|
||||||
#endif
|
#endif
|
||||||
if (!font_driver_init_first(NULL, NULL,
|
font_driver_init_osd(d3d, false, FONT_DRIVER_RENDER_DIRECT3D_API);
|
||||||
d3d, settings->path.font, 0, false,
|
|
||||||
FONT_DRIVER_RENDER_DIRECT3D_API))
|
|
||||||
{
|
|
||||||
RARCH_ERR("[D3D]: Failed to initialize font renderer.\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1412,8 +1412,7 @@ static void gl_free(void *data)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (font_driver_has_render_msg())
|
font_driver_free_osd();
|
||||||
font_driver_free(NULL);
|
|
||||||
video_shader_driver_deinit();
|
video_shader_driver_deinit();
|
||||||
|
|
||||||
#ifndef NO_GL_FF_VERTEX
|
#ifndef NO_GL_FF_VERTEX
|
||||||
@ -2083,12 +2082,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
video_context_driver_input_driver(&inp);
|
video_context_driver_input_driver(&inp);
|
||||||
|
|
||||||
if (settings->video.font_enable)
|
if (settings->video.font_enable)
|
||||||
{
|
font_driver_init_osd(gl, false, FONT_DRIVER_RENDER_OPENGL_API);
|
||||||
if (!font_driver_init_first(NULL, NULL, gl, *settings->path.font
|
|
||||||
? settings->path.font : NULL, settings->video.font_size, false,
|
|
||||||
FONT_DRIVER_RENDER_OPENGL_API))
|
|
||||||
RARCH_ERR("[GL]: Failed to initialize font renderer.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_GL_ASYNC_READBACK
|
#ifdef HAVE_GL_ASYNC_READBACK
|
||||||
gl_init_pbo_readback(gl);
|
gl_init_pbo_readback(gl);
|
||||||
|
@ -102,13 +102,8 @@ static void *vita2d_gfx_init(const video_info_t *video,
|
|||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
vita->overlay_enable = false;
|
vita->overlay_enable = false;
|
||||||
#endif
|
#endif
|
||||||
if (!font_driver_init_first(NULL, NULL, vita, *settings->path.font
|
font_driver_init_osd(vita, false, FONT_DRIVER_RENDER_VITA2D);
|
||||||
? settings->path.font : NULL, settings->video.font_size, false,
|
|
||||||
FONT_DRIVER_RENDER_VITA2D))
|
|
||||||
{
|
|
||||||
RARCH_ERR("Font: Failed to initialize font renderer.\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return vita;
|
return vita;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1113,12 +1113,7 @@ static void *vulkan_init(const video_info_t *video,
|
|||||||
video_context_driver_input_driver(&inp);
|
video_context_driver_input_driver(&inp);
|
||||||
|
|
||||||
if (settings->video.font_enable)
|
if (settings->video.font_enable)
|
||||||
{
|
font_driver_init_osd(vk, false, FONT_DRIVER_RENDER_VULKAN_API);
|
||||||
if (!font_driver_init_first(NULL, NULL, vk, *settings->path.font
|
|
||||||
? settings->path.font : NULL, settings->video.font_size, false,
|
|
||||||
FONT_DRIVER_RENDER_VULKAN_API))
|
|
||||||
RARCH_ERR("[Vulkan]: Failed to initialize font renderer.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
vulkan_init_readback(vk);
|
vulkan_init_readback(vk);
|
||||||
return vk;
|
return vk;
|
||||||
|
@ -681,7 +681,7 @@ static bool gfx_ctx_x_set_video_mode(void *data,
|
|||||||
#ifdef HAVE_VULKAN
|
#ifdef HAVE_VULKAN
|
||||||
{
|
{
|
||||||
bool quit, resize;
|
bool quit, resize;
|
||||||
unsigned width, height;
|
unsigned width = 0, height = 0;
|
||||||
x11_check_window(x, &quit, &resize, &width, &height, 0);
|
x11_check_window(x, &quit, &resize, &width, &height, 0);
|
||||||
|
|
||||||
/* Use XCB surface since it's the most supported WSI.
|
/* Use XCB surface since it's the most supported WSI.
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
static const font_renderer_driver_t *font_backends[] = {
|
static const font_renderer_driver_t *font_backends[] = {
|
||||||
#ifdef HAVE_FREETYPE
|
#ifdef HAVE_FREETYPE
|
||||||
&freetype_font_renderer,
|
&freetype_font_renderer,
|
||||||
@ -38,9 +40,7 @@ static const font_renderer_driver_t *font_backends[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct font_renderer *font_osd_driver;
|
static void *g_osd_font;
|
||||||
|
|
||||||
static void *font_osd_data;
|
|
||||||
|
|
||||||
int font_renderer_create_default(const void **data, void **handle,
|
int font_renderer_create_default(const void **data, void **handle,
|
||||||
const char *font_path, unsigned font_size)
|
const char *font_path, unsigned font_size)
|
||||||
@ -276,77 +276,109 @@ static bool font_init_first(
|
|||||||
|
|
||||||
bool font_driver_has_render_msg(void)
|
bool font_driver_has_render_msg(void)
|
||||||
{
|
{
|
||||||
if (!font_osd_driver || !font_osd_driver->render_msg)
|
|
||||||
return false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void font_driver_render_msg(void *font_data,
|
void font_driver_render_msg(void *font_data,
|
||||||
const char *msg, const struct font_params *params)
|
const char *msg, const struct font_params *params)
|
||||||
{
|
{
|
||||||
|
font_data_t *font = (font_data_t*)(font_data ? font_data : g_osd_font);
|
||||||
if (font_osd_driver && font_osd_driver->render_msg)
|
if (font && font->renderer->render_msg)
|
||||||
font_osd_driver->render_msg(font_data
|
font->renderer->render_msg(font->renderer_data, msg, params);
|
||||||
? font_data : font_osd_data, msg, params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void font_driver_bind_block(void *font_data, void *block)
|
void font_driver_bind_block(void *font_data, void *block)
|
||||||
{
|
{
|
||||||
void *new_font_data = font_data
|
font_data_t *font = (font_data_t*)(font_data ? font_data : g_osd_font);
|
||||||
? font_data : font_osd_data;
|
|
||||||
|
|
||||||
if (font_osd_driver && font_osd_driver->bind_block)
|
if (font->renderer && font->renderer->bind_block)
|
||||||
font_osd_driver->bind_block(new_font_data, block);
|
font->renderer->bind_block(font->renderer_data, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
void font_driver_flush(void *data)
|
void font_driver_flush(void *font_data)
|
||||||
{
|
{
|
||||||
if (font_osd_driver && font_osd_driver->flush)
|
font_data_t *font = (font_data_t*)(font_data ? font_data : g_osd_font);
|
||||||
font_osd_driver->flush(data);
|
if (font->renderer && font->renderer->flush)
|
||||||
|
font->renderer->flush(font->renderer_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int font_driver_get_message_width(void *data,
|
int font_driver_get_message_width(void *font_data,
|
||||||
const char *msg, unsigned len, float scale)
|
const char *msg, unsigned len, float scale)
|
||||||
{
|
{
|
||||||
|
font_data_t *font = (font_data_t*)(font_data ? font_data : g_osd_font);
|
||||||
if (!font_osd_driver || !font_osd_driver->get_message_width)
|
if (!font->renderer || !font->renderer->get_message_width)
|
||||||
return -1;
|
return -1;
|
||||||
return font_osd_driver->get_message_width(data, msg, len, scale);
|
return font->renderer->get_message_width(font->renderer_data, msg, len, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void font_driver_free(void *data)
|
void font_driver_free(void *font_data)
|
||||||
{
|
{
|
||||||
if (font_osd_driver && font_osd_driver->free)
|
font_data_t *font = (font_data_t*)font_data;
|
||||||
font_osd_driver->free(data ? data : font_osd_data);
|
|
||||||
|
|
||||||
if (data)
|
if (font)
|
||||||
return;
|
{
|
||||||
|
if (font->renderer && font->renderer->free)
|
||||||
|
font->renderer->free(font->renderer_data);
|
||||||
|
|
||||||
font_osd_data = NULL;
|
font->renderer = NULL;
|
||||||
font_osd_driver = NULL;
|
font->renderer_data = NULL;
|
||||||
|
|
||||||
|
free(font);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool font_driver_init_first(
|
font_data_t *font_driver_init_first(
|
||||||
const void **font_driver, void **font_handle,
|
void *video_data, const char *font_path, float font_size,
|
||||||
void *data, const char *font_path, float font_size,
|
bool threading_hint, enum font_driver_render_api api)
|
||||||
bool threading_hint,
|
|
||||||
enum font_driver_render_api api)
|
|
||||||
{
|
{
|
||||||
const void **new_font_driver = font_driver ? font_driver
|
const void *font_driver;
|
||||||
: (const void**)&font_osd_driver;
|
void *font_handle;
|
||||||
void **new_font_handle = font_handle ? font_handle
|
bool ok = false;
|
||||||
: (void**)&font_osd_data;
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (threading_hint
|
if (threading_hint
|
||||||
&& settings->video.threaded
|
&& settings->video.threaded
|
||||||
&& !video_driver_is_hw_context())
|
&& !video_driver_is_hw_context())
|
||||||
return video_thread_font_init(new_font_driver, new_font_handle,
|
ok = video_thread_font_init(&font_driver, &font_handle,
|
||||||
data, font_path, font_size, api, font_init_first);
|
video_data, font_path, font_size, api, font_init_first);
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
ok = font_init_first(&font_driver, &font_handle,
|
||||||
|
video_data, font_path, font_size, api);
|
||||||
|
|
||||||
return font_init_first(new_font_driver, new_font_handle,
|
if (ok)
|
||||||
data, font_path, font_size, api);
|
{
|
||||||
|
font_data_t *font = (font_data_t*)calloc(1, sizeof(*font));
|
||||||
|
font->renderer = (const font_renderer_t*)font_driver;
|
||||||
|
font->renderer_data = font_handle;
|
||||||
|
font->size = font_size;
|
||||||
|
return font;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void font_driver_init_osd(void *video_data, bool threading_hint, enum font_driver_render_api api)
|
||||||
|
{
|
||||||
|
if (!g_osd_font)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
g_osd_font = font_driver_init_first(video_data,
|
||||||
|
*settings->path.font ? settings->path.font : NULL,
|
||||||
|
settings->video.font_size, threading_hint, api);
|
||||||
|
|
||||||
|
if (!g_osd_font)
|
||||||
|
RARCH_ERR("[font]: Failed to initialize OSD font.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void font_driver_free_osd(void)
|
||||||
|
{
|
||||||
|
if (g_osd_font)
|
||||||
|
font_driver_free(g_osd_font);
|
||||||
|
|
||||||
|
g_osd_font = NULL;
|
||||||
|
}
|
||||||
|
@ -126,25 +126,34 @@ typedef struct font_renderer_driver
|
|||||||
int (*get_line_height)(void* data);
|
int (*get_line_height)(void* data);
|
||||||
} font_renderer_driver_t;
|
} font_renderer_driver_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
const font_renderer_t *renderer;
|
||||||
|
void *renderer_data;
|
||||||
|
float size;
|
||||||
|
} font_data_t;
|
||||||
|
|
||||||
/* font_path can be NULL for default font. */
|
/* font_path can be NULL for default font. */
|
||||||
int font_renderer_create_default(const void **driver,
|
int font_renderer_create_default(const void **driver,
|
||||||
void **handle, const char *font_path, unsigned font_size);
|
void **handle, const char *font_path, unsigned font_size);
|
||||||
|
|
||||||
bool font_driver_has_render_msg(void);
|
bool font_driver_has_render_msg(void);
|
||||||
|
|
||||||
void font_driver_render_msg(void *data, const char *msg, const struct font_params *params);
|
void font_driver_render_msg(void *font_data, const char *msg, const struct font_params *params);
|
||||||
|
|
||||||
void font_driver_bind_block(void *font_data, void *block);
|
void font_driver_bind_block(void *font_data, void *block);
|
||||||
|
|
||||||
int font_driver_get_message_width(void *data, const char *msg, unsigned len, float scale);
|
int font_driver_get_message_width(void *font_data, const char *msg, unsigned len, float scale);
|
||||||
|
|
||||||
void font_driver_flush(void *data);
|
void font_driver_flush(void *font_data);
|
||||||
|
|
||||||
void font_driver_free(void *data);
|
void font_driver_free(void *font_data);
|
||||||
|
|
||||||
bool font_driver_init_first(const void **font_driver, void **font_handle,
|
font_data_t *font_driver_init_first(void *video_data, const char *font_path,
|
||||||
void *data, const char *font_path, float font_size,
|
float font_size, bool threading_hint, enum font_driver_render_api api);
|
||||||
bool threading_hint, enum font_driver_render_api api);
|
|
||||||
|
void font_driver_init_osd(void *video_data, bool threading_hint, enum font_driver_render_api api);
|
||||||
|
void font_driver_free_osd(void);
|
||||||
|
|
||||||
extern font_renderer_t gl_raster_font;
|
extern font_renderer_t gl_raster_font;
|
||||||
extern font_renderer_t libdbg_font;
|
extern font_renderer_t libdbg_font;
|
||||||
|
@ -118,6 +118,7 @@ typedef struct mui_handle
|
|||||||
size_t selection_ptr;
|
size_t selection_ptr;
|
||||||
} categories;
|
} categories;
|
||||||
|
|
||||||
|
font_data_t *font;
|
||||||
video_font_raster_block_t list_block;
|
video_font_raster_block_t list_block;
|
||||||
float scroll_y;
|
float scroll_y;
|
||||||
} mui_handle_t;
|
} mui_handle_t;
|
||||||
@ -250,16 +251,13 @@ static void mui_draw_tab(mui_handle_t *mui,
|
|||||||
&tab_color[0]);
|
&tab_color[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mui_draw_text(float x, float y, unsigned width, unsigned height,
|
static void mui_draw_text(font_data_t *font, float x, float y, unsigned width, unsigned height,
|
||||||
const char *msg, uint32_t color, enum text_alignment text_align)
|
const char *msg, uint32_t color, enum text_alignment text_align)
|
||||||
{
|
{
|
||||||
int font_size;
|
|
||||||
struct font_params params;
|
struct font_params params;
|
||||||
|
|
||||||
font_size = menu_display_get_font_size();
|
|
||||||
|
|
||||||
params.x = x / width;
|
params.x = x / width;
|
||||||
params.y = 1.0f - (y + font_size / 3) / height;
|
params.y = 1.0f - (y + font->size / 3) / height;
|
||||||
params.scale = 1.0f;
|
params.scale = 1.0f;
|
||||||
params.drop_mod = 0.0f;
|
params.drop_mod = 0.0f;
|
||||||
params.drop_x = 0.0f;
|
params.drop_x = 0.0f;
|
||||||
@ -268,7 +266,7 @@ static void mui_draw_text(float x, float y, unsigned width, unsigned height,
|
|||||||
params.full_screen = true;
|
params.full_screen = true;
|
||||||
params.text_align = text_align;
|
params.text_align = text_align;
|
||||||
|
|
||||||
menu_display_draw_text(msg, width, height, ¶ms);
|
menu_display_draw_text(font, msg, width, height, ¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mui_render_quad(mui_handle_t *mui,
|
static void mui_render_quad(mui_handle_t *mui,
|
||||||
@ -402,13 +400,11 @@ static void mui_render_messagebox(mui_handle_t *mui,
|
|||||||
|
|
||||||
video_driver_get_size(&width, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
line_height = menu_display_get_font_size() * 1.2;
|
line_height = mui->font->size * 1.2;
|
||||||
|
|
||||||
x = width / 2;
|
x = width / 2;
|
||||||
y = height / 2 - (list->size-1) * line_height / 2;
|
y = height / 2 - (list->size-1) * line_height / 2;
|
||||||
|
|
||||||
fb_buf = menu_display_get_font_buffer();
|
|
||||||
|
|
||||||
/* find the longest line width */
|
/* find the longest line width */
|
||||||
for (i = 0; i < list->size; i++)
|
for (i = 0; i < list->size; i++)
|
||||||
{
|
{
|
||||||
@ -417,7 +413,7 @@ static void mui_render_messagebox(mui_handle_t *mui,
|
|||||||
if (len > longest)
|
if (len > longest)
|
||||||
{
|
{
|
||||||
longest = len;
|
longest = len;
|
||||||
longest_width = font_driver_get_message_width(fb_buf, msg, len, 1);
|
longest_width = font_driver_get_message_width(mui->font, msg, len, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,7 +433,7 @@ static void mui_render_messagebox(mui_handle_t *mui,
|
|||||||
{
|
{
|
||||||
const char *msg = list->elems[i].data;
|
const char *msg = list->elems[i].data;
|
||||||
if (msg)
|
if (msg)
|
||||||
mui_draw_text(x - longest_width/2.0, y + i * line_height,
|
mui_draw_text(mui->font, x - longest_width/2.0, y + i * line_height,
|
||||||
width, height,
|
width, height,
|
||||||
msg, font_color, TEXT_ALIGN_LEFT);
|
msg, font_color, TEXT_ALIGN_LEFT);
|
||||||
}
|
}
|
||||||
@ -564,7 +560,7 @@ static void mui_render_label_value(mui_handle_t *mui,
|
|||||||
|
|
||||||
menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker);
|
menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker);
|
||||||
|
|
||||||
mui_draw_text(mui->margin, y + mui->line_height / 2,
|
mui_draw_text(mui->font, mui->margin, y + mui->line_height / 2,
|
||||||
width, height, label_str, color, TEXT_ALIGN_LEFT);
|
width, height, label_str, color, TEXT_ALIGN_LEFT);
|
||||||
|
|
||||||
if (string_is_equal(value, "disabled") || string_is_equal(value, "off"))
|
if (string_is_equal(value, "disabled") || string_is_equal(value, "off"))
|
||||||
@ -623,7 +619,7 @@ static void mui_render_label_value(mui_handle_t *mui,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (do_draw_text)
|
if (do_draw_text)
|
||||||
mui_draw_text(width - mui->margin,
|
mui_draw_text(mui->font, width - mui->margin,
|
||||||
y + mui->line_height / 2,
|
y + mui->line_height / 2,
|
||||||
width, height, value_str, color, TEXT_ALIGN_RIGHT);
|
width, height, value_str, color, TEXT_ALIGN_RIGHT);
|
||||||
|
|
||||||
@ -1114,7 +1110,7 @@ static void mui_frame(void *data)
|
|||||||
&highlighted_entry_color[0]
|
&highlighted_entry_color[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
menu_display_font_bind_block(&mui->list_block);
|
menu_display_font_bind_block(mui->font, &mui->list_block);
|
||||||
|
|
||||||
mui_render_menu_list(
|
mui_render_menu_list(
|
||||||
mui,
|
mui,
|
||||||
@ -1125,7 +1121,7 @@ static void mui_frame(void *data)
|
|||||||
&active_tab_marker_color[0]
|
&active_tab_marker_color[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
menu_display_font_flush_block();
|
menu_display_font_flush_block(mui->font);
|
||||||
menu_animation_ctl(MENU_ANIMATION_CTL_SET_ACTIVE, NULL);
|
menu_animation_ctl(MENU_ANIMATION_CTL_SET_ACTIVE, NULL);
|
||||||
|
|
||||||
/* header */
|
/* header */
|
||||||
@ -1216,7 +1212,7 @@ static void mui_frame(void *data)
|
|||||||
strlcpy(title_buf, title_buf_msg_tmp, sizeof(title_buf));
|
strlcpy(title_buf, title_buf_msg_tmp, sizeof(title_buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
mui_draw_text(title_margin, header_height / 2, width, height,
|
mui_draw_text(mui->font, title_margin, header_height / 2, width, height,
|
||||||
title_buf, font_header_color, TEXT_ALIGN_LEFT);
|
title_buf, font_header_color, TEXT_ALIGN_LEFT);
|
||||||
|
|
||||||
mui_draw_scrollbar(mui, width, height, &grey_bg[0]);
|
mui_draw_scrollbar(mui, width, height, &grey_bg[0]);
|
||||||
@ -1279,19 +1275,17 @@ static void mui_layout(mui_handle_t *mui)
|
|||||||
mui->icon_size = scale_factor / 3;
|
mui->icon_size = scale_factor / 3;
|
||||||
|
|
||||||
menu_display_set_header_height(new_header_height);
|
menu_display_set_header_height(new_header_height);
|
||||||
menu_display_set_font_size(new_font_size);
|
|
||||||
|
|
||||||
/* we assume the average glyph aspect ratio is close to 3:4 */
|
/* we assume the average glyph aspect ratio is close to 3:4 */
|
||||||
mui->glyph_width = new_font_size * 3/4;
|
mui->glyph_width = new_font_size * 3/4;
|
||||||
|
|
||||||
menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT);
|
mui->font = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
||||||
|
new_font_size);
|
||||||
|
|
||||||
fb_buf = menu_display_get_font_buffer();
|
if (mui->font) /* calculate a more realistic ticker_limit */
|
||||||
|
|
||||||
if (fb_buf) /* calculate a more realistic ticker_limit */
|
|
||||||
{
|
{
|
||||||
unsigned m_width =
|
unsigned m_width =
|
||||||
font_driver_get_message_width(fb_buf, "a", 1, 1);
|
font_driver_get_message_width(mui->font, "a", 1, 1);
|
||||||
|
|
||||||
if (m_width)
|
if (m_width)
|
||||||
mui->glyph_width = m_width;
|
mui->glyph_width = m_width;
|
||||||
@ -1317,9 +1311,6 @@ static void *mui_init(void **userdata)
|
|||||||
|
|
||||||
*userdata = mui;
|
*userdata = mui;
|
||||||
|
|
||||||
mui_layout(mui);
|
|
||||||
menu_display_allocate_white_texture();
|
|
||||||
|
|
||||||
mui->cursor.size = 64.0;
|
mui->cursor.size = 64.0;
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
@ -1361,7 +1352,7 @@ static void mui_context_destroy(void *data)
|
|||||||
for (i = 0; i < MUI_TEXTURE_LAST; i++)
|
for (i = 0; i < MUI_TEXTURE_LAST; i++)
|
||||||
video_driver_texture_unload(&mui->textures.list[i]);
|
video_driver_texture_unload(&mui->textures.list[i]);
|
||||||
|
|
||||||
menu_display_font_main_deinit();
|
menu_display_font_free(mui->font);
|
||||||
|
|
||||||
mui_context_bg_destroy(mui);
|
mui_context_bg_destroy(mui);
|
||||||
}
|
}
|
||||||
|
@ -277,6 +277,8 @@ typedef struct xmb_handle
|
|||||||
xmb_node_t history_tab_node;
|
xmb_node_t history_tab_node;
|
||||||
xmb_node_t add_tab_node;
|
xmb_node_t add_tab_node;
|
||||||
|
|
||||||
|
font_data_t *font;
|
||||||
|
float font_size;
|
||||||
video_font_raster_block_t raster_block;
|
video_font_raster_block_t raster_block;
|
||||||
|
|
||||||
unsigned tabs[8];
|
unsigned tabs[8];
|
||||||
@ -666,7 +668,7 @@ static void xmb_draw_text(xmb_handle_t *xmb,
|
|||||||
params.drop_alpha = 0.35f;
|
params.drop_alpha = 0.35f;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_display_draw_text(str, width, height, ¶ms);
|
menu_display_draw_text(xmb->font, str, width, height, ¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_messagebox(void *data, const char *message)
|
static void xmb_messagebox(void *data, const char *message)
|
||||||
@ -682,7 +684,7 @@ static void xmb_messagebox(void *data, const char *message)
|
|||||||
static void xmb_render_messagebox_internal(
|
static void xmb_render_messagebox_internal(
|
||||||
xmb_handle_t *xmb, const char *message)
|
xmb_handle_t *xmb, const char *message)
|
||||||
{
|
{
|
||||||
int x, y, font_size, longest = 0, longest_width = 0;
|
int x, y, longest = 0, longest_width = 0;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
struct string_list *list = NULL;
|
struct string_list *list = NULL;
|
||||||
@ -700,12 +702,8 @@ static void xmb_render_messagebox_internal(
|
|||||||
if (list->elems == 0)
|
if (list->elems == 0)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
font_size = menu_display_get_font_size();
|
|
||||||
|
|
||||||
x = width / 2;
|
x = width / 2;
|
||||||
y = height / 2 - (list->size-1) * font_size / 2;
|
y = height / 2 - (list->size-1) * xmb->font->size / 2;
|
||||||
|
|
||||||
fb_buf = menu_display_get_font_buffer();
|
|
||||||
|
|
||||||
/* find the longest line width */
|
/* find the longest line width */
|
||||||
for (i = 0; i < list->size; i++)
|
for (i = 0; i < list->size; i++)
|
||||||
@ -715,7 +713,7 @@ static void xmb_render_messagebox_internal(
|
|||||||
if (len > longest)
|
if (len > longest)
|
||||||
{
|
{
|
||||||
longest = len;
|
longest = len;
|
||||||
longest_width = font_driver_get_message_width(fb_buf, msg, len, 1);
|
longest_width = font_driver_get_message_width(xmb->font, msg, len, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -727,7 +725,7 @@ static void xmb_render_messagebox_internal(
|
|||||||
xmb_draw_text(
|
xmb_draw_text(
|
||||||
xmb, msg,
|
xmb, msg,
|
||||||
x - longest_width/2.0,
|
x - longest_width/2.0,
|
||||||
y + i * font_size,
|
y + i * xmb->font->size,
|
||||||
1,
|
1,
|
||||||
1,
|
1,
|
||||||
TEXT_ALIGN_LEFT,
|
TEXT_ALIGN_LEFT,
|
||||||
@ -2212,7 +2210,7 @@ static void xmb_frame(void *data)
|
|||||||
|
|
||||||
video_driver_get_size(&width, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
menu_display_font_bind_block(&xmb->raster_block);
|
menu_display_font_bind_block(xmb->font, &xmb->raster_block);
|
||||||
|
|
||||||
xmb->raster_block.carr.coords.vertices = 0;
|
xmb->raster_block.carr.coords.vertices = 0;
|
||||||
|
|
||||||
@ -2409,7 +2407,7 @@ static void xmb_frame(void *data)
|
|||||||
width,
|
width,
|
||||||
height);
|
height);
|
||||||
|
|
||||||
menu_display_font_flush_block();
|
menu_display_font_flush_block(xmb->font);
|
||||||
|
|
||||||
if (menu_input_dialog_get_display_kb())
|
if (menu_input_dialog_get_display_kb())
|
||||||
{
|
{
|
||||||
@ -2492,8 +2490,8 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
|||||||
xmb->margins.label.top = new_font_size / 3.0;
|
xmb->margins.label.top = new_font_size / 3.0;
|
||||||
xmb->margins.setting.left = 600.0 * scale_factor;
|
xmb->margins.setting.left = 600.0 * scale_factor;
|
||||||
xmb->icon.size = 128.0 * scale_factor;
|
xmb->icon.size = 128.0 * scale_factor;
|
||||||
|
xmb->font_size = new_font_size;
|
||||||
|
|
||||||
menu_display_set_font_size(new_font_size);
|
|
||||||
menu_display_set_header_height(new_header_height);
|
menu_display_set_header_height(new_header_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2543,8 +2541,8 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
|||||||
xmb->margins.label.top = new_font_size / 3.0;
|
xmb->margins.label.top = new_font_size / 3.0;
|
||||||
xmb->margins.setting.left = 600.0 * scale_factor;
|
xmb->margins.setting.left = 600.0 * scale_factor;
|
||||||
xmb->icon.size = 128.0 * scale_factor;
|
xmb->icon.size = 128.0 * scale_factor;
|
||||||
|
xmb->font_size = new_font_size;
|
||||||
|
|
||||||
menu_display_set_font_size(new_font_size);
|
|
||||||
menu_display_set_header_height(new_header_height);
|
menu_display_set_header_height(new_header_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2732,7 +2730,8 @@ static void *xmb_init(void **userdata)
|
|||||||
menu_display_allocate_white_texture();
|
menu_display_allocate_white_texture();
|
||||||
|
|
||||||
xmb_init_horizontal_list(xmb);
|
xmb_init_horizontal_list(xmb);
|
||||||
menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT);
|
/* FIXME: remove this? */
|
||||||
|
xmb->font = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT, xmb->font_size);
|
||||||
xmb_init_ribbon(xmb);
|
xmb_init_ribbon(xmb);
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
@ -2996,7 +2995,7 @@ static void xmb_context_reset(void *data)
|
|||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||||
|
|
||||||
xmb_layout(xmb);
|
xmb_layout(xmb);
|
||||||
menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT);
|
xmb->font = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT, xmb->font_size);
|
||||||
xmb_context_reset_textures(xmb, iconpath);
|
xmb_context_reset_textures(xmb, iconpath);
|
||||||
xmb_context_reset_background(iconpath);
|
xmb_context_reset_background(iconpath);
|
||||||
xmb_context_reset_horizontal_list(xmb);
|
xmb_context_reset_horizontal_list(xmb);
|
||||||
@ -3289,7 +3288,7 @@ static void xmb_context_destroy(void *data)
|
|||||||
xmb_context_destroy_horizontal_list(xmb);
|
xmb_context_destroy_horizontal_list(xmb);
|
||||||
xmb_context_bg_destroy(xmb);
|
xmb_context_bg_destroy(xmb);
|
||||||
|
|
||||||
menu_display_font_main_deinit();
|
menu_display_font_free(xmb->font);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_toggle(void *userdata, bool menu_on)
|
static void xmb_toggle(void *userdata, bool menu_on)
|
||||||
|
@ -175,8 +175,10 @@ static bool menu_display_ctr_font_init_first(
|
|||||||
void **font_handle, void *video_data,
|
void **font_handle, void *video_data,
|
||||||
const char *font_path, float font_size)
|
const char *font_path, float font_size)
|
||||||
{
|
{
|
||||||
return font_driver_init_first(NULL, font_handle, video_data,
|
font_data_t **handle = (font_data_t**)font_handle;
|
||||||
|
*handle = font_driver_init_first(video_data,
|
||||||
font_path, font_size, true, FONT_DRIVER_RENDER_CTR);
|
font_path, font_size, true, FONT_DRIVER_RENDER_CTR);
|
||||||
|
return *handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_display_ctx_driver_t menu_display_ctx_ctr = {
|
menu_display_ctx_driver_t menu_display_ctx_ctr = {
|
||||||
|
@ -253,8 +253,10 @@ static bool menu_display_d3d_font_init_first(
|
|||||||
void **font_handle, void *video_data,
|
void **font_handle, void *video_data,
|
||||||
const char *font_path, float font_size)
|
const char *font_path, float font_size)
|
||||||
{
|
{
|
||||||
return font_driver_init_first(NULL, font_handle, video_data,
|
font_data_t **handle = (font_data_t**)font_handle;
|
||||||
|
*handle = font_driver_init_first(video_data,
|
||||||
font_path, font_size, true, FONT_DRIVER_RENDER_DIRECT3D_API);
|
font_path, font_size, true, FONT_DRIVER_RENDER_DIRECT3D_API);
|
||||||
|
return *handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_display_ctx_driver_t menu_display_ctx_d3d = {
|
menu_display_ctx_driver_t menu_display_ctx_d3d = {
|
||||||
|
@ -217,8 +217,11 @@ static bool menu_display_gl_font_init_first(
|
|||||||
void **font_handle, void *video_data,
|
void **font_handle, void *video_data,
|
||||||
const char *font_path, float font_size)
|
const char *font_path, float font_size)
|
||||||
{
|
{
|
||||||
return font_driver_init_first(NULL, font_handle, video_data,
|
font_data_t **handle = (font_data_t**)font_handle;
|
||||||
|
*handle = font_driver_init_first(video_data,
|
||||||
font_path, font_size, true, FONT_DRIVER_RENDER_OPENGL_API);
|
font_path, font_size, true, FONT_DRIVER_RENDER_OPENGL_API);
|
||||||
|
|
||||||
|
return *handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_display_ctx_driver_t menu_display_ctx_gl = {
|
menu_display_ctx_driver_t menu_display_ctx_gl = {
|
||||||
|
@ -229,8 +229,10 @@ static bool menu_display_vita2d_font_init_first(
|
|||||||
void **font_handle, void *video_data,
|
void **font_handle, void *video_data,
|
||||||
const char *font_path, float font_size)
|
const char *font_path, float font_size)
|
||||||
{
|
{
|
||||||
return font_driver_init_first(NULL, font_handle, video_data,
|
font_data_t **handle = (font_data_t**)font_handle;
|
||||||
|
*handle = font_driver_init_first(video_data,
|
||||||
font_path, font_size, true, FONT_DRIVER_RENDER_VITA2D);
|
font_path, font_size, true, FONT_DRIVER_RENDER_VITA2D);
|
||||||
|
return *handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_display_ctx_driver_t menu_display_ctx_vita2d = {
|
menu_display_ctx_driver_t menu_display_ctx_vita2d = {
|
||||||
|
@ -255,8 +255,11 @@ static bool menu_display_vk_font_init_first(
|
|||||||
void **font_handle, void *video_data, const char *font_path,
|
void **font_handle, void *video_data, const char *font_path,
|
||||||
float font_size)
|
float font_size)
|
||||||
{
|
{
|
||||||
return font_driver_init_first(NULL, font_handle, video_data,
|
font_data_t **handle = (font_data_t**)font_handle;
|
||||||
|
*handle = font_driver_init_first(video_data,
|
||||||
font_path, font_size, true, FONT_DRIVER_RENDER_VULKAN_API);
|
font_path, font_size, true, FONT_DRIVER_RENDER_VULKAN_API);
|
||||||
|
|
||||||
|
return *handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_display_ctx_driver_t menu_display_ctx_vulkan = {
|
menu_display_ctx_driver_t menu_display_ctx_vulkan = {
|
||||||
|
@ -163,13 +163,11 @@ static video_coord_array_t menu_disp_ca;
|
|||||||
static unsigned menu_display_framebuf_width = 0;
|
static unsigned menu_display_framebuf_width = 0;
|
||||||
static unsigned menu_display_framebuf_height = 0;
|
static unsigned menu_display_framebuf_height = 0;
|
||||||
static size_t menu_display_framebuf_pitch = 0;
|
static size_t menu_display_framebuf_pitch = 0;
|
||||||
static int menu_display_font_size = 0;
|
|
||||||
static unsigned menu_display_header_height = 0;
|
static unsigned menu_display_header_height = 0;
|
||||||
static bool menu_display_msg_force = false;
|
static bool menu_display_msg_force = false;
|
||||||
static bool menu_display_font_alloc_framebuf = false;
|
static bool menu_display_font_alloc_framebuf = false;
|
||||||
static bool menu_display_framebuf_dirty = false;
|
static bool menu_display_framebuf_dirty = false;
|
||||||
static const uint8_t *menu_display_font_framebuf = NULL;
|
static const uint8_t *menu_display_font_framebuf = NULL;
|
||||||
static void *menu_display_font_buf = NULL;
|
|
||||||
static msg_queue_t *menu_display_msg_queue = NULL;
|
static msg_queue_t *menu_display_msg_queue = NULL;
|
||||||
static menu_display_ctx_driver_t *menu_disp = NULL;
|
static menu_display_ctx_driver_t *menu_disp = NULL;
|
||||||
|
|
||||||
@ -187,64 +185,47 @@ void menu_display_blend_end(void)
|
|||||||
menu_disp->blend_end();
|
menu_disp->blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_font_main_deinit(void)
|
void menu_display_font_free(font_data_t *font)
|
||||||
{
|
{
|
||||||
if (menu_display_font_buf)
|
font_driver_free(font);
|
||||||
font_driver_free(menu_display_font_buf);
|
|
||||||
menu_display_font_buf = NULL;
|
|
||||||
menu_display_font_size = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_font(enum application_special_type type)
|
font_data_t *menu_display_font(enum application_special_type type, float font_size)
|
||||||
{
|
{
|
||||||
menu_display_ctx_font_t font_info;
|
menu_display_ctx_font_t font_info;
|
||||||
char fontpath[PATH_MAX_LENGTH] = {0};
|
char fontpath[PATH_MAX_LENGTH] = {0};
|
||||||
int font_size = menu_display_get_font_size();
|
|
||||||
|
|
||||||
fill_pathname_application_special(fontpath, sizeof(fontpath), type);
|
fill_pathname_application_special(fontpath, sizeof(fontpath), type);
|
||||||
|
|
||||||
font_info.path = fontpath;
|
font_info.path = fontpath;
|
||||||
font_info.size = font_size;
|
font_info.size = font_size;
|
||||||
|
|
||||||
if (!menu_display_font_main_init(&font_info))
|
return menu_display_font_main_init(&font_info);
|
||||||
{
|
|
||||||
RARCH_WARN("Failed to load font.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_font_main_init(menu_display_ctx_font_t *font)
|
font_data_t *menu_display_font_main_init(menu_display_ctx_font_t *font)
|
||||||
{
|
{
|
||||||
menu_display_font_main_deinit();
|
font_data_t *font_data = NULL;
|
||||||
|
|
||||||
if (!font || !menu_disp)
|
if (!font || !menu_disp)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!menu_disp->font_init_first)
|
if (menu_disp->font_init_first((void**)&font_data,
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!menu_disp->font_init_first(&menu_display_font_buf,
|
|
||||||
video_driver_get_ptr(false),
|
video_driver_get_ptr(false),
|
||||||
font->path, font->size))
|
font->path, font->size))
|
||||||
return false;
|
return font_data;
|
||||||
|
return NULL;
|
||||||
menu_display_font_size = font->size;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_font_bind_block(void *block)
|
void menu_display_font_bind_block(font_data_t *font, void *block)
|
||||||
{
|
{
|
||||||
font_driver_bind_block(menu_display_font_buf, block);
|
font_driver_bind_block(font, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_font_flush_block(void)
|
bool menu_display_font_flush_block(font_data_t *font)
|
||||||
{
|
{
|
||||||
if (!menu_display_font_buf)
|
font_driver_flush(font);
|
||||||
return false;
|
font_driver_bind_block(font, NULL);
|
||||||
|
|
||||||
font_driver_flush(menu_display_font_buf);
|
|
||||||
font_driver_bind_block(menu_display_font_buf, NULL);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,16 +267,6 @@ video_coord_array_t *menu_display_get_coords_array(void)
|
|||||||
return &menu_disp_ca;
|
return &menu_disp_ca;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *menu_display_get_font_buffer(void)
|
|
||||||
{
|
|
||||||
return menu_display_font_buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
void menu_display_set_font_buffer(void *buffer)
|
|
||||||
{
|
|
||||||
menu_display_font_buf = buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
const uint8_t *menu_display_get_font_framebuffer(void)
|
const uint8_t *menu_display_get_font_framebuffer(void)
|
||||||
{
|
{
|
||||||
return menu_display_font_framebuf;
|
return menu_display_font_framebuf;
|
||||||
@ -366,16 +337,6 @@ unsigned menu_display_get_header_height(void)
|
|||||||
return menu_display_header_height;
|
return menu_display_header_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned menu_display_get_font_size(void)
|
|
||||||
{
|
|
||||||
return menu_display_font_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void menu_display_set_font_size(unsigned size)
|
|
||||||
{
|
|
||||||
menu_display_font_size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t menu_display_get_framebuffer_pitch(void)
|
size_t menu_display_get_framebuffer_pitch(void)
|
||||||
{
|
{
|
||||||
return menu_display_framebuf_pitch;
|
return menu_display_framebuf_pitch;
|
||||||
@ -827,11 +788,10 @@ void menu_display_snow(int width, int height)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_draw_text(const char *msg,
|
void menu_display_draw_text(const font_data_t *font, const char *msg,
|
||||||
int width, int height, struct font_params *params)
|
int width, int height, struct font_params *params)
|
||||||
{
|
{
|
||||||
void *fb_buf = menu_display_get_font_buffer();
|
video_driver_set_osd_msg(msg, params, (void*)font);
|
||||||
video_driver_set_osd_msg(msg, params, fb_buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_set_alpha(float *color, float alpha_value)
|
void menu_display_set_alpha(float *color, float alpha_value)
|
||||||
|
@ -181,10 +181,10 @@ void menu_display_toggle_set_reason(enum menu_toggle_reason reason);
|
|||||||
void menu_display_blend_begin(void);
|
void menu_display_blend_begin(void);
|
||||||
void menu_display_blend_end(void);
|
void menu_display_blend_end(void);
|
||||||
|
|
||||||
void menu_display_font_main_deinit(void);
|
void menu_display_font_free(font_data_t *font);
|
||||||
bool menu_display_font_main_init(menu_display_ctx_font_t *font);
|
font_data_t *menu_display_font_main_init(menu_display_ctx_font_t *font);
|
||||||
void menu_display_font_bind_block(void *block);
|
void menu_display_font_bind_block(font_data_t *font, void *block);
|
||||||
bool menu_display_font_flush_block(void);
|
bool menu_display_font_flush_block(font_data_t *font);
|
||||||
|
|
||||||
void menu_display_framebuffer_deinit(void);
|
void menu_display_framebuffer_deinit(void);
|
||||||
|
|
||||||
@ -193,8 +193,6 @@ bool menu_display_init(void);
|
|||||||
|
|
||||||
void menu_display_coords_array_reset(void);
|
void menu_display_coords_array_reset(void);
|
||||||
video_coord_array_t *menu_display_get_coords_array(void);
|
video_coord_array_t *menu_display_get_coords_array(void);
|
||||||
void *menu_display_get_font_buffer(void);
|
|
||||||
void menu_display_set_font_buffer(void *buffer);
|
|
||||||
const uint8_t *menu_display_get_font_framebuffer(void);
|
const uint8_t *menu_display_get_font_framebuffer(void);
|
||||||
void menu_display_set_font_framebuffer(const uint8_t *buffer);
|
void menu_display_set_font_framebuffer(const uint8_t *buffer);
|
||||||
bool menu_display_libretro_running(void);
|
bool menu_display_libretro_running(void);
|
||||||
@ -206,8 +204,6 @@ void menu_display_set_height(unsigned height);
|
|||||||
unsigned menu_display_get_height(void);
|
unsigned menu_display_get_height(void);
|
||||||
void menu_display_set_header_height(unsigned height);
|
void menu_display_set_header_height(unsigned height);
|
||||||
unsigned menu_display_get_header_height(void);
|
unsigned menu_display_get_header_height(void);
|
||||||
unsigned menu_display_get_font_size(void);
|
|
||||||
void menu_display_set_font_size(unsigned size);
|
|
||||||
size_t menu_display_get_framebuffer_pitch(void);
|
size_t menu_display_get_framebuffer_pitch(void);
|
||||||
void menu_display_set_framebuffer_pitch(size_t pitch);
|
void menu_display_set_framebuffer_pitch(size_t pitch);
|
||||||
|
|
||||||
@ -254,14 +250,14 @@ void menu_display_draw_cursor(
|
|||||||
float *color, float cursor_size, uintptr_t texture,
|
float *color, float cursor_size, uintptr_t texture,
|
||||||
float x, float y, unsigned width, unsigned height);
|
float x, float y, unsigned width, unsigned height);
|
||||||
|
|
||||||
void menu_display_draw_text(const char *msg, int width, int height,
|
void menu_display_draw_text(const font_data_t *font, const char *msg, int width, int height,
|
||||||
struct font_params *params);
|
struct font_params *params);
|
||||||
|
|
||||||
bool menu_display_shader_pipeline_active(void);
|
bool menu_display_shader_pipeline_active(void);
|
||||||
|
|
||||||
void menu_display_set_alpha(float *color, float alpha_value);
|
void menu_display_set_alpha(float *color, float alpha_value);
|
||||||
|
|
||||||
bool menu_display_font(enum application_special_type type);
|
font_data_t *menu_display_font(enum application_special_type type, float font_size);
|
||||||
|
|
||||||
void menu_display_reset_textures_list(const char *texture_path, const char *iconpath,
|
void menu_display_reset_textures_list(const char *texture_path, const char *iconpath,
|
||||||
uintptr_t *item);
|
uintptr_t *item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user