This commit is contained in:
twinaphex 2016-04-15 03:31:59 +02:00
parent 3cb6117226
commit 0e984f6c95
6 changed files with 25 additions and 29 deletions

View File

@ -229,11 +229,6 @@ static void menu_display_d3d_clear_color(void *data)
d3d_clear(d3d->dev, 0, NULL, D3DCLEAR_TARGET, clear_color, 0, 0);
}
static const float *menu_display_d3d_get_tex_coords(void)
{
return &d3d_tex_coords[0];
}
static bool menu_display_d3d_font_init_first(
void **font_handle, void *video_data,
const char *font_path, float font_size)
@ -250,7 +245,8 @@ menu_display_ctx_driver_t menu_display_ctx_d3d = {
menu_display_d3d_restore_clear_color,
menu_display_d3d_clear_color,
menu_display_d3d_get_default_mvp,
menu_display_d3d_get_tex_coords,
menu_display_d3d_get_default_vertices,
menu_display_d3d_get_default_tex_coords,
menu_display_d3d_font_init_first,
MENU_VIDEO_DRIVER_DIRECT3D,
"menu_display_d3d",

View File

@ -200,11 +200,6 @@ static void menu_display_gl_clear_color(void *data)
glClear(GL_COLOR_BUFFER_BIT);
}
static const float *menu_display_gl_get_tex_coords(void)
{
return &gl_tex_coords[0];
}
static bool menu_display_gl_font_init_first(
void **font_handle, void *video_data,
const char *font_path, float font_size)
@ -221,7 +216,8 @@ menu_display_ctx_driver_t menu_display_ctx_gl = {
menu_display_gl_restore_clear_color,
menu_display_gl_clear_color,
menu_display_gl_get_default_mvp,
menu_display_gl_get_tex_coords,
menu_display_gl_get_default_vertices,
menu_display_gl_get_default_tex_coords,
menu_display_gl_font_init_first,
MENU_VIDEO_DRIVER_OPENGL,
"menu_display_gl",

View File

@ -56,12 +56,6 @@ static void menu_display_null_clear_color(void *data)
(void)data;
}
static const float *menu_display_null_get_tex_coords(void)
{
static float floats[1] = {1.00f};
return &floats[0];
}
static bool menu_display_null_font_init_first(
void **font_handle, void *video_data,
const char *font_path, float font_size)
@ -69,6 +63,18 @@ static bool menu_display_null_font_init_first(
return true;
}
static const float *menu_display_null_get_default_vertices(void)
{
static float dummy[16] = {0.0f};
return &dummy[0];
}
static const float *menu_display_null_get_default_tex_coords(void)
{
static float dummy[16] = {0.0f};
return &dummy[0];
}
menu_display_ctx_driver_t menu_display_ctx_null = {
menu_display_null_draw,
menu_display_null_draw_bg,
@ -77,7 +83,8 @@ menu_display_ctx_driver_t menu_display_ctx_null = {
menu_display_null_restore_clear_color,
menu_display_null_clear_color,
menu_display_null_get_default_mvp,
menu_display_null_get_tex_coords,
menu_display_null_get_default_vertices,
menu_display_null_get_default_tex_coords,
menu_display_null_font_init_first,
MENU_VIDEO_DRIVER_GENERIC,
"menu_display_null",

View File

@ -205,11 +205,6 @@ static void menu_display_vk_clear_color(void *data)
VKFUNC(vkCmdClearAttachments)(vk->cmd, 1, &attachment, 1, &rect);
}
static const float *menu_display_vk_get_tex_coords(void)
{
return &vk_tex_coords[0];
}
static void menu_display_vk_blend_begin(void)
{
vk_t *vk = vk_get_ptr();
@ -238,7 +233,8 @@ menu_display_ctx_driver_t menu_display_ctx_vulkan = {
menu_display_vk_restore_clear_color,
menu_display_vk_clear_color,
menu_display_vk_get_default_mvp,
menu_display_vk_get_tex_coords,
menu_display_vk_get_default_vertices,
menu_display_vk_get_default_tex_coords,
menu_display_vk_font_init_first,
MENU_VIDEO_DRIVER_VULKAN,
"menu_display_vulkan",

View File

@ -498,10 +498,10 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
if (!draw)
return false;
if (!menu_disp || !menu_disp->get_tex_coords)
if (!menu_disp || !menu_disp->get_default_tex_coords)
return false;
draw->ptr = menu_disp->get_tex_coords();
draw->ptr = menu_disp->get_default_tex_coords();
}
break;
case MENU_DISPLAY_CTL_TIMEDATE:
@ -540,4 +540,4 @@ void menu_display_allocate_white_texture()
video_driver_texture_load(&ti,
TEXTURE_FILTER_NEAREST, &menu_display_white_texture);
}
}

View File

@ -152,7 +152,8 @@ typedef struct menu_display_ctx_driver
void (*restore_clear_color)(void);
void (*clear_color)(void *data);
void *(*get_default_mvp)(void);
const float *(*get_tex_coords)(void);
const float *(*get_default_vertices)(void);
const float *(*get_default_tex_coords)(void);
bool (*font_init_first)(
void **font_handle, void *video_data,
const char *font_path, float font_size);