mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Change function signature of font_driver_render_msg
This commit is contained in:
parent
3e1f56d57f
commit
f92a507a9b
@ -160,7 +160,7 @@ static bool caca_gfx_frame(void *data, const void *frame,
|
||||
#endif
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(data, video_info, msg, NULL, NULL);
|
||||
|
||||
if (draw)
|
||||
{
|
||||
@ -281,14 +281,6 @@ static void caca_set_texture_frame(void *data,
|
||||
memcpy(caca_menu_frame, frame, pitch * height);
|
||||
}
|
||||
|
||||
static void caca_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
}
|
||||
|
||||
static const video_poke_interface_t caca_poke_interface = {
|
||||
NULL, /* get_flags */
|
||||
NULL,
|
||||
@ -305,7 +297,7 @@ static const video_poke_interface_t caca_poke_interface = {
|
||||
NULL,
|
||||
caca_set_texture_frame,
|
||||
NULL,
|
||||
caca_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL, /* show_mouse */
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -861,18 +861,14 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(ctr, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
|
||||
#if 0
|
||||
font_driver_render_msg(video_info, NULL, "TEST: 123 ABC àüî", NULL);
|
||||
#endif
|
||||
font_driver_render_msg(ctr, video_info, msg, NULL, NULL);
|
||||
|
||||
GPU_FinishDrawing();
|
||||
GPU_Finalize();
|
||||
@ -1192,7 +1188,7 @@ static void ctr_set_osd_msg(void *data,
|
||||
ctr_video_t* ctr = (ctr_video_t*)data;
|
||||
|
||||
if (ctr && ctr->msg_rendering_enabled)
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
font_driver_render_msg(data, video_info, msg, params, font);
|
||||
}
|
||||
|
||||
static uint32_t ctr_get_flags(void *data)
|
||||
|
@ -1473,9 +1473,9 @@ static bool d3d10_gfx_frame(
|
||||
D3D10SetViewports(context, 1, &d3d10->viewport);
|
||||
D3D10SetBlendState(d3d10->device, d3d10->blend_enable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
D3D10SetVertexBuffer(context, 0, d3d10->sprites.vbo, sizeof(d3d10_sprite_t), 0);
|
||||
font_driver_render_msg(
|
||||
video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(d3d10,
|
||||
video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1512,7 +1512,7 @@ static bool d3d10_gfx_frame(
|
||||
D3D10SetViewports(d3d10->device, 1, &d3d10->viewport);
|
||||
D3D10SetBlendState(d3d10->device, d3d10->blend_enable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
D3D10SetVertexBuffer(d3d10->device, 0, d3d10->sprites.vbo, sizeof(d3d10_sprite_t), 0);
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(d3d10, video_info, msg, NULL, NULL);
|
||||
dxgi_update_title(video_info);
|
||||
}
|
||||
d3d10->sprites.enabled = false;
|
||||
@ -1639,7 +1639,7 @@ static void d3d10_gfx_set_osd_msg(
|
||||
if (d3d10)
|
||||
{
|
||||
if (d3d10->sprites.enabled)
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
font_driver_render_msg(d3d10, video_info, msg, (const struct font_params*)params, font);
|
||||
else
|
||||
printf("OSD msg: %s\n", msg);
|
||||
}
|
||||
|
@ -1549,9 +1549,9 @@ static bool d3d11_gfx_frame(
|
||||
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);
|
||||
font_driver_render_msg(d3d11,
|
||||
video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1588,7 +1588,7 @@ static bool d3d11_gfx_frame(
|
||||
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, msg, NULL);
|
||||
font_driver_render_msg(d3d11, video_info, msg, NULL, NULL);
|
||||
dxgi_update_title(video_info);
|
||||
}
|
||||
d3d11->sprites.enabled = false;
|
||||
@ -1718,7 +1718,7 @@ static void d3d11_gfx_set_osd_msg(
|
||||
if (d3d11)
|
||||
{
|
||||
if (d3d11->sprites.enabled)
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
font_driver_render_msg(d3d11, video_info, msg, (const struct font_params*)params, font);
|
||||
else
|
||||
printf("OSD msg: %s\n", msg);
|
||||
}
|
||||
|
@ -1517,8 +1517,8 @@ static bool d3d12_gfx_frame(
|
||||
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);
|
||||
font_driver_render_msg(d3d12, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_OVERLAY
|
||||
@ -1571,7 +1571,7 @@ static bool d3d12_gfx_frame(
|
||||
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, msg, NULL);
|
||||
font_driver_render_msg(d3d12, video_info, msg, NULL, NULL);
|
||||
dxgi_update_title(video_info);
|
||||
}
|
||||
d3d12->sprites.enabled = false;
|
||||
@ -1728,8 +1728,8 @@ static void d3d12_gfx_set_osd_msg(
|
||||
if (!d3d12 || !d3d12->sprites.enabled)
|
||||
return;
|
||||
|
||||
font_driver_render_msg(video_info, font, msg,
|
||||
(const struct font_params*)params);
|
||||
font_driver_render_msg(d3d12, video_info, msg,
|
||||
(const struct font_params*)params, font);
|
||||
}
|
||||
|
||||
static uintptr_t d3d12_gfx_load_texture(
|
||||
|
@ -1100,7 +1100,7 @@ static void d3d8_set_osd_msg(void *data,
|
||||
d3d8_video_t *d3d = (d3d8_video_t*)data;
|
||||
|
||||
d3d8_begin_scene(d3d->dev);
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
font_driver_render_msg(d3d, video_info, msg, params, font);
|
||||
d3d8_end_scene(d3d->dev);
|
||||
}
|
||||
|
||||
@ -1556,10 +1556,8 @@ static bool d3d8_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
}
|
||||
font_driver_render_msg(d3d, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1576,7 +1574,7 @@ static bool d3d8_frame(void *data, const void *frame,
|
||||
{
|
||||
d3d8_set_viewports(d3d->dev, &screen_vp);
|
||||
d3d8_begin_scene(d3d->dev);
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(d3d, video_info, msg, NULL, NULL);
|
||||
d3d8_end_scene(d3d->dev);
|
||||
}
|
||||
|
||||
|
@ -1121,8 +1121,8 @@ static void d3d9_set_osd_msg(void *data,
|
||||
|
||||
d3d9_set_font_rect(d3d, d3d_font_params);
|
||||
d3d9_begin_scene(dev);
|
||||
font_driver_render_msg(video_info, font,
|
||||
msg, d3d_font_params);
|
||||
font_driver_render_msg(d3d, video_info,
|
||||
msg, d3d_font_params, font);
|
||||
d3d9_end_scene(dev);
|
||||
}
|
||||
|
||||
@ -1617,8 +1617,8 @@ static bool d3d9_frame(void *data, const void *frame,
|
||||
{
|
||||
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);
|
||||
font_driver_render_msg(d3d, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
d3d9_end_scene(d3d->dev);
|
||||
}
|
||||
}
|
||||
@ -1644,7 +1644,7 @@ static bool d3d9_frame(void *data, const void *frame,
|
||||
{
|
||||
d3d9_set_viewports(d3d->dev, &screen_vp);
|
||||
d3d9_begin_scene(d3d->dev);
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(d3d, video_info, msg, NULL, NULL);
|
||||
d3d9_end_scene(d3d->dev);
|
||||
}
|
||||
|
||||
|
@ -1329,10 +1329,8 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
(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);
|
||||
}
|
||||
font_driver_render_msg(vid, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
|
||||
if (msg)
|
||||
|
@ -335,7 +335,7 @@ static bool fpga_gfx_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(fpga, video_info, msg, NULL, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -479,7 +479,7 @@ static void fpga_set_osd_msg(void *data,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
font_driver_render_msg(data, video_info, msg, params, font);
|
||||
}
|
||||
|
||||
static void fpga_get_video_output_size(void *data,
|
||||
|
@ -358,7 +358,7 @@ static bool gdi_gfx_frame(void *data, const void *frame,
|
||||
free(info);
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(gdi, video_info, msg, NULL, NULL);
|
||||
|
||||
InvalidateRect(hwnd, NULL, false);
|
||||
|
||||
@ -511,15 +511,6 @@ static void gdi_set_texture_frame(void *data,
|
||||
}
|
||||
}
|
||||
|
||||
static void gdi_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font,
|
||||
msg, (const struct font_params *)params);
|
||||
}
|
||||
|
||||
static void gdi_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
@ -628,7 +619,7 @@ static const video_poke_interface_t gdi_poke_interface = {
|
||||
NULL,
|
||||
gdi_set_texture_frame,
|
||||
NULL,
|
||||
gdi_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL,
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -2407,14 +2407,6 @@ static void gl2_render_osd_background(
|
||||
video_info->height, false, true);
|
||||
}
|
||||
|
||||
static void gl2_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
}
|
||||
|
||||
static void gl2_show_mouse(void *data, bool state)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
@ -3058,8 +3050,8 @@ static bool gl2_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(gl, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3077,7 +3069,7 @@ static bool gl2_frame(void *data, const void *frame,
|
||||
{
|
||||
if (video_info->msg_bgcolor_enable)
|
||||
gl2_render_osd_background(gl, video_info, msg);
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(gl, video_info, msg, NULL, NULL);
|
||||
}
|
||||
|
||||
if (video_info->cb_update_window_title)
|
||||
@ -4509,7 +4501,7 @@ static const video_poke_interface_t gl2_poke_interface = {
|
||||
gl2_apply_state_changes,
|
||||
gl2_set_texture_frame,
|
||||
gl2_set_texture_enable,
|
||||
gl2_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
gl2_show_mouse,
|
||||
NULL,
|
||||
gl2_get_current_shader,
|
||||
|
@ -858,13 +858,13 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(gl1, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
#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);
|
||||
font_driver_render_msg(gl1, video_info, video_info->chat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -881,7 +881,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
#endif
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(gl1, video_info, msg, NULL, NULL);
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
@ -1174,15 +1174,6 @@ static void gl1_set_texture_frame(void *data,
|
||||
gl1_context_bind_hw_render(gl1, true);
|
||||
}
|
||||
|
||||
static void gl1_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font,
|
||||
msg, (const struct font_params *)params);
|
||||
}
|
||||
|
||||
static void gl1_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
@ -1383,7 +1374,7 @@ static const video_poke_interface_t gl1_poke_interface = {
|
||||
NULL,
|
||||
gl1_set_texture_frame,
|
||||
gl1_set_texture_enable,
|
||||
gl1_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL,
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -1708,8 +1708,8 @@ static bool gl_core_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(gl, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1729,7 +1729,7 @@ static bool gl_core_frame(void *data, const void *frame,
|
||||
if (video_info->msg_bgcolor_enable)
|
||||
gl_core_render_osd_background(gl, video_info, msg);
|
||||
#endif
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(gl, video_info, msg, NULL, NULL);
|
||||
}
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
@ -1903,14 +1903,6 @@ static void gl_core_show_mouse(void *data, bool state)
|
||||
gl->ctx_driver->show_mouse(gl->ctx_data, state);
|
||||
}
|
||||
|
||||
static void gl_core_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params *)params);
|
||||
}
|
||||
|
||||
static void gl_core_set_texture_frame(void *data,
|
||||
const void *frame, bool rgb32, unsigned width, unsigned height,
|
||||
float alpha)
|
||||
@ -2016,7 +2008,7 @@ static const video_poke_interface_t gl_core_poke_interface = {
|
||||
gl_core_apply_state_changes,
|
||||
gl_core_set_texture_frame,
|
||||
gl_core_set_texture_enable,
|
||||
gl_core_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
gl_core_show_mouse,
|
||||
NULL, /* grab_mouse_toggle */
|
||||
gl_core_get_current_shader,
|
||||
|
@ -1338,10 +1338,8 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
}
|
||||
font_driver_render_msg(wiiu, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@ -1352,7 +1350,7 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
|
||||
#endif
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(wiiu, video_info, msg, NULL, NULL);
|
||||
|
||||
wiiu->render_msg_enabled = false;
|
||||
|
||||
@ -1683,7 +1681,7 @@ static void wiiu_gfx_set_osd_msg(void *data,
|
||||
if (wiiu)
|
||||
{
|
||||
if (wiiu->render_msg_enabled)
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
font_driver_render_msg(wiiu, video_info, msg, params, font);
|
||||
else
|
||||
printf("OSD msg: %s\n", msg);
|
||||
}
|
||||
|
@ -281,14 +281,6 @@ static void metal_set_texture_enable(void *data, bool state, bool full_screen)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void metal_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params *)params);
|
||||
}
|
||||
|
||||
static void metal_show_mouse(void *data, bool state)
|
||||
{
|
||||
[apple_platform setCursorVisible:state];
|
||||
@ -330,7 +322,7 @@ static const video_poke_interface_t metal_poke_interface = {
|
||||
.apply_state_changes = metal_apply_state_changes,
|
||||
.set_texture_frame = metal_set_texture_frame,
|
||||
.set_texture_enable = metal_set_texture_enable,
|
||||
.set_osd_msg = metal_set_osd_msg,
|
||||
.set_osd_msg = font_driver_render_msg,
|
||||
.show_mouse = metal_show_mouse,
|
||||
.get_current_shader = metal_get_current_shader,
|
||||
};
|
||||
|
@ -320,7 +320,7 @@ static bool network_gfx_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(network, video_info, msg, NULL, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -443,14 +443,6 @@ static void network_set_texture_frame(void *data,
|
||||
}
|
||||
}
|
||||
|
||||
static void network_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
}
|
||||
|
||||
static void network_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
@ -499,7 +491,7 @@ static const video_poke_interface_t network_poke_interface = {
|
||||
#if defined(HAVE_MENU)
|
||||
network_set_texture_frame,
|
||||
NULL,
|
||||
network_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL,
|
||||
#else
|
||||
NULL,
|
||||
|
@ -303,19 +303,19 @@ static bool ps2_gfx_frame(void *data, const void *frame,
|
||||
gsKit_texture_upload(ps2->gsGlobal, ps2->menuTexture);
|
||||
prim_texture(ps2->gsGlobal, ps2->menuTexture, 2, ps2->fullscreen, empty_ps2_insets);
|
||||
}
|
||||
} else if (video_info->statistics_show) {
|
||||
}
|
||||
else if (video_info->statistics_show)
|
||||
{
|
||||
struct font_params *osd_params = (struct font_params*)
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params) {
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
}
|
||||
if (osd_params)
|
||||
font_driver_render_msg(ps2, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
|
||||
if(!string_is_empty(msg)) {
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
}
|
||||
if(!string_is_empty(msg))
|
||||
font_driver_render_msg(ps2, video_info, msg, NULL, NULL);
|
||||
|
||||
refreshScreen(ps2);
|
||||
|
||||
@ -418,14 +418,6 @@ static void ps2_set_texture_enable(void *data, bool enable, bool fullscreen)
|
||||
ps2->fullscreen = fullscreen;
|
||||
}
|
||||
|
||||
static void ps2_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
}
|
||||
|
||||
static bool ps2_get_hw_render_interface(void* data,
|
||||
const struct retro_hw_render_interface** iface)
|
||||
{
|
||||
@ -453,7 +445,7 @@ static const video_poke_interface_t ps2_poke_interface = {
|
||||
NULL, /* apply_state_changes */
|
||||
ps2_set_texture_frame,
|
||||
ps2_set_texture_enable,
|
||||
ps2_set_osd_msg, /* set_osd_msg */
|
||||
font_driver_render_msg, /* set_osd_msg */
|
||||
NULL, /* show_mouse */
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -119,12 +119,13 @@ static void sdl_init_font(sdl_video_t *vid, const char *font_path, unsigned font
|
||||
}
|
||||
|
||||
static void sdl_render_msg(sdl_video_t *vid, SDL_Surface *buffer,
|
||||
const char *msg, unsigned width, unsigned height, const SDL_PixelFormat *fmt)
|
||||
const char *msg, unsigned width, unsigned height,
|
||||
const SDL_PixelFormat *fmt)
|
||||
{
|
||||
int x, y, msg_base_x, msg_base_y;
|
||||
unsigned rshift, gshift, bshift;
|
||||
const struct font_atlas *atlas = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!vid->font)
|
||||
return;
|
||||
|
@ -422,7 +422,7 @@ static bool sixel_gfx_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(sixel, video_info, msg, NULL, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -544,14 +544,6 @@ static void sixel_set_texture_frame(void *data,
|
||||
}
|
||||
}
|
||||
|
||||
static void sixel_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
}
|
||||
|
||||
static void sixel_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
@ -600,7 +592,7 @@ static const video_poke_interface_t sixel_poke_interface = {
|
||||
#if defined(HAVE_MENU)
|
||||
sixel_set_texture_frame,
|
||||
NULL,
|
||||
sixel_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL,
|
||||
#else
|
||||
NULL,
|
||||
|
@ -229,8 +229,8 @@ static bool switch_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(sw, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -486,12 +486,12 @@ static bool switch_frame(void *data, const void *frame,
|
||||
struct font_params *osd_params = (struct font_params *)&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params *)&video_info->osd_stat_params);
|
||||
font_driver_render_msg(sw, video_info, video_info->stat_text,
|
||||
(const struct font_params *)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(sw, video_info, msg, NULL, NULL);
|
||||
|
||||
framebufferEnd(&sw->fb);
|
||||
|
||||
@ -645,17 +645,6 @@ static void switch_set_texture_enable(void *data, bool enable, bool full_screen)
|
||||
sw->menu_texture.fullscreen = full_screen;
|
||||
}
|
||||
|
||||
static void switch_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
switch_video_t *sw = (switch_video_t *)data;
|
||||
|
||||
if (sw)
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
static void switch_overlay_enable(void *data, bool state)
|
||||
{
|
||||
@ -750,7 +739,7 @@ static const video_poke_interface_t switch_poke_interface = {
|
||||
switch_apply_state_changes, /* apply_state_changes */
|
||||
switch_set_texture_frame,
|
||||
switch_set_texture_enable,
|
||||
switch_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL, /* show_mouse */
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -240,7 +240,7 @@ static bool vga_gfx_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(data, video_info, msg, NULL, NULL);
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
@ -359,14 +359,6 @@ static void vga_set_texture_frame(void *data,
|
||||
}
|
||||
}
|
||||
|
||||
static void vga_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
}
|
||||
|
||||
static uint32_t vga_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
@ -390,7 +382,7 @@ static const video_poke_interface_t vga_poke_interface = {
|
||||
NULL,
|
||||
vga_set_texture_frame,
|
||||
NULL,
|
||||
vga_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL, /* show_mouse */
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -253,10 +253,8 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
}
|
||||
font_driver_render_msg(vita, video_info, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
@ -269,7 +267,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||
#endif
|
||||
|
||||
if(!string_is_empty(msg))
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(vita, video_info, msg, NULL, NULL);
|
||||
|
||||
vita2d_end_drawing();
|
||||
vita2d_swap_buffers();
|
||||
@ -725,14 +723,6 @@ static void vita_unload_texture(void *data, uintptr_t handle)
|
||||
//free(texture);
|
||||
}
|
||||
|
||||
static void vita_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
}
|
||||
|
||||
static bool vita_get_current_sw_framebuffer(void *data,
|
||||
struct retro_framebuffer *framebuffer)
|
||||
{
|
||||
@ -790,7 +780,7 @@ static const video_poke_interface_t vita_poke_interface = {
|
||||
vita_apply_state_changes,
|
||||
vita_set_texture_frame,
|
||||
vita_set_texture_enable,
|
||||
vita_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -1959,10 +1959,8 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text,
|
||||
(const struct font_params*)&video_info->osd_stat_params);
|
||||
}
|
||||
font_driver_render_msg(vk, video_info, video_info->stat_text,
|
||||
&video_info->osd_stat_params, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1972,7 +1970,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
#endif
|
||||
|
||||
if (!string_is_empty(msg))
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
font_driver_render_msg(vk, video_info, msg, NULL, NULL);
|
||||
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (video_info->widgets_inited)
|
||||
@ -2322,14 +2320,6 @@ static void vulkan_set_texture_enable(void *data, bool state, bool full_screen)
|
||||
vk->menu.full_screen = full_screen;
|
||||
}
|
||||
|
||||
static void vulkan_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params *)params);
|
||||
}
|
||||
|
||||
static uintptr_t vulkan_load_texture(void *video_data, void *data,
|
||||
bool threaded, enum texture_filter_type filter_type)
|
||||
{
|
||||
@ -2441,7 +2431,7 @@ static const video_poke_interface_t vulkan_poke_interface = {
|
||||
vulkan_apply_state_changes,
|
||||
vulkan_set_texture_frame,
|
||||
vulkan_set_texture_enable,
|
||||
vulkan_set_osd_msg,
|
||||
font_driver_render_msg,
|
||||
vulkan_show_mouse,
|
||||
NULL, /* grab_mouse_toggle */
|
||||
vulkan_get_current_shader,
|
||||
|
@ -1031,12 +1031,14 @@ end:
|
||||
#endif
|
||||
|
||||
void font_driver_render_msg(
|
||||
void *data,
|
||||
video_frame_info_t *video_info,
|
||||
void *font_data,
|
||||
const char *msg,
|
||||
const struct font_params *params)
|
||||
const void *_params,
|
||||
void *font_data)
|
||||
{
|
||||
font_data_t *font = (font_data_t*)(font_data
|
||||
const struct font_params *params = (const struct font_params*)_params;
|
||||
font_data_t *font = (font_data_t*)(font_data
|
||||
? font_data : video_font_driver);
|
||||
|
||||
if (msg && *msg && font && font->renderer && font->renderer->render_msg)
|
||||
|
@ -130,8 +130,9 @@ int font_renderer_create_default(
|
||||
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 struct font_params *params);
|
||||
void font_driver_render_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg, const void *params, void *font_data);
|
||||
|
||||
void font_driver_bind_block(void *font_data, void *block);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user