mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 10:49:02 +00:00
Cleanups
This commit is contained in:
parent
3cb6117226
commit
0e984f6c95
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user