Rename menu_display to gfx_display
This commit is contained in:
parent
e6d64f72ec
commit
c71469c715
|
@ -904,7 +904,7 @@ ifeq ($(HAVE_VITA2D), 1)
|
|||
$(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON),1)
|
||||
OBJ += menu/drivers_display/menu_display_vita2d.o
|
||||
OBJ += menu/drivers_display/gfx_display_vita2d.o
|
||||
endif
|
||||
|
||||
OBJ += gfx/drivers/vita2d_gfx.o \
|
||||
|
@ -915,7 +915,7 @@ endif
|
|||
|
||||
ifeq ($(TARGET), retroarch_3ds)
|
||||
OBJ += gfx/drivers/ctr_gfx.o \
|
||||
menu/drivers_display/menu_display_ctr.o \
|
||||
menu/drivers_display/gfx_display_ctr.o \
|
||||
input/drivers/ctr_input.o \
|
||||
input/drivers_joypad/ctr_joypad.o
|
||||
endif
|
||||
|
@ -936,7 +936,7 @@ endif
|
|||
ifeq ($(TARGET), retroarch_wiiu)
|
||||
OBJ += gfx/drivers/gx2_gfx.o \
|
||||
gfx/drivers_font/wiiu_font.o \
|
||||
menu/drivers_display/menu_display_wiiu.o \
|
||||
menu/drivers_display/gfx_display_wiiu.o \
|
||||
input/drivers/wiiu_input.o \
|
||||
input/drivers_joypad/wiiu_joypad.o \
|
||||
input/drivers_joypad/wiiu/wpad_driver.o \
|
||||
|
@ -961,7 +961,7 @@ endif
|
|||
|
||||
ifeq ($(TARGET), retroarch_switch)
|
||||
ifeq ($(HAVE_LIBNX), 1)
|
||||
OBJ += menu/drivers_display/menu_display_switch.o \
|
||||
OBJ += menu/drivers_display/gfx_display_switch.o \
|
||||
gfx/drivers/switch_nx_gfx.o \
|
||||
audio/drivers/switch_libnx_audren_audio.o \
|
||||
audio/drivers/switch_libnx_audren_thread_audio.o
|
||||
|
@ -1167,7 +1167,7 @@ ifeq ($(HAVE_VITAGL), 1)
|
|||
OBJ += gfx/drivers/gl1.o \
|
||||
gfx/drivers_font/gl1_raster_font.o \
|
||||
gfx/drivers_context/vita_ctx.o \
|
||||
menu/drivers_display/menu_display_gl1.o
|
||||
menu/drivers_display/gfx_display_gl1.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
|
@ -1188,11 +1188,11 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
|||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl.o
|
||||
OBJ += menu/drivers_display/gfx_display_gl.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGL1), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl1.o
|
||||
OBJ += menu/drivers_display/gfx_display_gl1.o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1244,7 +1244,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
|||
gfx/drivers_font/metal_raster_font.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_metal.o
|
||||
OBJ += menu/drivers_display/gfx_display_metal.o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ ifeq ($(HAVE_VULKAN), 1)
|
|||
OBJ += gfx/drivers_context/khr_display_ctx.o
|
||||
endif
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_vulkan.o
|
||||
OBJ += menu/drivers_display/gfx_display_vulkan.o
|
||||
endif
|
||||
NEED_CXX_LINKER = 1
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
|
@ -1363,7 +1363,7 @@ ifeq ($(HAVE_OPENGL_CORE), 1)
|
|||
gfx/drivers_font/gl_core_raster_font.o \
|
||||
gfx/drivers_shader/shader_gl_core.o
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl_core.o
|
||||
OBJ += menu/drivers_display/gfx_display_gl_core.o
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_OPENGL_CORE
|
||||
|
@ -1433,7 +1433,7 @@ ifeq ($(HAVE_D3D10), 1)
|
|||
gfx/common/d3d10_common.o \
|
||||
gfx/drivers_font/d3d10_font.o
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d10.o
|
||||
OBJ += menu/drivers_display/gfx_display_d3d10.o
|
||||
endif
|
||||
DEFINES += -DHAVE_D3D10
|
||||
endif
|
||||
|
@ -1444,7 +1444,7 @@ ifeq ($(HAVE_D3D11), 1)
|
|||
gfx/common/d3d11_common.o \
|
||||
gfx/drivers_font/d3d11_font.o
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d11.o
|
||||
OBJ += menu/drivers_display/gfx_display_d3d11.o
|
||||
endif
|
||||
DEFINES += -DHAVE_D3D11
|
||||
endif
|
||||
|
@ -1455,7 +1455,7 @@ ifeq ($(HAVE_D3D12), 1)
|
|||
gfx/common/d3d12_common.o \
|
||||
gfx/drivers_font/d3d12_font.o
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d12.o
|
||||
OBJ += menu/drivers_display/gfx_display_d3d12.o
|
||||
endif
|
||||
DEFINES += -DHAVE_D3D12
|
||||
endif
|
||||
|
@ -1496,7 +1496,7 @@ ifeq ($(HAVE_D3D8), 1)
|
|||
OBJ += gfx/common/d3d8_common.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d8.o
|
||||
OBJ += menu/drivers_display/gfx_display_d3d8.o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ ifeq ($(HAVE_D3D9), 1)
|
|||
OBJ += gfx/common/d3d9_common.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d9.o
|
||||
OBJ += menu/drivers_display/gfx_display_d3d9.o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1982,7 +1982,7 @@ ifneq ($(findstring Win32,$(OS)),)
|
|||
gfx/drivers_font/gdi_font.o
|
||||
LIBS += -lmsimg32
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gdi.o
|
||||
OBJ += menu/drivers_display/gfx_display_gdi.o
|
||||
endif
|
||||
endif
|
||||
LIBS += -lhid -lsetupapi
|
||||
|
|
|
@ -47,7 +47,7 @@ void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
|||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_reset_textures_list(badge_file, fullpath,
|
||||
gfx_display_reset_textures_list(badge_file, fullpath,
|
||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
@property (nonatomic, readwrite) MTLClearColor clearColor;
|
||||
|
||||
- (instancetype)initWithContext:(Context *)context;
|
||||
- (void)drawPipeline:(menu_display_ctx_draw_t *)draw video:(video_frame_info_t *)video;
|
||||
- (void)draw:(menu_display_ctx_draw_t *)draw video:(video_frame_info_t *)video;
|
||||
- (void)drawPipeline:(gfx_display_ctx_draw_t *)draw video:(video_frame_info_t *)video;
|
||||
- (void)draw:(gfx_display_ctx_draw_t *)draw video:(video_frame_info_t *)video;
|
||||
- (void)setScissorRect:(MTLScissorRect)rect;
|
||||
- (void)clearScissorRect;
|
||||
|
||||
|
|
|
@ -88,13 +88,13 @@
|
|||
[_context resetScissorRect];
|
||||
}
|
||||
|
||||
- (MTLPrimitiveType)_toPrimitiveType:(enum menu_display_prim_type)prim
|
||||
- (MTLPrimitiveType)_toPrimitiveType:(enum gfx_display_prim_type)prim
|
||||
{
|
||||
switch (prim)
|
||||
{
|
||||
case MENU_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
return MTLPrimitiveTypeTriangleStrip;
|
||||
case MENU_DISPLAY_PRIM_TRIANGLES:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLES:
|
||||
return MTLPrimitiveTypeTriangle;
|
||||
default:
|
||||
RARCH_LOG("unexpected primitive type %d\n", prim);
|
||||
|
@ -102,7 +102,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)drawPipeline:(menu_display_ctx_draw_t *)draw video:(video_frame_info_t *)video
|
||||
- (void)drawPipeline:(gfx_display_ctx_draw_t *)draw video:(video_frame_info_t *)video
|
||||
{
|
||||
static struct video_coords blank_coords;
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
|||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
video_coord_array_t *ca = menu_display_get_coords_array();
|
||||
video_coord_array_t *ca = gfx_display_get_coords_array();
|
||||
draw->coords = (struct video_coords *)&ca->coords;
|
||||
break;
|
||||
}
|
||||
|
@ -132,9 +132,9 @@
|
|||
case VIDEO_SHADER_MENU_5:
|
||||
case VIDEO_SHADER_MENU_6:
|
||||
{
|
||||
draw->coords = &blank_coords;
|
||||
draw->coords = &blank_coords;
|
||||
blank_coords.vertices = 4;
|
||||
draw->prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw->prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@
|
|||
_uniforms.time += 0.01;
|
||||
}
|
||||
|
||||
- (void)draw:(menu_display_ctx_draw_t *)draw video:(video_frame_info_t *)video
|
||||
- (void)draw:(gfx_display_ctx_draw_t *)draw video:(video_frame_info_t *)video
|
||||
{
|
||||
const float *vertex = draw->coords->vertex ?: MenuDisplay.defaultVertices;
|
||||
const float *tex_coord = draw->coords->tex_coord ?: MenuDisplay.defaultTexCoords;
|
||||
|
|
|
@ -504,9 +504,9 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
|||
|
||||
new_fb_pitch = new_fb_width * 2;
|
||||
|
||||
menu_display_set_width(new_fb_width);
|
||||
menu_display_set_height(new_fb_height);
|
||||
menu_display_set_framebuffer_pitch(new_fb_pitch);
|
||||
gfx_display_set_width(new_fb_width);
|
||||
gfx_display_set_height(new_fb_height);
|
||||
gfx_display_set_framebuffer_pitch(new_fb_pitch);
|
||||
|
||||
GX_SetViewportJitter(0, 0, gx_mode.fbWidth, gx_mode.efbHeight, 0, 1, 1);
|
||||
GX_SetDispCopySrc(0, 0, gx_mode.fbWidth, gx_mode.efbHeight);
|
||||
|
@ -618,7 +618,7 @@ static void init_texture(void *data, unsigned width, unsigned height)
|
|||
width &= ~3;
|
||||
height &= ~3;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
GX_InitTexObj(fb_ptr, g_tex.data, width, height,
|
||||
|
@ -1593,7 +1593,7 @@ static bool gx_frame(void *data, const void *frame,
|
|||
size_t fb_pitch;
|
||||
unsigned fb_width, fb_height;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
convert_texture16(
|
||||
|
|
|
@ -1286,60 +1286,60 @@ MENU
|
|||
#include "../menu/drivers/menu_generic.c"
|
||||
|
||||
#if defined(HAVE_D3D8)
|
||||
#include "../menu/drivers_display/menu_display_d3d8.c"
|
||||
#include "../menu/drivers_display/gfx_display_d3d8.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9)
|
||||
#include "../menu/drivers_display/menu_display_d3d9.c"
|
||||
#include "../menu/drivers_display/gfx_display_d3d9.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D10)
|
||||
#include "../menu/drivers_display/menu_display_d3d10.c"
|
||||
#include "../menu/drivers_display/gfx_display_d3d10.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D11)
|
||||
#include "../menu/drivers_display/menu_display_d3d11.c"
|
||||
#include "../menu/drivers_display/gfx_display_d3d11.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D12)
|
||||
#include "../menu/drivers_display/menu_display_d3d12.c"
|
||||
#include "../menu/drivers_display/gfx_display_d3d12.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENGL1
|
||||
#include "../menu/drivers_display/menu_display_gl1.c"
|
||||
#include "../menu/drivers_display/gfx_display_gl1.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENGL
|
||||
#include "../menu/drivers_display/menu_display_gl.c"
|
||||
#include "../menu/drivers_display/gfx_display_gl.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENGL_CORE
|
||||
#include "../menu/drivers_display/menu_display_gl_core.c"
|
||||
#include "../menu/drivers_display/gfx_display_gl_core.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VULKAN
|
||||
#include "../menu/drivers_display/menu_display_vulkan.c"
|
||||
#include "../menu/drivers_display/gfx_display_vulkan.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VITA2D
|
||||
#include "../menu/drivers_display/menu_display_vita2d.c"
|
||||
#include "../menu/drivers_display/gfx_display_vita2d.c"
|
||||
#endif
|
||||
|
||||
#ifdef _3DS
|
||||
#include "../menu/drivers_display/menu_display_ctr.c"
|
||||
#include "../menu/drivers_display/gfx_display_ctr.c"
|
||||
#endif
|
||||
|
||||
#ifdef WIIU
|
||||
#include "../menu/drivers_display/menu_display_wiiu.c"
|
||||
#include "../menu/drivers_display/gfx_display_wiiu.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBNX)
|
||||
#include "../menu/drivers_display/menu_display_switch.c"
|
||||
#include "../menu/drivers_display/gfx_display_switch.c"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#ifdef HAVE_GDI
|
||||
#include "../menu/drivers_display/menu_display_gdi.c"
|
||||
#include "../menu/drivers_display/gfx_display_gdi.c"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -74,6 +74,6 @@
|
|||
#import "../gfx/common/metal/MenuDisplay.m"
|
||||
#import "../gfx/common/metal_common.m"
|
||||
#import "../gfx/drivers/metal.m"
|
||||
#import "../menu/drivers_display/menu_display_metal.m"
|
||||
#import "../menu/drivers_display/gfx_display_metal.m"
|
||||
#import "../gfx/drivers_font/metal_raster_font.m"
|
||||
#endif
|
||||
|
|
|
@ -1682,7 +1682,7 @@ static int generic_action_ok(const char *path,
|
|||
settings_t *settings = config_get_ptr();
|
||||
flush_type = MENU_SETTINGS;
|
||||
|
||||
menu_display_set_msg_force(true);
|
||||
gfx_display_set_msg_force(true);
|
||||
|
||||
if (config_replace(settings->bools.config_save_on_exit, action_path))
|
||||
{
|
||||
|
|
|
@ -1690,7 +1690,7 @@ static void materialui_context_reset_textures(materialui_handle_t *mui)
|
|||
/* Loop through all textures */
|
||||
for (i = 0; i < MUI_TEXTURE_LAST; i++)
|
||||
{
|
||||
if (!menu_display_reset_textures_list(
|
||||
if (!gfx_display_reset_textures_list(
|
||||
materialui_texture_path(i), icon_path, &mui->textures.list[i],
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
{
|
||||
|
@ -1715,12 +1715,12 @@ static void materialui_draw_icon(
|
|||
float rotation, float scale_factor,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
rotate_draw.matrix = &mymat;
|
||||
rotate_draw.rotation = rotation;
|
||||
|
@ -1729,7 +1729,7 @@ static void materialui_draw_icon(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
|
@ -1746,11 +1746,11 @@ static void materialui_draw_icon(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void materialui_draw_thumbnail(
|
||||
|
@ -1789,11 +1789,11 @@ static void materialui_draw_thumbnail(
|
|||
icon_size = (float)mui->icon_size * scale_factor;
|
||||
|
||||
/* Background */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.thumbnail_background,
|
||||
mui->transition_alpha);
|
||||
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
bg_x,
|
||||
bg_y,
|
||||
|
@ -1841,12 +1841,12 @@ static void materialui_draw_thumbnail(
|
|||
* because it's dependent upon thumbnail opacity
|
||||
* - No need to restore the original alpha value, since it is
|
||||
* always set 'manually' before use */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.thumbnail_background,
|
||||
mui->transition_alpha * thumbnail->alpha);
|
||||
|
||||
/* > Draw background quad */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
(int)bg_x,
|
||||
(int)bg_y,
|
||||
|
@ -1927,10 +1927,10 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
|
|||
}
|
||||
|
||||
/* Draw message box background */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.surface_background, mui->transition_alpha);
|
||||
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
x - longest_width / 2.0 - mui->margin * 2.0,
|
||||
y - mui->font_data.list.font_height / 2.0 - mui->margin * 2.0,
|
||||
|
@ -1946,7 +1946,7 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
|
|||
const char *line = list->elems[i].data;
|
||||
|
||||
if (!string_is_empty(line))
|
||||
menu_display_draw_text(
|
||||
gfx_display_draw_text(
|
||||
mui->font_data.list.font, line,
|
||||
x - longest_width/2.0,
|
||||
y + i * mui->font_data.list.font_height + mui->font_data.list.font_height / 3,
|
||||
|
@ -2160,7 +2160,7 @@ static float materialui_get_scroll(materialui_handle_t *mui)
|
|||
file_list_t *list = menu_entries_get_selection_buf_ptr(0);
|
||||
materialui_node_t *node = NULL;
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
float view_centre = 0.0f;
|
||||
|
@ -2276,7 +2276,7 @@ static void materialui_render(void *data,
|
|||
float scale_factor;
|
||||
settings_t *settings = config_get_ptr();
|
||||
materialui_handle_t *mui = (materialui_handle_t*)data;
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
size_t entries_end = menu_entries_get_size();
|
||||
file_list_t *list = menu_entries_get_selection_buf_ptr(0);
|
||||
bool first_entry_found = false;
|
||||
|
@ -2348,8 +2348,8 @@ static void materialui_render(void *data,
|
|||
|
||||
/* Need to update this each frame, otherwise touchscreen
|
||||
* input breaks when changing orientation */
|
||||
menu_display_set_width(width);
|
||||
menu_display_set_height(height);
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
/* Read pointer state */
|
||||
menu_input_get_pointer_state(&mui->pointer);
|
||||
|
@ -2766,7 +2766,7 @@ static void materialui_render_menu_entry_default(
|
|||
* entries with very long sublabels may get 'clipped' too
|
||||
* early as they are scrolled upwards beyond the top edge
|
||||
* of the screen */
|
||||
menu_display_draw_text(mui->font_data.hint.font, wrapped_sublabel,
|
||||
gfx_display_draw_text(mui->font_data.hint.font, wrapped_sublabel,
|
||||
x_offset + entry_margin,
|
||||
sublabel_y,
|
||||
width, height,
|
||||
|
@ -2856,7 +2856,7 @@ static void materialui_render_menu_entry_default(
|
|||
}
|
||||
|
||||
/* Draw value string */
|
||||
menu_display_draw_text(mui->font_data.list.font, value_buf,
|
||||
gfx_display_draw_text(mui->font_data.list.font, value_buf,
|
||||
x_offset + value_x_offset + (int)width - (int)mui->margin - (int)mui->landscape_entry_margin - (int)mui->nav_bar_layout_width,
|
||||
label_y,
|
||||
width, height,
|
||||
|
@ -2940,7 +2940,7 @@ static void materialui_render_menu_entry_default(
|
|||
}
|
||||
|
||||
/* Draw label string */
|
||||
menu_display_draw_text(mui->font_data.list.font, label_buf,
|
||||
gfx_display_draw_text(mui->font_data.list.font, label_buf,
|
||||
x_offset + (int)mui->ticker_x_offset + entry_margin,
|
||||
label_y,
|
||||
width, height,
|
||||
|
@ -3103,7 +3103,7 @@ static void materialui_render_menu_entry_playlist_list(
|
|||
}
|
||||
|
||||
/* Draw label string */
|
||||
menu_display_draw_text(mui->font_data.list.font, label_buf,
|
||||
gfx_display_draw_text(mui->font_data.list.font, label_buf,
|
||||
x_offset + (int)mui->ticker_x_offset + entry_margin,
|
||||
label_y,
|
||||
width, height,
|
||||
|
@ -3132,7 +3132,7 @@ static void materialui_render_menu_entry_playlist_list(
|
|||
* entries with very long sublabels may get 'clipped' too
|
||||
* early as they are scrolled upwards beyond the top edge
|
||||
* of the screen */
|
||||
menu_display_draw_text(mui->font_data.hint.font, wrapped_sublabel,
|
||||
gfx_display_draw_text(mui->font_data.hint.font, wrapped_sublabel,
|
||||
x_offset + entry_margin,
|
||||
sublabel_y,
|
||||
width, height,
|
||||
|
@ -3155,7 +3155,7 @@ static void materialui_render_menu_entry_playlist_list(
|
|||
(mui->list_view_type == MUI_LIST_VIEW_PLAYLIST_THUMB_LIST_LARGE))
|
||||
{
|
||||
if (usable_width > 0)
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
(float)(x_offset + entry_margin),
|
||||
entry_y + (float)node->entry_height,
|
||||
|
@ -3282,7 +3282,7 @@ static void materialui_render_menu_entry_playlist_dual_icon(
|
|||
(int)mui->margin + (int)mui->landscape_entry_margin);
|
||||
|
||||
/* Draw label string */
|
||||
menu_display_draw_text(mui->font_data.list.font, label_buf,
|
||||
gfx_display_draw_text(mui->font_data.list.font, label_buf,
|
||||
label_x,
|
||||
label_y,
|
||||
width, height,
|
||||
|
@ -3294,7 +3294,7 @@ static void materialui_render_menu_entry_playlist_dual_icon(
|
|||
|
||||
/* Draw divider */
|
||||
if (usable_width > 0)
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
(float)(x_offset + (int)mui->margin + (int)mui->landscape_entry_margin),
|
||||
thumbnail_y + (float)mui->thumbnail_height_max +
|
||||
|
@ -3317,7 +3317,7 @@ static void materialui_render_scrollbar(
|
|||
return;
|
||||
|
||||
/* Draw scrollbar */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
mui->scrollbar.x,
|
||||
mui->scrollbar.y,
|
||||
|
@ -3339,7 +3339,7 @@ static void materialui_render_menu_list(
|
|||
size_t last_entry;
|
||||
file_list_t *list = NULL;
|
||||
size_t entries_end = menu_entries_get_size();
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
bool touch_feedback_enabled =
|
||||
!mui->scrollbar.dragged &&
|
||||
|
@ -3458,7 +3458,7 @@ static size_t materialui_list_get_size(void *data, enum menu_list_type type)
|
|||
|
||||
static void materialui_render_background(materialui_handle_t *mui, video_frame_info_t *video_info)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
bool add_opacity = false;
|
||||
float opacity_override = 1.0f;
|
||||
float draw_color[16] = {
|
||||
|
@ -3475,7 +3475,7 @@ static void materialui_render_background(materialui_handle_t *mui, video_frame_i
|
|||
draw.height = video_info->height;
|
||||
draw.coords = NULL;
|
||||
draw.matrix_data = NULL;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.vertex = NULL;
|
||||
draw.tex_coord = NULL;
|
||||
draw.vertex_count = 4;
|
||||
|
@ -3495,7 +3495,7 @@ static void materialui_render_background(materialui_handle_t *mui, video_frame_i
|
|||
}
|
||||
else
|
||||
{
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
|
||||
/* Copy 'list_background' colour to draw colour */
|
||||
memcpy(draw_color, mui->colors.list_background, sizeof(draw_color));
|
||||
|
@ -3511,10 +3511,10 @@ static void materialui_render_background(materialui_handle_t *mui, video_frame_i
|
|||
}
|
||||
|
||||
/* Draw background */
|
||||
menu_display_blend_begin(video_info);
|
||||
menu_display_draw_bg(&draw, video_info, add_opacity, opacity_override);
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
gfx_display_draw_bg(&draw, video_info, add_opacity, opacity_override);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void materialui_render_landscape_border(
|
||||
|
@ -3532,7 +3532,7 @@ static void materialui_render_landscape_border(
|
|||
int y = (int)header_height;
|
||||
|
||||
/* Draw left border */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
left_x,
|
||||
y,
|
||||
|
@ -3543,7 +3543,7 @@ static void materialui_render_landscape_border(
|
|||
mui->colors.landscape_border_shadow_left);
|
||||
|
||||
/* Draw right border */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
right_x,
|
||||
y,
|
||||
|
@ -3597,7 +3597,7 @@ static void materialui_render_selection_highlight(
|
|||
highlight_height = (int)(node->entry_height + 1.5f);
|
||||
|
||||
/* Draw highlight quad */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
highlight_x,
|
||||
highlight_y,
|
||||
|
@ -3667,7 +3667,7 @@ static void materialui_render_entry_touch_feedback(
|
|||
|
||||
/* Set highlight colour */
|
||||
memcpy(higlight_color, mui->colors.list_highlighted_background, sizeof(higlight_color));
|
||||
menu_display_set_alpha(higlight_color, mui->transition_alpha * mui->touch_feedback_alpha);
|
||||
gfx_display_set_alpha(higlight_color, mui->transition_alpha * mui->touch_feedback_alpha);
|
||||
|
||||
/* Draw highlight */
|
||||
materialui_render_selection_highlight(
|
||||
|
@ -3706,7 +3706,7 @@ static void materialui_render_header(
|
|||
* > Shadow is underneath title bar */
|
||||
|
||||
/* > Shadow */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
mui->sys_bar_height + mui->title_bar_height,
|
||||
|
@ -3717,7 +3717,7 @@ static void materialui_render_header(
|
|||
mui->colors.header_shadow);
|
||||
|
||||
/* > Title bar background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
0,
|
||||
|
@ -3728,7 +3728,7 @@ static void materialui_render_header(
|
|||
mui->colors.title_bar_background);
|
||||
|
||||
/* > System bar background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
0,
|
||||
|
@ -3743,7 +3743,7 @@ static void materialui_render_header(
|
|||
/* > Draw battery indicator (if required) */
|
||||
if (settings->bools.menu_battery_level_enable)
|
||||
{
|
||||
menu_display_ctx_powerstate_t powerstate;
|
||||
gfx_display_ctx_powerstate_t powerstate;
|
||||
char percent_str[MUI_BATTERY_PERCENT_MAX_LENGTH];
|
||||
|
||||
percent_str[0] = '\0';
|
||||
|
@ -3812,7 +3812,7 @@ static void materialui_render_header(
|
|||
mui->colors.sys_bar_icon);
|
||||
|
||||
/* Draw percent text */
|
||||
menu_display_draw_text(mui->font_data.hint.font,
|
||||
gfx_display_draw_text(mui->font_data.hint.font,
|
||||
mui->sys_bar_cache.battery_percent_str,
|
||||
(int)width - ((int)mui->sys_bar_cache.battery_percent_width + (int)mui->sys_bar_margin + (int)mui->nav_bar_layout_width),
|
||||
sys_bar_text_y,
|
||||
|
@ -3828,7 +3828,7 @@ static void materialui_render_header(
|
|||
/* > Draw clock (if required) */
|
||||
if (settings->bools.menu_timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
gfx_display_ctx_datetime_t datetime;
|
||||
char timedate_str[MUI_TIMEDATE_MAX_LENGTH];
|
||||
|
||||
timedate_str[0] = '\0';
|
||||
|
@ -3865,7 +3865,7 @@ static void materialui_render_header(
|
|||
if (sys_bar_battery_width == 0)
|
||||
sys_bar_clock_width += mui->sys_bar_margin;
|
||||
|
||||
menu_display_draw_text(mui->font_data.hint.font,
|
||||
gfx_display_draw_text(mui->font_data.hint.font,
|
||||
mui->sys_bar_cache.timedate_str,
|
||||
(int)width - ((int)sys_bar_clock_width + (int)sys_bar_battery_width + (int)mui->nav_bar_layout_width),
|
||||
sys_bar_text_y,
|
||||
|
@ -3910,7 +3910,7 @@ static void materialui_render_header(
|
|||
gfx_animation_ticker(&mui->ticker);
|
||||
}
|
||||
|
||||
menu_display_draw_text(mui->font_data.hint.font, core_title_buf,
|
||||
gfx_display_draw_text(mui->font_data.hint.font, core_title_buf,
|
||||
(int)mui->ticker_x_offset + (int)mui->sys_bar_margin,
|
||||
sys_bar_text_y,
|
||||
width, height, mui->colors.sys_bar_text, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
|
@ -4051,7 +4051,7 @@ static void materialui_render_header(
|
|||
|
||||
title_x += (int)(mui->ticker_x_offset + menu_title_margin);
|
||||
|
||||
menu_display_draw_text(mui->font_data.title.font, menu_title_buf,
|
||||
gfx_display_draw_text(mui->font_data.title.font, menu_title_buf,
|
||||
title_x,
|
||||
(int)(mui->sys_bar_height + (mui->title_bar_height / 2.0f) + (mui->font_data.title.font_height / 4.0f)),
|
||||
width, height, mui->colors.header_text, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
|
@ -4080,7 +4080,7 @@ static void materialui_render_nav_bar_bottom(
|
|||
/* Draw navigation bar background */
|
||||
|
||||
/* > Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
|
@ -4091,7 +4091,7 @@ static void materialui_render_nav_bar_bottom(
|
|||
mui->colors.nav_bar_background);
|
||||
|
||||
/* > Divider */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
|
@ -4149,7 +4149,7 @@ static void materialui_render_nav_bar_bottom(
|
|||
draw_color);
|
||||
|
||||
/* Draw selection marker */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
(int)((i + 1) * tab_width_int),
|
||||
selection_marker_y,
|
||||
|
@ -4180,7 +4180,7 @@ static void materialui_render_nav_bar_right(
|
|||
/* Draw navigation bar background */
|
||||
|
||||
/* > Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
|
@ -4191,7 +4191,7 @@ static void materialui_render_nav_bar_right(
|
|||
mui->colors.nav_bar_background);
|
||||
|
||||
/* > Divider */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
|
@ -4249,7 +4249,7 @@ static void materialui_render_nav_bar_right(
|
|||
draw_color);
|
||||
|
||||
/* Draw selection marker */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
selection_marker_x,
|
||||
(int)((i + 1) * tab_height_int),
|
||||
|
@ -4626,15 +4626,15 @@ static void materialui_render_fullscreen_thumbnails(
|
|||
}
|
||||
|
||||
/* Set colour alpha values */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.screen_fade,
|
||||
mui->colors.screen_fade_opacity * mui->fullscreen_thumbnail_alpha);
|
||||
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.surface_background, mui->fullscreen_thumbnail_alpha);
|
||||
|
||||
/* Darken background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
header_height,
|
||||
|
@ -4649,7 +4649,7 @@ static void materialui_render_fullscreen_thumbnails(
|
|||
if (show_primary_thumbnail)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
primary_thumbnail_x - (int)(mui->margin >> 1) +
|
||||
((thumbnail_box_width - (int)primary_thumbnail_draw_width) >> 1),
|
||||
|
@ -4679,7 +4679,7 @@ static void materialui_render_fullscreen_thumbnails(
|
|||
if (show_secondary_thumbnail)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
secondary_thumbnail_x - (int)(mui->margin >> 1) +
|
||||
((thumbnail_box_width - (int)secondary_thumbnail_draw_width) >> 1),
|
||||
|
@ -4731,14 +4731,14 @@ static void materialui_colors_set_transition_alpha(materialui_handle_t *mui)
|
|||
mui->colors.list_hint_text_highlighted = (mui->colors.list_hint_text_highlighted & 0xFFFFFF00) | alpha_255;
|
||||
|
||||
/* Background/object colours */
|
||||
menu_display_set_alpha(mui->colors.list_highlighted_background, alpha);
|
||||
menu_display_set_alpha(mui->colors.list_icon, alpha);
|
||||
menu_display_set_alpha(mui->colors.list_switch_on, alpha);
|
||||
menu_display_set_alpha(mui->colors.list_switch_on_background, alpha);
|
||||
menu_display_set_alpha(mui->colors.list_switch_off, alpha);
|
||||
menu_display_set_alpha(mui->colors.list_switch_off_background, alpha);
|
||||
menu_display_set_alpha(mui->colors.scrollbar, alpha);
|
||||
menu_display_set_alpha(mui->colors.missing_thumbnail_icon, alpha);
|
||||
gfx_display_set_alpha(mui->colors.list_highlighted_background, alpha);
|
||||
gfx_display_set_alpha(mui->colors.list_icon, alpha);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_on, alpha);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_on_background, alpha);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_off, alpha);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_off_background, alpha);
|
||||
gfx_display_set_alpha(mui->colors.scrollbar, alpha);
|
||||
gfx_display_set_alpha(mui->colors.missing_thumbnail_icon, alpha);
|
||||
|
||||
/* Landscape border shadow only fades if:
|
||||
* - Landscape border is shown
|
||||
|
@ -4770,14 +4770,14 @@ static void materialui_colors_reset_transition_alpha(materialui_handle_t *mui)
|
|||
mui->colors.list_hint_text_highlighted = (mui->colors.list_hint_text_highlighted | 0xFF);
|
||||
|
||||
/* Background/object colours */
|
||||
menu_display_set_alpha(mui->colors.list_highlighted_background, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.list_icon, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.list_switch_on, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.list_switch_on_background, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.list_switch_off, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.list_switch_off_background, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.scrollbar, 1.0f);
|
||||
menu_display_set_alpha(mui->colors.missing_thumbnail_icon, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.list_highlighted_background, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.list_icon, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_on, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_on_background, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_off, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.list_switch_off_background, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.scrollbar, 1.0f);
|
||||
gfx_display_set_alpha(mui->colors.missing_thumbnail_icon, 1.0f);
|
||||
|
||||
/* Landscape border shadow only fades if:
|
||||
* - Landscape border is shown
|
||||
|
@ -4836,14 +4836,14 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||
settings_t *settings = config_get_ptr();
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
int list_x_offset;
|
||||
|
||||
if (!mui || !settings)
|
||||
return;
|
||||
|
||||
menu_display_set_viewport(width, height);
|
||||
gfx_display_set_viewport(width, height);
|
||||
|
||||
/* Clear text */
|
||||
font_driver_bind_block(mui->font_data.title.font, &mui->font_data.title.raster_block);
|
||||
|
@ -4949,9 +4949,9 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||
msg[0] = '\0';
|
||||
|
||||
/* Darken screen */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.screen_fade, mui->colors.screen_fade_opacity);
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0, width, height, width, height, mui->colors.screen_fade);
|
||||
|
||||
/* Draw message box */
|
||||
|
@ -4959,7 +4959,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||
materialui_render_messagebox(mui, video_info, height / 4, msg);
|
||||
|
||||
/* Draw onscreen keyboard */
|
||||
menu_display_draw_keyboard(
|
||||
gfx_display_draw_keyboard(
|
||||
mui->textures.list[MUI_TEXTURE_KEY_HOVER],
|
||||
mui->font_data.list.font,
|
||||
video_info,
|
||||
|
@ -4976,9 +4976,9 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||
if (!string_is_empty(mui->msgbox))
|
||||
{
|
||||
/* Darken screen */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.screen_fade, mui->colors.screen_fade_opacity);
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0, width, height, width, height, mui->colors.screen_fade);
|
||||
|
||||
/* Draw message box */
|
||||
|
@ -5001,7 +5001,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||
1.0f, 1.0f, 1.0f, 1.0f
|
||||
};
|
||||
|
||||
menu_display_draw_cursor(
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
color_white,
|
||||
mui->cursor_size,
|
||||
|
@ -5021,7 +5021,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||
font_driver_bind_block(mui->font_data.list.font, NULL);
|
||||
font_driver_bind_block(mui->font_data.hint.font, NULL);
|
||||
|
||||
menu_display_unset_viewport(width, height);
|
||||
gfx_display_unset_viewport(width, height);
|
||||
}
|
||||
|
||||
/* Determines current list view type, based on
|
||||
|
@ -5474,33 +5474,33 @@ static void materialui_layout(materialui_handle_t *mui, bool video_is_threaded)
|
|||
mui->font_data.list.glyph_width = (int)((list_font_size * (3.0f / 4.0f)) + 0.5f);
|
||||
mui->font_data.hint.glyph_width = (int)((hint_font_size * (3.0f / 4.0f)) + 0.5f);
|
||||
|
||||
menu_display_set_header_height(new_header_height);
|
||||
gfx_display_set_header_height(new_header_height);
|
||||
|
||||
if (mui->font_data.title.font)
|
||||
{
|
||||
menu_display_font_free(mui->font_data.title.font);
|
||||
gfx_display_font_free(mui->font_data.title.font);
|
||||
mui->font_data.title.font = NULL;
|
||||
}
|
||||
if (mui->font_data.list.font)
|
||||
{
|
||||
menu_display_font_free(mui->font_data.list.font);
|
||||
gfx_display_font_free(mui->font_data.list.font);
|
||||
mui->font_data.list.font = NULL;
|
||||
}
|
||||
if (mui->font_data.hint.font)
|
||||
{
|
||||
menu_display_font_free(mui->font_data.hint.font);
|
||||
gfx_display_font_free(mui->font_data.hint.font);
|
||||
mui->font_data.hint.font = NULL;
|
||||
}
|
||||
|
||||
mui->font_data.title.font = menu_display_font(
|
||||
mui->font_data.title.font = gfx_display_font(
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
||||
title_font_size, video_is_threaded);
|
||||
|
||||
mui->font_data.list.font = menu_display_font(
|
||||
mui->font_data.list.font = gfx_display_font(
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
||||
list_font_size, video_is_threaded);
|
||||
|
||||
mui->font_data.hint.font = menu_display_font(
|
||||
mui->font_data.hint.font = gfx_display_font(
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
||||
hint_font_size, video_is_threaded);
|
||||
|
||||
|
@ -5606,7 +5606,7 @@ static void *materialui_init(void **userdata, bool video_is_threaded)
|
|||
if (!menu || !settings)
|
||||
return NULL;
|
||||
|
||||
if (!menu_display_init_first_driver(video_is_threaded))
|
||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||
goto error;
|
||||
|
||||
mui = (materialui_handle_t*)calloc(1, sizeof(materialui_handle_t));
|
||||
|
@ -5711,7 +5711,7 @@ static void materialui_context_bg_destroy(materialui_handle_t *mui)
|
|||
return;
|
||||
|
||||
video_driver_texture_unload(&mui->textures.bg);
|
||||
video_driver_texture_unload(&menu_display_white_texture);
|
||||
video_driver_texture_unload(&gfx_display_white_texture);
|
||||
}
|
||||
|
||||
static void materialui_reset_thumbnails(void)
|
||||
|
@ -5750,15 +5750,15 @@ static void materialui_context_destroy(void *data)
|
|||
|
||||
/* Free fonts */
|
||||
if (mui->font_data.title.font)
|
||||
menu_display_font_free(mui->font_data.title.font);
|
||||
gfx_display_font_free(mui->font_data.title.font);
|
||||
mui->font_data.title.font = NULL;
|
||||
|
||||
if (mui->font_data.list.font)
|
||||
menu_display_font_free(mui->font_data.list.font);
|
||||
gfx_display_font_free(mui->font_data.list.font);
|
||||
mui->font_data.list.font = NULL;
|
||||
|
||||
if (mui->font_data.hint.font)
|
||||
menu_display_font_free(mui->font_data.hint.font);
|
||||
gfx_display_font_free(mui->font_data.hint.font);
|
||||
mui->font_data.hint.font = NULL;
|
||||
|
||||
/* Free node thumbnails */
|
||||
|
@ -5780,7 +5780,7 @@ static bool materialui_load_image(void *userdata, void *data, enum menu_image_ty
|
|||
materialui_context_bg_destroy(mui);
|
||||
video_driver_texture_load(data,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, &mui->textures.bg);
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -6155,7 +6155,7 @@ static void materialui_context_reset(void *data, bool is_threaded)
|
|||
|
||||
materialui_layout(mui, is_threaded);
|
||||
materialui_context_bg_destroy(mui);
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
materialui_context_reset_textures(mui);
|
||||
|
||||
if (path_is_valid(settings->paths.path_menu_wallpaper))
|
||||
|
@ -6831,7 +6831,7 @@ static int materialui_pointer_down(void *userdata,
|
|||
* fullscreen thumbnails) */
|
||||
if (mui->scrollbar.active && !mui->show_fullscreen_thumbnails)
|
||||
{
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
gfx_animation_ctx_tag tag = (uintptr_t)&mui->scroll_y;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
|
@ -7110,7 +7110,7 @@ static int materialui_pointer_up(void *userdata,
|
|||
menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action)
|
||||
{
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
size_t entries_end = menu_entries_get_size();
|
||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||
|
@ -7947,7 +7947,7 @@ menu_ctx_driver_t menu_ctx_mui = {
|
|||
materialui_set_thumbnail_system,
|
||||
materialui_get_thumbnail_system,
|
||||
NULL,
|
||||
menu_display_osk_ptr_at_pos,
|
||||
gfx_display_osk_ptr_at_pos,
|
||||
NULL, /* update_savestate_thumbnail_path */
|
||||
NULL, /* update_savestate_thumbnail_image */
|
||||
materialui_pointer_down,
|
||||
|
|
|
@ -95,7 +95,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||
|
||||
if ( action != MENU_ACTION_NOOP
|
||||
|| menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL)
|
||||
|| menu_display_get_update_pending())
|
||||
|| gfx_display_get_update_pending())
|
||||
{
|
||||
BIT64_SET(menu->state, MENU_STATE_RENDER_FRAMEBUFFER);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
|||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
if (!menu_display_init_first_driver(video_is_threaded))
|
||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||
goto error;
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
@ -222,10 +222,10 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
|||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
|
||||
|
||||
menu_display_set_width(width);
|
||||
menu_display_set_height(height);
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
|
||||
ozone->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
|
||||
|
@ -521,32 +521,32 @@ static void ozone_set_layout(ozone_handle_t *ozone, bool is_threaded)
|
|||
/* > Free existing */
|
||||
if (ozone->fonts.footer)
|
||||
{
|
||||
menu_display_font_free(ozone->fonts.footer);
|
||||
gfx_display_font_free(ozone->fonts.footer);
|
||||
ozone->fonts.footer = NULL;
|
||||
}
|
||||
if (ozone->fonts.entries_label)
|
||||
{
|
||||
menu_display_font_free(ozone->fonts.entries_label);
|
||||
gfx_display_font_free(ozone->fonts.entries_label);
|
||||
ozone->fonts.entries_label = NULL;
|
||||
}
|
||||
if (ozone->fonts.entries_sublabel)
|
||||
{
|
||||
menu_display_font_free(ozone->fonts.entries_sublabel);
|
||||
gfx_display_font_free(ozone->fonts.entries_sublabel);
|
||||
ozone->fonts.entries_sublabel = NULL;
|
||||
}
|
||||
if (ozone->fonts.time)
|
||||
{
|
||||
menu_display_font_free(ozone->fonts.time);
|
||||
gfx_display_font_free(ozone->fonts.time);
|
||||
ozone->fonts.time = NULL;
|
||||
}
|
||||
if (ozone->fonts.sidebar)
|
||||
{
|
||||
menu_display_font_free(ozone->fonts.sidebar);
|
||||
gfx_display_font_free(ozone->fonts.sidebar);
|
||||
ozone->fonts.sidebar = NULL;
|
||||
}
|
||||
if (ozone->fonts.title)
|
||||
{
|
||||
menu_display_font_free(ozone->fonts.title);
|
||||
gfx_display_font_free(ozone->fonts.title);
|
||||
ozone->fonts.title = NULL;
|
||||
}
|
||||
|
||||
|
@ -560,15 +560,15 @@ static void ozone_set_layout(ozone_handle_t *ozone, bool is_threaded)
|
|||
|
||||
/* > Create 'bold' font objects */
|
||||
fill_pathname_join(font_path, ozone->assets_path, "bold.ttf", sizeof(font_path));
|
||||
ozone->fonts.title = menu_display_font_file(font_path, ozone->title_font_glyph_height, is_threaded);
|
||||
ozone->fonts.title = gfx_display_font_file(font_path, ozone->title_font_glyph_height, is_threaded);
|
||||
|
||||
/* > Create 'regular' font objects */
|
||||
fill_pathname_join(font_path, ozone->assets_path, "regular.ttf", sizeof(font_path));
|
||||
ozone->fonts.entries_label = menu_display_font_file(font_path, ozone->entry_font_glyph_height, is_threaded);
|
||||
ozone->fonts.entries_sublabel = menu_display_font_file(font_path, ozone->sublabel_font_glyph_height, is_threaded);
|
||||
ozone->fonts.footer = menu_display_font_file(font_path, ozone->footer_font_glyph_height, is_threaded);
|
||||
ozone->fonts.sidebar = menu_display_font_file(font_path, ozone->sidebar_font_glyph_height, is_threaded);
|
||||
ozone->fonts.time = menu_display_font_file(font_path, ozone->time_font_glyph_height, is_threaded);
|
||||
ozone->fonts.entries_label = gfx_display_font_file(font_path, ozone->entry_font_glyph_height, is_threaded);
|
||||
ozone->fonts.entries_sublabel = gfx_display_font_file(font_path, ozone->sublabel_font_glyph_height, is_threaded);
|
||||
ozone->fonts.footer = gfx_display_font_file(font_path, ozone->footer_font_glyph_height, is_threaded);
|
||||
ozone->fonts.sidebar = gfx_display_font_file(font_path, ozone->sidebar_font_glyph_height, is_threaded);
|
||||
ozone->fonts.time = gfx_display_font_file(font_path, ozone->time_font_glyph_height, is_threaded);
|
||||
|
||||
/* > Check for missing assets */
|
||||
if (!ozone->fonts.title ||
|
||||
|
@ -670,13 +670,13 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
|||
fill_pathname_application_special(buf,
|
||||
sizeof(buf),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS);
|
||||
if (!menu_display_reset_textures_list(filename, buf, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(filename, buf, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->png_path, path_default_slash(), filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
if (!menu_display_reset_textures_list(filename, ozone->png_path, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(filename, ozone->png_path, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
{
|
||||
ozone->has_all_assets = false;
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->png_path, path_default_slash(), filename);
|
||||
|
@ -696,7 +696,7 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
|||
OZONE_TAB_TEXTURES_FILES[i], sizeof(filename));
|
||||
strlcat(filename, ".png", sizeof(filename));
|
||||
|
||||
if (!menu_display_reset_textures_list(filename, ozone->tab_path, &ozone->tab_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(filename, ozone->tab_path, &ozone->tab_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
{
|
||||
ozone->has_all_assets = false;
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->tab_path, path_default_slash(), filename);
|
||||
|
@ -710,14 +710,14 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
|||
/* Icons textures init */
|
||||
for (i = 0; i < OZONE_ENTRIES_ICONS_TEXTURE_LAST; i++)
|
||||
{
|
||||
if (!menu_display_reset_textures_list(ozone_entries_icon_texture_path(i), ozone->icons_path, &ozone->icons_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(ozone_entries_icon_texture_path(i), ozone->icons_path, &ozone->icons_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
{
|
||||
ozone->has_all_assets = false;
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->icons_path, path_default_slash(), ozone_entries_icon_texture_path(i));
|
||||
}
|
||||
}
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
|
||||
/* Horizontal list */
|
||||
ozone_context_reset_horizontal_list(ozone);
|
||||
|
@ -796,14 +796,14 @@ static void ozone_context_destroy(void *data)
|
|||
/* Thumbnails */
|
||||
ozone_unload_thumbnail_textures(ozone);
|
||||
|
||||
video_driver_texture_unload(&menu_display_white_texture);
|
||||
video_driver_texture_unload(&gfx_display_white_texture);
|
||||
|
||||
menu_display_font_free(ozone->fonts.footer);
|
||||
menu_display_font_free(ozone->fonts.title);
|
||||
menu_display_font_free(ozone->fonts.time);
|
||||
menu_display_font_free(ozone->fonts.entries_label);
|
||||
menu_display_font_free(ozone->fonts.entries_sublabel);
|
||||
menu_display_font_free(ozone->fonts.sidebar);
|
||||
gfx_display_font_free(ozone->fonts.footer);
|
||||
gfx_display_font_free(ozone->fonts.title);
|
||||
gfx_display_font_free(ozone->fonts.time);
|
||||
gfx_display_font_free(ozone->fonts.entries_label);
|
||||
gfx_display_font_free(ozone->fonts.entries_sublabel);
|
||||
gfx_display_font_free(ozone->fonts.sidebar);
|
||||
|
||||
ozone->fonts.footer = NULL;
|
||||
ozone->fonts.title = NULL;
|
||||
|
@ -1171,7 +1171,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
}
|
||||
|
||||
/* Separator */
|
||||
menu_display_draw_quad(video_info, seperator_margin, ozone->dimensions.header_height, video_info->width - seperator_margin * 2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->header_footer_separator);
|
||||
gfx_display_draw_quad(video_info, seperator_margin, ozone->dimensions.header_height, video_info->width - seperator_margin * 2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->header_footer_separator);
|
||||
|
||||
/* Title */
|
||||
if (use_smooth_ticker)
|
||||
|
@ -1198,7 +1198,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
ozone_draw_text(video_info, ozone, title, ticker_x_offset + 128 * scale_factor, ozone->dimensions.header_height / 2 + ozone->title_font_glyph_height * 3.0f/10.0f, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.title, ozone->theme->text_rgba, false);
|
||||
|
||||
/* Icon */
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
#if 0
|
||||
if (discord_avatar_is_ready())
|
||||
ozone_draw_icon(
|
||||
|
@ -1223,12 +1223,12 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
video_info->width,
|
||||
video_info->height,
|
||||
0, 1, ozone->theme->entries_icon);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
/* Battery */
|
||||
if (video_info->battery_level_enable)
|
||||
{
|
||||
menu_display_ctx_powerstate_t powerstate;
|
||||
gfx_display_ctx_powerstate_t powerstate;
|
||||
char msg[12];
|
||||
|
||||
msg[0] = '\0';
|
||||
|
@ -1244,7 +1244,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
|
||||
ozone_draw_text(video_info, ozone, msg, video_info->width - 85 * scale_factor, ozone->dimensions.header_height / 2 + ozone->time_font_glyph_height * 3.0f/10.0f, TEXT_ALIGN_RIGHT, video_info->width, video_info->height, ozone->fonts.time, ozone->theme->text_rgba, false);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
ozone_draw_icon(
|
||||
video_info,
|
||||
status_icon_size,
|
||||
|
@ -1255,14 +1255,14 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
video_info->width,
|
||||
video_info->height,
|
||||
0, 1, ozone->theme->entries_icon);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
}
|
||||
|
||||
/* Timedate */
|
||||
if (video_info->timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
gfx_display_ctx_datetime_t datetime;
|
||||
char timedate[255];
|
||||
|
||||
timedate[0] = '\0';
|
||||
|
@ -1275,7 +1275,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
|
||||
ozone_draw_text(video_info, ozone, timedate, video_info->width - (85 * scale_factor) - timedate_offset, ozone->dimensions.header_height / 2 + ozone->time_font_glyph_height * 3.0f/10.0f, TEXT_ALIGN_RIGHT, video_info->width, video_info->height, ozone->fonts.time, ozone->theme->text_rgba, false);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
ozone_draw_icon(
|
||||
video_info,
|
||||
status_icon_size,
|
||||
|
@ -1286,7 +1286,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
video_info->width,
|
||||
video_info->height,
|
||||
0, 1, ozone->theme->entries_icon);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1296,7 +1296,7 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
unsigned seperator_margin = 30 * scale_factor;
|
||||
|
||||
/* Separator */
|
||||
menu_display_draw_quad(video_info, seperator_margin, video_info->height - ozone->dimensions.footer_height, video_info->width - seperator_margin * 2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->header_footer_separator);
|
||||
gfx_display_draw_quad(video_info, seperator_margin, video_info->height - ozone->dimensions.footer_height, video_info->width - seperator_margin * 2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->header_footer_separator);
|
||||
|
||||
/* Core title or Switch icon */
|
||||
if (settings->bools.menu_core_enable)
|
||||
|
@ -1324,9 +1324,9 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
ok_width = 215 * scale_factor;
|
||||
}
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
menu_display_set_alpha(ozone->theme_dynamic.entries_icon, 1.0f);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.entries_icon, 1.0f);
|
||||
|
||||
if (do_swap)
|
||||
{
|
||||
|
@ -1344,7 +1344,7 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
if (ozone->is_playlist && !ozone->cursor_in_sidebar)
|
||||
ozone_draw_icon(video_info, icon_size, icon_size, ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L], video_info->width - (384 + 118 + 100 + 50) * scale_factor, video_info->height - ozone->dimensions.footer_height / 2 - icon_offset, video_info->width,video_info->height, 0, 1, ozone->theme_dynamic.entries_icon);
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
ozone_draw_text(video_info, ozone,
|
||||
do_swap ?
|
||||
|
@ -1368,7 +1368,7 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
void ozone_update_content_metadata(ozone_handle_t *ozone)
|
||||
|
@ -1720,7 +1720,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||
last_use_preferred_system_color_theme = settings->bools.menu_use_preferred_system_color_theme;
|
||||
}
|
||||
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
gfx_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
/* Clear text */
|
||||
font_driver_bind_block(ozone->fonts.footer, &ozone->raster_blocks.footer);
|
||||
|
@ -1738,7 +1738,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||
ozone->raster_blocks.sidebar.carr.coords.vertices = 0;
|
||||
|
||||
/* Background */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0, video_info->width, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
!video_info->libretro_running ? ozone->theme->background : ozone->theme->background_libretro_running
|
||||
|
@ -1752,7 +1752,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||
ozone_draw_sidebar(ozone, video_info);
|
||||
|
||||
/* Menu entries */
|
||||
menu_display_scissor_begin(video_info, ozone->sidebar_offset + (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, video_info->width - (unsigned) ozone->dimensions.sidebar_width + (-ozone->sidebar_offset), video_info->height - ozone->dimensions.header_height - ozone->dimensions.footer_height - ozone->dimensions.spacer_1px);
|
||||
gfx_display_scissor_begin(video_info, ozone->sidebar_offset + (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, video_info->width - (unsigned) ozone->dimensions.sidebar_width + (-ozone->sidebar_offset), video_info->height - ozone->dimensions.header_height - ozone->dimensions.footer_height - ozone->dimensions.spacer_1px);
|
||||
|
||||
/* Current list */
|
||||
ozone_draw_entries(ozone,
|
||||
|
@ -1781,7 +1781,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||
if (ozone->show_thumbnail_bar)
|
||||
ozone_draw_thumbnail_bar(ozone, video_info);
|
||||
|
||||
menu_display_scissor_end(video_info);
|
||||
gfx_display_scissor_end(video_info);
|
||||
|
||||
/* Flush first layer of text */
|
||||
font_driver_flush(video_info->width, video_info->height, ozone->fonts.footer, video_info);
|
||||
|
@ -1864,8 +1864,8 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||
menu_input_pointer_t pointer;
|
||||
menu_input_get_pointer_state(&pointer);
|
||||
|
||||
menu_display_set_alpha(ozone_pure_white, 1.0f);
|
||||
menu_display_draw_cursor(
|
||||
gfx_display_set_alpha(ozone_pure_white, 1.0f);
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
ozone_pure_white,
|
||||
ozone->dimensions.cursor_size,
|
||||
|
@ -1877,7 +1877,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||
);
|
||||
}
|
||||
|
||||
menu_display_unset_viewport(video_info->width, video_info->height);
|
||||
gfx_display_unset_viewport(video_info->width, video_info->height);
|
||||
}
|
||||
|
||||
static void ozone_set_header(ozone_handle_t *ozone)
|
||||
|
@ -2718,7 +2718,7 @@ menu_ctx_driver_t menu_ctx_ozone = {
|
|||
ozone_set_thumbnail_system,
|
||||
ozone_get_thumbnail_system,
|
||||
ozone_set_thumbnail_content,
|
||||
menu_display_osk_ptr_at_pos,
|
||||
gfx_display_osk_ptr_at_pos,
|
||||
NULL, /* update_savestate_thumbnail_path */
|
||||
NULL, /* update_savestate_thumbnail_image */
|
||||
NULL, /* pointer_down */
|
||||
|
|
|
@ -106,7 +106,7 @@ void ozone_draw_text(
|
|||
uint32_t color,
|
||||
bool draw_outside)
|
||||
{
|
||||
menu_display_draw_text(font, str, x, y,
|
||||
gfx_display_draw_text(font, str, x, y,
|
||||
width, height, color, text_align, 1.0f,
|
||||
false,
|
||||
1.0, draw_outside);
|
||||
|
@ -124,13 +124,13 @@ static void ozone_draw_cursor_slice(ozone_handle_t *ozone,
|
|||
unsigned slice_new_w = width + (3 + 28 - 4) * scale_factor;
|
||||
unsigned slice_new_h = height + 20 * scale_factor;
|
||||
|
||||
menu_display_set_alpha(ozone->theme_dynamic.cursor_alpha, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.cursor_border, alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.cursor_alpha, alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.cursor_border, alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
/* Cursor without border */
|
||||
menu_display_draw_texture_slice(
|
||||
gfx_display_draw_texture_slice(
|
||||
video_info,
|
||||
slice_x,
|
||||
slice_y,
|
||||
|
@ -144,7 +144,7 @@ static void ozone_draw_cursor_slice(ozone_handle_t *ozone,
|
|||
);
|
||||
|
||||
/* Tainted border */
|
||||
menu_display_draw_texture_slice(
|
||||
gfx_display_draw_texture_slice(
|
||||
video_info,
|
||||
slice_x,
|
||||
slice_y,
|
||||
|
@ -157,7 +157,7 @@ static void ozone_draw_cursor_slice(ozone_handle_t *ozone,
|
|||
ozone->textures[OZONE_TEXTURE_CURSOR_BORDER]
|
||||
);
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void ozone_draw_cursor_fallback(ozone_handle_t *ozone,
|
||||
|
@ -166,25 +166,25 @@ static void ozone_draw_cursor_fallback(ozone_handle_t *ozone,
|
|||
unsigned width, unsigned height,
|
||||
size_t y, float alpha)
|
||||
{
|
||||
menu_display_set_alpha(ozone->theme_dynamic.selection_border, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.selection, alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.selection_border, alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.selection, alpha);
|
||||
|
||||
/* Fill */
|
||||
menu_display_draw_quad(video_info, x_offset, (int)y, width, height - ozone->dimensions.spacer_5px, video_info->width, video_info->height, ozone->theme_dynamic.selection);
|
||||
gfx_display_draw_quad(video_info, x_offset, (int)y, width, height - ozone->dimensions.spacer_5px, video_info->width, video_info->height, ozone->theme_dynamic.selection);
|
||||
|
||||
/* Borders (can't do one single quad because of alpha) */
|
||||
|
||||
/* Top */
|
||||
menu_display_draw_quad(video_info, x_offset - ozone->dimensions.spacer_3px, (int)(y - ozone->dimensions.spacer_3px), width + ozone->dimensions.spacer_3px * 2, ozone->dimensions.spacer_3px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(video_info, x_offset - ozone->dimensions.spacer_3px, (int)(y - ozone->dimensions.spacer_3px), width + ozone->dimensions.spacer_3px * 2, ozone->dimensions.spacer_3px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
|
||||
/* Bottom */
|
||||
menu_display_draw_quad(video_info, x_offset - ozone->dimensions.spacer_3px, (int)(y + height - ozone->dimensions.spacer_5px), width + ozone->dimensions.spacer_3px * 2, ozone->dimensions.spacer_3px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(video_info, x_offset - ozone->dimensions.spacer_3px, (int)(y + height - ozone->dimensions.spacer_5px), width + ozone->dimensions.spacer_3px * 2, ozone->dimensions.spacer_3px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
|
||||
/* Left */
|
||||
menu_display_draw_quad(video_info, (int)(x_offset - ozone->dimensions.spacer_3px), (int)y, ozone->dimensions.spacer_3px, height - ozone->dimensions.spacer_5px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(video_info, (int)(x_offset - ozone->dimensions.spacer_3px), (int)y, ozone->dimensions.spacer_3px, height - ozone->dimensions.spacer_5px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
|
||||
/* Right */
|
||||
menu_display_draw_quad(video_info, x_offset + width, (int)y, ozone->dimensions.spacer_3px, height - ozone->dimensions.spacer_5px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(video_info, x_offset + width, (int)y, ozone->dimensions.spacer_3px, height - ozone->dimensions.spacer_5px, video_info->width, video_info->height, ozone->theme_dynamic.selection_border);
|
||||
}
|
||||
|
||||
void ozone_draw_cursor(ozone_handle_t *ozone,
|
||||
|
@ -209,8 +209,8 @@ void ozone_draw_icon(
|
|||
float rotation, float scale_factor,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
|
||||
|
@ -221,7 +221,7 @@ void ozone_draw_icon(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
|
@ -238,17 +238,17 @@ void ozone_draw_icon(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
void ozone_draw_backdrop(video_frame_info_t *video_info, float alpha)
|
||||
{
|
||||
/* TODO: Replace this backdrop by a blur shader on the whole screen if available */
|
||||
menu_display_set_alpha(ozone_backdrop, alpha);
|
||||
menu_display_draw_quad(video_info, 0, 0, video_info->width, video_info->height, video_info->width, video_info->height, ozone_backdrop);
|
||||
gfx_display_set_alpha(ozone_backdrop, alpha);
|
||||
gfx_display_draw_quad(video_info, 0, 0, video_info->width, video_info->height, video_info->width, video_info->height, ozone_backdrop);
|
||||
}
|
||||
|
||||
void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
|
@ -279,20 +279,20 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
|||
|
||||
/* Border */
|
||||
/* Top */
|
||||
menu_display_draw_quad(video_info, margin, margin, video_info->width - margin*2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(video_info, margin, margin, video_info->width - margin*2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
|
||||
/* Bottom */
|
||||
menu_display_draw_quad(video_info, margin, bottom_end - margin, video_info->width - margin*2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(video_info, margin, bottom_end - margin, video_info->width - margin*2, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
|
||||
/* Left */
|
||||
menu_display_draw_quad(video_info, margin, margin, ozone->dimensions.spacer_1px, bottom_end - margin*2, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(video_info, margin, margin, ozone->dimensions.spacer_1px, bottom_end - margin*2, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
|
||||
/* Right */
|
||||
menu_display_draw_quad(video_info, video_info->width - margin, margin, ozone->dimensions.spacer_1px, bottom_end - margin*2, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(video_info, video_info->width - margin, margin, ozone->dimensions.spacer_1px, bottom_end - margin*2, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
|
||||
/* Backdrop */
|
||||
/* TODO: Remove the backdrop if blur shader is available */
|
||||
menu_display_draw_quad(video_info, margin + ozone->dimensions.spacer_1px, margin + ozone->dimensions.spacer_1px, video_info->width - margin*2 - ozone->dimensions.spacer_2px, bottom_end - margin*2 - ozone->dimensions.spacer_2px, video_info->width, video_info->height, ozone_osk_backdrop);
|
||||
gfx_display_draw_quad(video_info, margin + ozone->dimensions.spacer_1px, margin + ozone->dimensions.spacer_1px, video_info->width - margin*2 - ozone->dimensions.spacer_2px, bottom_end - margin*2 - ozone->dimensions.spacer_2px, video_info->width, video_info->height, ozone_osk_backdrop);
|
||||
|
||||
/* Placeholder & text*/
|
||||
if (!draw_placeholder)
|
||||
|
@ -322,7 +322,7 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
|||
if (ozone->osk_cursor)
|
||||
{
|
||||
unsigned cursor_x = draw_placeholder ? 0 : font_driver_get_message_width(ozone->fonts.entries_label, msg, (unsigned)strlen(msg), 1);
|
||||
menu_display_draw_quad(video_info, margin + padding*2 + cursor_x, margin + padding + y_offset + ozone->dimensions.spacer_3px, ozone->dimensions.spacer_1px, 25 * scale_factor, video_info->width, video_info->height, ozone_pure_white);
|
||||
gfx_display_draw_quad(video_info, margin + padding*2 + cursor_x, margin + padding + y_offset + ozone->dimensions.spacer_3px, ozone->dimensions.spacer_1px, 25 * scale_factor, video_info->width, video_info->height, ozone_pure_white);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -332,7 +332,7 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
|||
}
|
||||
|
||||
/* Keyboard */
|
||||
menu_display_draw_keyboard(
|
||||
gfx_display_draw_keyboard(
|
||||
ozone->theme->textures[OZONE_THEME_TEXTURE_CURSOR_STATIC],
|
||||
ozone->fonts.entries_label,
|
||||
video_info,
|
||||
|
@ -386,9 +386,9 @@ void ozone_draw_messagebox(ozone_handle_t *ozone,
|
|||
}
|
||||
}
|
||||
|
||||
menu_display_set_alpha(ozone->theme_dynamic.message_background, ozone->animations.messagebox_alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.message_background, ozone->animations.messagebox_alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
if (ozone->has_all_assets) /* avoid drawing a black box if there's no assets */
|
||||
{
|
||||
|
@ -396,7 +396,7 @@ void ozone_draw_messagebox(ozone_handle_t *ozone,
|
|||
unsigned slice_new_w = longest_width + 48 * 2 * scale_factor;
|
||||
unsigned slice_new_h = ozone->footer_font_glyph_height * (list->size + 2);
|
||||
|
||||
menu_display_draw_texture_slice(
|
||||
gfx_display_draw_texture_slice(
|
||||
video_info,
|
||||
slice_x,
|
||||
y,
|
||||
|
@ -590,22 +590,22 @@ void ozone_draw_fullscreen_thumbnails(
|
|||
/* Set colour values */
|
||||
|
||||
/* > Background */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
background_color,
|
||||
background_alpha * ozone->animations.fullscreen_thumbnail_alpha);
|
||||
|
||||
/* > Separators */
|
||||
memcpy(separator_color, ozone->theme->header_footer_separator, sizeof(separator_color));
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
separator_color, ozone->animations.fullscreen_thumbnail_alpha);
|
||||
|
||||
/* > Thumbnail frame */
|
||||
memcpy(frame_color, ozone->theme->sidebar_background, sizeof(frame_color));
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
frame_color, ozone->animations.fullscreen_thumbnail_alpha);
|
||||
|
||||
/* Darken background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px,
|
||||
|
@ -616,7 +616,7 @@ void ozone_draw_fullscreen_thumbnails(
|
|||
background_color);
|
||||
|
||||
/* Draw full-width separators */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
ozone->dimensions.header_height,
|
||||
|
@ -626,7 +626,7 @@ void ozone_draw_fullscreen_thumbnails(
|
|||
height,
|
||||
separator_color);
|
||||
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
height - ozone->dimensions.footer_height,
|
||||
|
@ -642,7 +642,7 @@ void ozone_draw_fullscreen_thumbnails(
|
|||
if (show_right_thumbnail)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
right_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)right_thumbnail_draw_width) >> 1),
|
||||
|
@ -672,7 +672,7 @@ void ozone_draw_fullscreen_thumbnails(
|
|||
if (show_left_thumbnail)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
left_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)left_thumbnail_draw_width) >> 1),
|
||||
|
|
|
@ -63,9 +63,9 @@ static void ozone_draw_entry_value(ozone_handle_t *ozone,
|
|||
/* check icon */
|
||||
if (entry->checked)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
ozone_draw_icon(video_info, 30 * scale_factor, 30 * scale_factor, ozone->theme->textures[OZONE_THEME_TEXTURE_CHECK], x - 20 * scale_factor, y - 22 * scale_factor, video_info->width, video_info->height, 0, 1, ozone->theme_dynamic.entries_checkmark);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -442,13 +442,13 @@ void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
|
|||
border_start_x = (unsigned) ozone->dimensions.sidebar_width + x_offset + entry_padding;
|
||||
border_start_y = y + scroll_y;
|
||||
|
||||
menu_display_set_alpha(ozone->theme_dynamic.entries_border, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.entries_checkmark, alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.entries_border, alpha);
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.entries_checkmark, alpha);
|
||||
|
||||
/* Borders */
|
||||
menu_display_draw_quad(video_info, border_start_x,
|
||||
gfx_display_draw_quad(video_info, border_start_x,
|
||||
border_start_y, entry_width, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme_dynamic.entries_border);
|
||||
menu_display_draw_quad(video_info, border_start_x,
|
||||
gfx_display_draw_quad(video_info, border_start_x,
|
||||
border_start_y + button_height, entry_width, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme_dynamic.entries_border);
|
||||
|
||||
/* Cursor */
|
||||
|
@ -615,16 +615,16 @@ border_iterate:
|
|||
icon_color = ozone_pure_white;
|
||||
}
|
||||
|
||||
menu_display_set_alpha(icon_color, alpha);
|
||||
gfx_display_set_alpha(icon_color, alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
ozone_draw_icon(video_info, ozone->dimensions.entry_icon_size, ozone->dimensions.entry_icon_size, texture,
|
||||
(unsigned) ozone->dimensions.sidebar_width + x_offset + entry_padding + ozone->dimensions.entry_icon_padding,
|
||||
y + scroll_y + ozone->dimensions.entry_height / 2 - ozone->dimensions.entry_icon_size / 2, video_info->width, video_info->height, 0, 1, icon_color);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
if (icon_color == ozone_pure_white)
|
||||
menu_display_set_alpha(icon_color, 1.0f);
|
||||
gfx_display_set_alpha(icon_color, 1.0f);
|
||||
|
||||
text_offset = 0;
|
||||
}
|
||||
|
@ -684,7 +684,7 @@ static void ozone_draw_no_thumbnail_available(ozone_handle_t *ozone,
|
|||
unsigned icon = OZONE_ENTRIES_ICONS_TEXTURE_CORE_INFO;
|
||||
unsigned icon_size = (unsigned)((float)ozone->dimensions.sidebar_entry_icon_size * 1.5f);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
ozone_draw_icon(video_info,
|
||||
icon_size,
|
||||
icon_size,
|
||||
|
@ -694,7 +694,7 @@ static void ozone_draw_no_thumbnail_available(ozone_handle_t *ozone,
|
|||
video_info->width,
|
||||
video_info->height,
|
||||
0, 1, ozone->theme->entries_icon);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
ozone_draw_text(video_info,
|
||||
ozone,
|
||||
|
@ -744,9 +744,9 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
/* Background */
|
||||
if (!video_info->libretro_running)
|
||||
{
|
||||
menu_display_draw_quad(video_info, x_position, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, (unsigned) ozone->animations.thumbnail_bar_position, ozone->dimensions.sidebar_gradient_height, video_info->width, video_info->height, ozone->theme->sidebar_top_gradient);
|
||||
menu_display_draw_quad(video_info, x_position, ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height, (unsigned) ozone->animations.thumbnail_bar_position, sidebar_height, video_info->width, video_info->height, ozone->theme->sidebar_background);
|
||||
menu_display_draw_quad(video_info, x_position, video_info->height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px, (unsigned) ozone->animations.thumbnail_bar_position, ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->sidebar_bottom_gradient);
|
||||
gfx_display_draw_quad(video_info, x_position, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, (unsigned) ozone->animations.thumbnail_bar_position, ozone->dimensions.sidebar_gradient_height, video_info->width, video_info->height, ozone->theme->sidebar_top_gradient);
|
||||
gfx_display_draw_quad(video_info, x_position, ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height, (unsigned) ozone->animations.thumbnail_bar_position, sidebar_height, video_info->width, video_info->height, ozone->theme->sidebar_background);
|
||||
gfx_display_draw_quad(video_info, x_position, video_info->height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px, (unsigned) ozone->animations.thumbnail_bar_position, ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->sidebar_bottom_gradient);
|
||||
}
|
||||
|
||||
/* Thumbnails */
|
||||
|
@ -876,7 +876,7 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_i
|
|||
/* Content metadata */
|
||||
|
||||
/* Separator */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
x_position + separator_padding, y,
|
||||
sidebar_width - separator_padding*2, ozone->dimensions.spacer_1px,
|
||||
video_info->width, video_info->height,
|
||||
|
|
|
@ -146,16 +146,16 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
|
|||
if (ozone->horizontal_list)
|
||||
horizontal_list_size = (unsigned)ozone->horizontal_list->size;
|
||||
|
||||
menu_display_scissor_begin(video_info, 0, ozone->dimensions.header_height, (unsigned) ozone->dimensions.sidebar_width, video_info->height - ozone->dimensions.header_height - ozone->dimensions.footer_height);
|
||||
gfx_display_scissor_begin(video_info, 0, ozone->dimensions.header_height, (unsigned) ozone->dimensions.sidebar_width, video_info->height - ozone->dimensions.header_height - ozone->dimensions.footer_height);
|
||||
|
||||
/* Background */
|
||||
sidebar_height = video_info->height - ozone->dimensions.header_height - ozone->dimensions.sidebar_gradient_height * 2 - ozone->dimensions.footer_height;
|
||||
|
||||
if (!video_info->libretro_running)
|
||||
{
|
||||
menu_display_draw_quad(video_info, ozone->sidebar_offset, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.sidebar_gradient_height, video_info->width, video_info->height, ozone->theme->sidebar_top_gradient);
|
||||
menu_display_draw_quad(video_info, ozone->sidebar_offset, ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height, (unsigned) ozone->dimensions.sidebar_width, sidebar_height, video_info->width, video_info->height, ozone->theme->sidebar_background);
|
||||
menu_display_draw_quad(video_info, ozone->sidebar_offset, video_info->height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px, (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->sidebar_bottom_gradient);
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.sidebar_gradient_height, video_info->width, video_info->height, ozone->theme->sidebar_top_gradient);
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset, ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height, (unsigned) ozone->dimensions.sidebar_width, sidebar_height, video_info->width, video_info->height, ozone->theme->sidebar_background);
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset, video_info->height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px, (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->sidebar_bottom_gradient);
|
||||
}
|
||||
|
||||
/* Tabs */
|
||||
|
@ -193,7 +193,7 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
|
|||
|
||||
/* Menu tabs */
|
||||
y = ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_padding_vertical;
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
for (i = 0; i < (unsigned)(ozone->system_tab_end+1); i++)
|
||||
{
|
||||
|
@ -220,16 +220,16 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
|
|||
y += ozone->dimensions.sidebar_entry_height + ozone->dimensions.sidebar_entry_padding_vertical;
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
/* Console tabs */
|
||||
if (horizontal_list_size > 0)
|
||||
{
|
||||
menu_display_draw_quad(video_info, ozone->sidebar_offset + ozone->dimensions.sidebar_padding_horizontal, y + ozone->animations.scroll_y_sidebar, entry_width, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset + ozone->dimensions.sidebar_padding_horizontal, y + ozone->animations.scroll_y_sidebar, entry_width, ozone->dimensions.spacer_1px, video_info->width, video_info->height, ozone->theme->entries_border);
|
||||
|
||||
y += ozone->dimensions.sidebar_entry_padding_vertical + ozone->dimensions.spacer_1px;
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
for (i = 0; i < horizontal_list_size; i++)
|
||||
{
|
||||
|
@ -279,13 +279,13 @@ console_iterate:
|
|||
y += ozone->dimensions.sidebar_entry_height + ozone->dimensions.sidebar_entry_padding_vertical;
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
font_driver_flush(video_info->width, video_info->height, ozone->fonts.sidebar, video_info);
|
||||
ozone->raster_blocks.sidebar.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_scissor_end(video_info);
|
||||
gfx_display_scissor_end(video_info);
|
||||
}
|
||||
|
||||
void ozone_go_to_sidebar(ozone_handle_t *ozone, uintptr_t tag)
|
||||
|
|
|
@ -796,7 +796,7 @@ bool ozone_reset_theme_textures(ozone_handle_t *ozone)
|
|||
strlcpy(filename, OZONE_THEME_TEXTURES_FILES[i], sizeof(filename));
|
||||
strlcat(filename, ".png", sizeof(filename));
|
||||
|
||||
if (!menu_display_reset_textures_list(filename, theme_path, &theme->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(filename, theme_path, &theme->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
{
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", theme_path, path_default_slash(), filename);
|
||||
result = false;
|
||||
|
|
|
@ -1253,7 +1253,7 @@ static void rgui_init_particle_effect(rgui_t *rgui)
|
|||
if (!rgui)
|
||||
return;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
switch (rgui->particle_effect)
|
||||
{
|
||||
|
@ -1360,7 +1360,7 @@ static void rgui_render_particle_effect(rgui_t *rgui)
|
|||
if (!rgui || !rgui_frame_buf.data || !settings)
|
||||
return;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
/* Adjust global animation speed */
|
||||
/* > Apply user configured speed multiplier */
|
||||
|
@ -1679,7 +1679,8 @@ static bool request_thumbnail(
|
|||
if (task_push_image_load(thumbnail->path,
|
||||
video_driver_supports_rgba(), 0,
|
||||
(thumbnail_id == MENU_THUMBNAIL_LEFT) ?
|
||||
menu_display_handle_left_thumbnail_upload : menu_display_handle_thumbnail_upload, NULL))
|
||||
menu_display_handle_left_thumbnail_upload
|
||||
: menu_display_handle_thumbnail_upload, NULL))
|
||||
{
|
||||
*queue_size = *queue_size + 1;
|
||||
return true;
|
||||
|
@ -1923,7 +1924,7 @@ static void rgui_render_background(void)
|
|||
|
||||
if (rgui_frame_buf.data && rgui_background_buf.data)
|
||||
{
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
/* Sanity check */
|
||||
if ((fb_width != rgui_frame_buf.width) || (fb_height != rgui_frame_buf.height) || (fb_pitch != rgui_frame_buf.width << 1))
|
||||
|
@ -1947,7 +1948,7 @@ static void rgui_render_fs_thumbnail(rgui_t *rgui)
|
|||
uint16_t *src = NULL;
|
||||
uint16_t *dst = NULL;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
/* Ensure that thumbnail is centred
|
||||
* > Have to perform some stupid tests here because we
|
||||
|
@ -2052,7 +2053,7 @@ static void rgui_render_mini_thumbnail(rgui_t *rgui, thumbnail_t *thumbnail, enu
|
|||
uint16_t *src = NULL;
|
||||
uint16_t *dst = NULL;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
term_width = rgui_term_layout.width * FONT_WIDTH_STRIDE;
|
||||
term_height = rgui_term_layout.height * FONT_HEIGHT_STRIDE;
|
||||
|
@ -2316,7 +2317,7 @@ static void rgui_cache_background(rgui_t *rgui)
|
|||
if (rgui->show_wallpaper)
|
||||
return;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
/* Sanity check */
|
||||
if ((fb_width != rgui_background_buf.width) ||
|
||||
|
@ -2758,7 +2759,7 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message)
|
|||
width = 0;
|
||||
glyphs_width = 0;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
|
@ -2849,7 +2850,7 @@ static void rgui_blit_cursor(rgui_t *rgui)
|
|||
size_t fb_pitch;
|
||||
unsigned fb_width, fb_height;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
if (rgui_frame_buf.data)
|
||||
|
@ -2880,7 +2881,7 @@ int rgui_osk_ptr_at_pos(void *data, int x, int y,
|
|||
unsigned osk_x, osk_y;
|
||||
|
||||
/* Get dimensions/layout */
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
key_text_offset_x = 8;
|
||||
key_text_offset_y = 6;
|
||||
|
@ -2950,7 +2951,7 @@ static void rgui_render_osk(
|
|||
return;
|
||||
|
||||
/* Get dimensions/layout */
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
key_text_offset_x = 8;
|
||||
key_text_offset_y = 6;
|
||||
|
@ -3239,19 +3240,19 @@ static void rgui_render(void *data,
|
|||
|
||||
if (!rgui->force_redraw)
|
||||
{
|
||||
msg_force = menu_display_get_msg_force();
|
||||
msg_force = gfx_display_get_msg_force();
|
||||
|
||||
if (menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL)
|
||||
&& !msg_force)
|
||||
return;
|
||||
|
||||
if (!display_kb && !current_display_cb && (is_idle || !menu_display_get_update_pending()))
|
||||
if (!display_kb && !current_display_cb && (is_idle || !gfx_display_get_update_pending()))
|
||||
return;
|
||||
}
|
||||
|
||||
display_kb = current_display_cb;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
/* If the framebuffer changed size, or the background config has
|
||||
|
@ -3282,7 +3283,7 @@ static void rgui_render(void *data,
|
|||
if (rgui->bg_modified)
|
||||
rgui->bg_modified = false;
|
||||
|
||||
menu_display_set_framebuffer_dirty_flag();
|
||||
gfx_display_set_framebuffer_dirty_flag();
|
||||
gfx_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
||||
|
||||
rgui->force_redraw = false;
|
||||
|
@ -3482,7 +3483,7 @@ static void rgui_render(void *data,
|
|||
/* Show battery indicator, if required */
|
||||
if (settings->bools.menu_battery_level_enable)
|
||||
{
|
||||
menu_display_ctx_powerstate_t powerstate;
|
||||
gfx_display_ctx_powerstate_t powerstate;
|
||||
char percent_str[12];
|
||||
|
||||
percent_str[0] = '\0';
|
||||
|
@ -3835,7 +3836,7 @@ static void rgui_render(void *data,
|
|||
/* Print clock (if required) */
|
||||
if (settings->bools.menu_timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
gfx_display_ctx_datetime_t datetime;
|
||||
char timedate[16];
|
||||
|
||||
timedate[0] = '\0';
|
||||
|
@ -3975,7 +3976,7 @@ static void rgui_update_menu_viewport(rgui_t *rgui)
|
|||
if (!settings)
|
||||
return;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
/* Could do this once in rgui_init(), but seems cleaner to
|
||||
|
@ -4082,7 +4083,7 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui, bool delay_update)
|
|||
size_t fb_pitch;
|
||||
unsigned fb_width, fb_height;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
/* Set frame buffer dimensions */
|
||||
rgui_frame_buf.height = fb_height;
|
||||
|
@ -4176,9 +4177,9 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui, bool delay_update)
|
|||
return false;
|
||||
|
||||
/* Configure 'menu display' settings */
|
||||
menu_display_set_width(rgui_frame_buf.width);
|
||||
menu_display_set_height(rgui_frame_buf.height);
|
||||
menu_display_set_framebuffer_pitch(rgui_frame_buf.width * sizeof(uint16_t));
|
||||
gfx_display_set_width(rgui_frame_buf.width);
|
||||
gfx_display_set_height(rgui_frame_buf.height);
|
||||
gfx_display_set_framebuffer_pitch(rgui_frame_buf.width * sizeof(uint16_t));
|
||||
|
||||
/* Determine terminal layout */
|
||||
rgui_term_layout.start_x = (3 * 5) + 1;
|
||||
|
@ -4280,10 +4281,10 @@ static void *rgui_init(void **userdata, bool video_is_threaded)
|
|||
|
||||
if (rgui->widgets_supported)
|
||||
{
|
||||
if (!menu_display_init_first_driver(video_is_threaded))
|
||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||
goto error;
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4306,7 +4307,7 @@ static void *rgui_init(void **userdata, bool video_is_threaded)
|
|||
|
||||
/* Fixed 'menu display' settings */
|
||||
new_font_height = FONT_HEIGHT_STRIDE * 2;
|
||||
menu_display_set_header_height(new_font_height);
|
||||
gfx_display_set_header_height(new_font_height);
|
||||
|
||||
/* Prepare RGUI colors, to improve performance */
|
||||
rgui->theme_preset_path[0] = '\0';
|
||||
|
@ -4405,13 +4406,13 @@ static void rgui_set_texture(void)
|
|||
unsigned fb_width, fb_height;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!menu_display_get_framebuffer_dirty_flag())
|
||||
if (!gfx_display_get_framebuffer_dirty_flag())
|
||||
return;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
menu_display_unset_framebuffer_dirty_flag();
|
||||
gfx_display_unset_framebuffer_dirty_flag();
|
||||
|
||||
if (settings->uints.menu_rgui_internal_upscale_level == RGUI_UPSCALE_NONE)
|
||||
{
|
||||
|
@ -4868,13 +4869,13 @@ static int rgui_environ(enum menu_environ_cb type,
|
|||
if (!rgui)
|
||||
return -1;
|
||||
rgui->mouse_show = true;
|
||||
menu_display_set_framebuffer_dirty_flag();
|
||||
gfx_display_set_framebuffer_dirty_flag();
|
||||
break;
|
||||
case MENU_ENVIRON_DISABLE_MOUSE_CURSOR:
|
||||
if (!rgui)
|
||||
return -1;
|
||||
rgui->mouse_show = false;
|
||||
menu_display_unset_framebuffer_dirty_flag();
|
||||
gfx_display_unset_framebuffer_dirty_flag();
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
|
@ -4891,7 +4892,7 @@ static int rgui_pointer_up(void *data,
|
|||
menu_entry_t *entry, unsigned action)
|
||||
{
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
bool show_fs_thumbnail = false;
|
||||
|
||||
|
@ -5167,7 +5168,7 @@ static void rgui_context_reset(void *data, bool is_threaded)
|
|||
return;
|
||||
|
||||
if (rgui->widgets_supported)
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
video_driver_monitor_reset();
|
||||
}
|
||||
|
||||
|
@ -5179,7 +5180,7 @@ static void rgui_context_destroy(void *data)
|
|||
return;
|
||||
|
||||
if (rgui->widgets_supported)
|
||||
video_driver_texture_unload(&menu_display_white_texture);
|
||||
video_driver_texture_unload(&gfx_display_white_texture);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -573,7 +573,7 @@ static void stripes_draw_icon(
|
|||
float *color,
|
||||
float shadow_offset)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
|
||||
if (
|
||||
|
@ -605,7 +605,7 @@ static void stripes_draw_icon(
|
|||
|
||||
if (video_info->xmb_shadows_enable)
|
||||
{
|
||||
menu_display_set_alpha(stripes_coord_shadow, color[3] * 0.35f);
|
||||
gfx_display_set_alpha(stripes_coord_shadow, color[3] * 0.35f);
|
||||
|
||||
coords.color = stripes_coord_shadow;
|
||||
draw.x = x + shadow_offset;
|
||||
|
@ -618,7 +618,7 @@ static void stripes_draw_icon(
|
|||
draw.y = draw.y + (icon_size-draw.width)/2;
|
||||
}
|
||||
#endif
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
coords.color = (const float*)color;
|
||||
|
@ -632,7 +632,7 @@ static void stripes_draw_icon(
|
|||
draw.y = draw.y + (icon_size-draw.width)/2;
|
||||
}
|
||||
#endif
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
static void stripes_draw_text(
|
||||
|
@ -662,7 +662,7 @@ static void stripes_draw_text(
|
|||
settings->uints.menu_font_color_green,
|
||||
settings->uints.menu_font_color_blue, a8);
|
||||
|
||||
menu_display_draw_text(font, str, x, y,
|
||||
gfx_display_draw_text(font, str, x, y,
|
||||
width, height, color, text_align, scale_factor,
|
||||
video_info->xmb_shadows_enable,
|
||||
stripes->shadow_offset, false);
|
||||
|
@ -701,7 +701,7 @@ static void stripes_render_keyboard(
|
|||
1.00, 1.00, 1.00, 1.00,
|
||||
};
|
||||
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0, height/2.0, width, height/2.0,
|
||||
width, height,
|
||||
|
@ -721,9 +721,9 @@ static void stripes_render_keyboard(
|
|||
{
|
||||
uintptr_t texture = stripes->textures.list[STRIPES_TEXTURE_KEY_HOVER];
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
menu_display_draw_texture(
|
||||
gfx_display_draw_texture(
|
||||
video_info,
|
||||
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width,
|
||||
height/2.0 + ptr_height*1.5 + line_y,
|
||||
|
@ -732,10 +732,10 @@ static void stripes_render_keyboard(
|
|||
&white[0],
|
||||
texture);
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
menu_display_draw_text(stripes->font, grid[i],
|
||||
gfx_display_draw_text(stripes->font, grid[i],
|
||||
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width + ptr_width/2.0,
|
||||
height/2.0 + ptr_height + line_y + stripes->font->size / 3,
|
||||
width, height, 0xffffffff, TEXT_ALIGN_CENTER, 1.0f,
|
||||
|
@ -818,9 +818,9 @@ static void stripes_render_messagebox_internal(
|
|||
}
|
||||
}
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
menu_display_draw_texture_slice(
|
||||
gfx_display_draw_texture_slice(
|
||||
video_info,
|
||||
x - longest_width/2 - stripes->margins_dialog,
|
||||
y + stripes->margins_slice - stripes->margins_dialog,
|
||||
|
@ -837,7 +837,7 @@ static void stripes_render_messagebox_internal(
|
|||
const char *msg = list->elems[i].data;
|
||||
|
||||
if (msg)
|
||||
menu_display_draw_text(stripes->font, msg,
|
||||
gfx_display_draw_text(stripes->font, msg,
|
||||
x - longest_width/2.0,
|
||||
y + (i+0.75) * line_height,
|
||||
width, height, 0x444444ff, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
|
@ -1064,7 +1064,7 @@ static void stripes_update_thumbnail_image(void *data)
|
|||
if (path_is_valid(stripes->thumbnail_file_path))
|
||||
task_push_image_load(stripes->thumbnail_file_path,
|
||||
supports_rgba, 0,
|
||||
menu_display_handle_thumbnail_upload, NULL);
|
||||
gfx_display_handle_thumbnail_upload, NULL);
|
||||
else
|
||||
video_driver_texture_unload(&stripes->thumbnail);
|
||||
|
||||
|
@ -1077,7 +1077,7 @@ static void stripes_update_thumbnail_image(void *data)
|
|||
if (path_is_valid(stripes->left_thumbnail_file_path))
|
||||
task_push_image_load(stripes->left_thumbnail_file_path,
|
||||
supports_rgba, 0,
|
||||
menu_display_handle_left_thumbnail_upload, NULL);
|
||||
gfx_display_handle_left_thumbnail_upload, NULL);
|
||||
else
|
||||
video_driver_texture_unload(&stripes->left_thumbnail);
|
||||
|
||||
|
@ -1141,7 +1141,7 @@ static void stripes_update_savestate_thumbnail_image(void *data)
|
|||
if (path_is_valid(stripes->savestate_thumbnail_file_path))
|
||||
task_push_image_load(stripes->savestate_thumbnail_file_path,
|
||||
video_driver_supports_rgba(), 0,
|
||||
menu_display_handle_savestate_thumbnail_upload, NULL);
|
||||
gfx_display_handle_savestate_thumbnail_upload, NULL);
|
||||
else
|
||||
video_driver_texture_unload(&stripes->savestate_thumbnail);
|
||||
}
|
||||
|
@ -2514,12 +2514,12 @@ static int stripes_draw_item(
|
|||
TEXT_ALIGN_LEFT,
|
||||
width, height, stripes->font);
|
||||
|
||||
menu_display_set_alpha(color, MIN(node->alpha, stripes->alpha));
|
||||
gfx_display_set_alpha(color, MIN(node->alpha, stripes->alpha));
|
||||
|
||||
if (color[3] != 0)
|
||||
{
|
||||
math_matrix_4x4 mymat_tmp;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
uintptr_t texture = stripes_icon_get_id(stripes, core_node, node,
|
||||
entry->enum_idx, entry_type, (i == current));
|
||||
float x = icon_x;
|
||||
|
@ -2534,7 +2534,7 @@ static int stripes_draw_item(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
stripes_draw_icon(video_info,
|
||||
stripes->icon_size,
|
||||
|
@ -2551,7 +2551,7 @@ static int stripes_draw_item(
|
|||
stripes->shadow_offset);
|
||||
}
|
||||
|
||||
menu_display_set_alpha(color, MIN(node->alpha, stripes->alpha));
|
||||
gfx_display_set_alpha(color, MIN(node->alpha, stripes->alpha));
|
||||
|
||||
if (texture_switch != 0 && color[3] != 0)
|
||||
stripes_draw_icon(video_info,
|
||||
|
@ -2586,7 +2586,7 @@ static void stripes_draw_items(
|
|||
size_t i;
|
||||
unsigned first, last;
|
||||
math_matrix_4x4 mymat;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
stripes_node_t *core_node = NULL;
|
||||
size_t end = 0;
|
||||
const char *thumb_ident = stripes_thumbnails_ident('R');
|
||||
|
@ -2608,7 +2608,7 @@ static void stripes_draw_items(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
|
||||
|
||||
|
@ -2628,7 +2628,7 @@ static void stripes_draw_items(
|
|||
|
||||
stripes_calculate_visible_range(stripes, height, end, current, &first, &last);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
for (i = first; i <= last; i++)
|
||||
{
|
||||
|
@ -2647,7 +2647,7 @@ static void stripes_draw_items(
|
|||
break;
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void stripes_render(void *data,
|
||||
|
@ -2715,7 +2715,7 @@ static void stripes_draw_bg(
|
|||
unsigned width,
|
||||
unsigned height)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
|
||||
float rgb[3];
|
||||
|
@ -2739,13 +2739,13 @@ static void stripes_draw_bg(
|
|||
draw.height = height;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void stripes_draw_dark_layer(
|
||||
|
@ -2754,7 +2754,7 @@ static void stripes_draw_dark_layer(
|
|||
unsigned width,
|
||||
unsigned height)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
float black[16] = {
|
||||
0, 0, 0, 1,
|
||||
|
@ -2763,7 +2763,7 @@ static void stripes_draw_dark_layer(
|
|||
0, 0, 0, 1,
|
||||
};
|
||||
|
||||
menu_display_set_alpha(black, MIN(stripes->alpha, 0.75));
|
||||
gfx_display_set_alpha(black, MIN(stripes->alpha, 0.75));
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
|
@ -2777,20 +2777,20 @@ static void stripes_draw_dark_layer(
|
|||
draw.height = height;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void stripes_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
math_matrix_4x4 mymat;
|
||||
unsigned i;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
char msg[1024];
|
||||
char title_msg[255];
|
||||
char title_truncated[255];
|
||||
|
@ -2824,9 +2824,9 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
stripes->raster_block.carr.coords.vertices = 0;
|
||||
stripes->raster_block2.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_set_alpha(stripes_coord_black, MIN(
|
||||
gfx_display_set_alpha(stripes_coord_black, MIN(
|
||||
(float)video_info->xmb_alpha_factor/100, stripes->alpha));
|
||||
menu_display_set_alpha(stripes_coord_white, stripes->alpha);
|
||||
gfx_display_set_alpha(stripes_coord_white, stripes->alpha);
|
||||
|
||||
stripes_draw_bg(
|
||||
stripes,
|
||||
|
@ -2843,8 +2843,8 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
/* Horizontal stripes */
|
||||
for (i = 0; i <= stripes_list_get_size(stripes, MENU_LIST_HORIZONTAL)
|
||||
|
@ -2864,7 +2864,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
rgb[0], rgb[1], rgb[2], 0.55,
|
||||
};
|
||||
|
||||
menu_display_draw_polygon(
|
||||
gfx_display_draw_polygon(
|
||||
video_info,
|
||||
stripes->categories_x_pos + stack_width,
|
||||
0,
|
||||
|
@ -2877,7 +2877,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
video_info->width, video_info->height,
|
||||
&color[0]);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
stack_width += node->width;
|
||||
}
|
||||
|
@ -2893,11 +2893,11 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
if (!node)
|
||||
continue;
|
||||
|
||||
menu_display_set_alpha(stripes_item_color, MIN(node->alpha, stripes->alpha));
|
||||
gfx_display_set_alpha(stripes_item_color, MIN(node->alpha, stripes->alpha));
|
||||
|
||||
if (stripes_item_color[3] != 0)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
math_matrix_4x4 mymat;
|
||||
uintptr_t texture = node->icon;
|
||||
float x = stripes->categories_x_pos + stack_width + node->x + node->width / 2.0
|
||||
|
@ -2913,7 +2913,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
stripes_draw_icon(video_info,
|
||||
stripes->icon_size,
|
||||
|
@ -2933,7 +2933,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
stack_width += node->width;
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
/* Vertical icons */
|
||||
// if (stripes)
|
||||
|
@ -3001,8 +3001,8 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
menu_input_pointer_t pointer;
|
||||
menu_input_get_pointer_state(&pointer);
|
||||
|
||||
menu_display_set_alpha(stripes_coord_white, MIN(stripes->alpha, 1.00f));
|
||||
menu_display_draw_cursor(
|
||||
gfx_display_set_alpha(stripes_coord_white, MIN(stripes->alpha, 1.00f));
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
&stripes_coord_white[0],
|
||||
stripes->cursor_size,
|
||||
|
@ -3013,7 +3013,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||
height);
|
||||
}
|
||||
|
||||
menu_display_unset_viewport(video_info->width, video_info->height);
|
||||
gfx_display_unset_viewport(video_info->width, video_info->height);
|
||||
}
|
||||
|
||||
static void stripes_layout_ps3(stripes_handle_t *stripes, int width, int height)
|
||||
|
@ -3099,7 +3099,7 @@ static void stripes_layout_ps3(stripes_handle_t *stripes, int width, int height)
|
|||
RARCH_LOG("[XMB] icon size: %.2f\n", stripes->icon_size);
|
||||
#endif
|
||||
|
||||
menu_display_set_header_height(new_header_height);
|
||||
gfx_display_set_header_height(new_header_height);
|
||||
}
|
||||
|
||||
static void stripes_layout_psp(stripes_handle_t *stripes, int width)
|
||||
|
@ -3169,7 +3169,7 @@ static void stripes_layout_psp(stripes_handle_t *stripes, int width)
|
|||
RARCH_LOG("[XMB] icon size: %.2f\n", stripes->icon_size);
|
||||
#endif
|
||||
|
||||
menu_display_set_header_height(new_header_height);
|
||||
gfx_display_set_header_height(new_header_height);
|
||||
}
|
||||
|
||||
static void stripes_layout(stripes_handle_t *stripes)
|
||||
|
@ -3280,7 +3280,7 @@ static void *stripes_init(void **userdata, bool video_is_threaded)
|
|||
if (!menu)
|
||||
goto error;
|
||||
|
||||
if (!menu_display_init_first_driver(video_is_threaded))
|
||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||
goto error;
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
@ -3338,10 +3338,10 @@ static void *stripes_init(void **userdata, bool video_is_threaded)
|
|||
* for XMB, we should refactor this dependency
|
||||
* away. */
|
||||
|
||||
menu_display_set_width(width);
|
||||
menu_display_set_height(height);
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
|
||||
stripes->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
|
||||
|
@ -3417,7 +3417,7 @@ static void stripes_context_bg_destroy(stripes_handle_t *stripes)
|
|||
if (!stripes)
|
||||
return;
|
||||
video_driver_texture_unload(&stripes->textures.bg);
|
||||
video_driver_texture_unload(&menu_display_white_texture);
|
||||
video_driver_texture_unload(&gfx_display_white_texture);
|
||||
}
|
||||
|
||||
static bool stripes_load_image(void *userdata, void *data, enum menu_image_type type)
|
||||
|
@ -3437,7 +3437,7 @@ static bool stripes_load_image(void *userdata, void *data, enum menu_image_type
|
|||
video_driver_texture_load(data,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||
&stripes->textures.bg);
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
break;
|
||||
case MENU_IMAGE_THUMBNAIL:
|
||||
{
|
||||
|
@ -3606,9 +3606,9 @@ static void stripes_context_reset_textures(
|
|||
unsigned i;
|
||||
|
||||
for (i = 0; i < STRIPES_TEXTURE_LAST; i++)
|
||||
menu_display_reset_textures_list(stripes_texture_path(i), iconpath, &stripes->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
gfx_display_reset_textures_list(stripes_texture_path(i), iconpath, &stripes->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
|
||||
stripes->main_menu_node.icon = stripes->textures.list[STRIPES_TEXTURE_MAIN_MENU];
|
||||
stripes->main_menu_node.alpha = stripes->categories_active_alpha;
|
||||
|
@ -3704,10 +3704,10 @@ static void stripes_context_reset(void *data, bool is_threaded)
|
|||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||
|
||||
stripes_layout(stripes);
|
||||
stripes->font = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
stripes->font = gfx_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
stripes->font_size,
|
||||
is_threaded);
|
||||
stripes->font2 = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
stripes->font2 = gfx_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
stripes->font2_size,
|
||||
is_threaded);
|
||||
stripes_context_reset_textures(stripes, iconpath);
|
||||
|
@ -4030,8 +4030,8 @@ static void stripes_context_destroy(void *data)
|
|||
stripes_context_destroy_horizontal_list(stripes);
|
||||
stripes_context_bg_destroy(stripes);
|
||||
|
||||
menu_display_font_free(stripes->font);
|
||||
menu_display_font_free(stripes->font2);
|
||||
gfx_display_font_free(stripes->font);
|
||||
gfx_display_font_free(stripes->font2);
|
||||
|
||||
stripes->font = NULL;
|
||||
stripes->font2 = NULL;
|
||||
|
@ -4347,7 +4347,7 @@ static int stripes_pointer_up(void *userdata,
|
|||
case MENU_INPUT_GESTURE_SHORT_PRESS:
|
||||
{
|
||||
/* Normal pointer input */
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
|
||||
if (y < header_height)
|
||||
return (unsigned)menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
|
|
|
@ -702,7 +702,7 @@ static void xmb_draw_icon(
|
|||
float *color,
|
||||
float shadow_offset)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
|
||||
if (
|
||||
|
@ -729,12 +729,12 @@ static void xmb_draw_icon(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
if (video_info->xmb_shadows_enable)
|
||||
{
|
||||
menu_display_set_alpha(coord_shadow, color[3] * 0.35f);
|
||||
gfx_display_set_alpha(coord_shadow, color[3] * 0.35f);
|
||||
|
||||
coords.color = coord_shadow;
|
||||
draw.x = x + shadow_offset;
|
||||
|
@ -747,7 +747,7 @@ static void xmb_draw_icon(
|
|||
draw.y = draw.y + (icon_size-draw.width)/2;
|
||||
}
|
||||
#endif
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
coords.color = (const float*)color;
|
||||
|
@ -761,7 +761,7 @@ static void xmb_draw_icon(
|
|||
draw.y = draw.y + (icon_size-draw.width)/2;
|
||||
}
|
||||
#endif
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
static void xmb_draw_text(
|
||||
|
@ -791,7 +791,7 @@ static void xmb_draw_text(
|
|||
settings->uints.menu_font_color_green,
|
||||
settings->uints.menu_font_color_blue, a8);
|
||||
|
||||
menu_display_draw_text(font, str, x, y,
|
||||
gfx_display_draw_text(font, str, x, y,
|
||||
width, height, color, text_align, scale_factor,
|
||||
video_info->xmb_shadows_enable,
|
||||
xmb->shadow_offset, false);
|
||||
|
@ -852,9 +852,9 @@ static void xmb_render_messagebox_internal(
|
|||
}
|
||||
}
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
menu_display_draw_texture_slice(
|
||||
gfx_display_draw_texture_slice(
|
||||
video_info,
|
||||
x - longest_width/2 - xmb->margins_dialog,
|
||||
y + xmb->margins_slice - xmb->margins_dialog,
|
||||
|
@ -871,14 +871,14 @@ static void xmb_render_messagebox_internal(
|
|||
const char *msg = list->elems[i].data;
|
||||
|
||||
if (msg)
|
||||
menu_display_draw_text(xmb->font, msg,
|
||||
gfx_display_draw_text(xmb->font, msg,
|
||||
x - longest_width/2.0,
|
||||
y + (i+0.75) * line_height,
|
||||
width, height, 0x444444ff, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
}
|
||||
|
||||
if (menu_input_dialog_get_display_kb())
|
||||
menu_display_draw_keyboard(
|
||||
gfx_display_draw_keyboard(
|
||||
xmb->textures.list[XMB_TEXTURE_KEY_HOVER],
|
||||
xmb->font,
|
||||
video_info,
|
||||
|
@ -3175,7 +3175,7 @@ static int xmb_draw_item(
|
|||
TEXT_ALIGN_LEFT,
|
||||
width, height, xmb->font);
|
||||
|
||||
menu_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
|
||||
gfx_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
|
||||
|
||||
if (
|
||||
(!xmb->assets_missing) &&
|
||||
|
@ -3187,7 +3187,7 @@ static int xmb_draw_item(
|
|||
)
|
||||
{
|
||||
math_matrix_4x4 mymat_tmp;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
uintptr_t texture = xmb_icon_get_id(xmb, core_node, node,
|
||||
entry->enum_idx, entry_type, (i == current), entry->checked);
|
||||
float x = icon_x;
|
||||
|
@ -3202,7 +3202,7 @@ static int xmb_draw_item(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
xmb_draw_icon(video_info,
|
||||
xmb->icon_size,
|
||||
|
@ -3219,7 +3219,7 @@ static int xmb_draw_item(
|
|||
xmb->shadow_offset);
|
||||
}
|
||||
|
||||
menu_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
|
||||
gfx_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
|
||||
|
||||
if (texture_switch != 0 && color[3] != 0 && !xmb->assets_missing)
|
||||
xmb_draw_icon(video_info,
|
||||
|
@ -3250,7 +3250,7 @@ static void xmb_draw_items(
|
|||
size_t i;
|
||||
unsigned first, last;
|
||||
math_matrix_4x4 mymat;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
xmb_node_t *core_node = NULL;
|
||||
size_t end = 0;
|
||||
|
||||
|
@ -3270,7 +3270,7 @@ static void xmb_draw_items(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
|
||||
|
||||
|
@ -3290,7 +3290,7 @@ static void xmb_draw_items(
|
|||
|
||||
xmb_calculate_visible_range(xmb, height, end, (unsigned)current, &first, &last);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
for (i = first; i <= last; i++)
|
||||
{
|
||||
|
@ -3311,7 +3311,7 @@ static void xmb_draw_items(
|
|||
break;
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void xmb_context_reset_internal(xmb_handle_t *xmb,
|
||||
|
@ -3352,8 +3352,8 @@ static void xmb_render(void *data,
|
|||
/* This must be set every frame when using a pointer,
|
||||
* otherwise touchscreen input breaks when changing
|
||||
* orientation */
|
||||
menu_display_set_width(width);
|
||||
menu_display_set_height(height);
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
/* When determining current pointer selection, we
|
||||
* only track pointer movements between the left
|
||||
|
@ -3477,7 +3477,7 @@ static void xmb_draw_bg(
|
|||
float *coord_black,
|
||||
float *coord_white)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
|
||||
bool running = video_info->libretro_running;
|
||||
|
||||
|
@ -3490,12 +3490,12 @@ static void xmb_draw_bg(
|
|||
draw.vertex = NULL;
|
||||
draw.tex_coord = NULL;
|
||||
draw.vertex_count = 4;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline.active = xmb_shader_pipeline_active(video_info);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
gfx_display_blend_begin(video_info);
|
||||
gfx_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
if (video_info->menu_shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER
|
||||
|
@ -3505,11 +3505,11 @@ static void xmb_draw_bg(
|
|||
draw.color = xmb_gradient_ident(video_info);
|
||||
|
||||
if (running)
|
||||
menu_display_set_alpha(draw.color, coord_black[3]);
|
||||
gfx_display_set_alpha(draw.color, coord_black[3]);
|
||||
else
|
||||
menu_display_set_alpha(draw.color, coord_white[3]);
|
||||
gfx_display_set_alpha(draw.color, coord_white[3]);
|
||||
|
||||
menu_display_draw_gradient(&draw, video_info);
|
||||
gfx_display_draw_gradient(&draw, video_info);
|
||||
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_2;
|
||||
|
||||
|
@ -3534,7 +3534,7 @@ static void xmb_draw_bg(
|
|||
break;
|
||||
}
|
||||
|
||||
menu_display_draw_pipeline(&draw, video_info);
|
||||
gfx_display_draw_pipeline(&draw, video_info);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -3545,19 +3545,19 @@ static void xmb_draw_bg(
|
|||
draw.color = xmb_gradient_ident(video_info);
|
||||
|
||||
if (running)
|
||||
menu_display_set_alpha(draw.color, coord_black[3]);
|
||||
gfx_display_set_alpha(draw.color, coord_black[3]);
|
||||
else
|
||||
menu_display_set_alpha(draw.color, coord_white[3]);
|
||||
gfx_display_set_alpha(draw.color, coord_white[3]);
|
||||
|
||||
if (video_info->xmb_color_theme != XMB_THEME_WALLPAPER)
|
||||
menu_display_draw_gradient(&draw, video_info);
|
||||
gfx_display_draw_gradient(&draw, video_info);
|
||||
|
||||
{
|
||||
float override_opacity = video_info->menu_wallpaper_opacity;
|
||||
bool add_opacity = false;
|
||||
|
||||
draw.texture = texture;
|
||||
menu_display_set_alpha(draw.color, coord_white[3]);
|
||||
gfx_display_set_alpha(draw.color, coord_white[3]);
|
||||
|
||||
if (draw.texture)
|
||||
draw.color = &coord_white[0];
|
||||
|
@ -3565,12 +3565,12 @@ static void xmb_draw_bg(
|
|||
if (running || video_info->xmb_color_theme == XMB_THEME_WALLPAPER)
|
||||
add_opacity = true;
|
||||
|
||||
menu_display_draw_bg(&draw, video_info, add_opacity, override_opacity);
|
||||
gfx_display_draw_bg(&draw, video_info, add_opacity, override_opacity);
|
||||
}
|
||||
}
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
static void xmb_draw_dark_layer(
|
||||
|
@ -3579,7 +3579,7 @@ static void xmb_draw_dark_layer(
|
|||
unsigned width,
|
||||
unsigned height)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
float black[16] = {
|
||||
0, 0, 0, 1,
|
||||
|
@ -3588,7 +3588,7 @@ static void xmb_draw_dark_layer(
|
|||
0, 0, 0, 1,
|
||||
};
|
||||
|
||||
menu_display_set_alpha(black, MIN(xmb->alpha, 0.75));
|
||||
gfx_display_set_alpha(black, MIN(xmb->alpha, 0.75));
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
|
@ -3602,13 +3602,13 @@ static void xmb_draw_dark_layer(
|
|||
draw.height = height;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
/* Disables the fullscreen thumbnail view, with
|
||||
|
@ -3930,7 +3930,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
/* Set colour values */
|
||||
|
||||
/* > Background */
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
background_color, background_alpha * xmb->fullscreen_thumbnail_alpha);
|
||||
|
||||
/* > Header background */
|
||||
|
@ -3957,11 +3957,11 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
memcpy(frame_color + 8, mean_menu_color, sizeof(mean_menu_color));
|
||||
memcpy(frame_color + 12, mean_menu_color, sizeof(mean_menu_color));
|
||||
}
|
||||
menu_display_set_alpha(
|
||||
gfx_display_set_alpha(
|
||||
frame_color, xmb->fullscreen_thumbnail_alpha);
|
||||
|
||||
/* Darken background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
0,
|
||||
|
@ -3975,7 +3975,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
if (show_header)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0,
|
||||
0,
|
||||
|
@ -4015,7 +4015,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
|
||||
title_x += (int)ticker_x_offset;
|
||||
|
||||
menu_display_draw_text(
|
||||
gfx_display_draw_text(
|
||||
xmb->font,
|
||||
title_buf,
|
||||
title_x,
|
||||
|
@ -4034,7 +4034,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
* as-is, horizontally centred, and if the ends get
|
||||
* clipped than so be it... */
|
||||
else
|
||||
menu_display_draw_text(
|
||||
gfx_display_draw_text(
|
||||
xmb->font,
|
||||
xmb->fullscreen_thumbnail_label,
|
||||
view_width >> 1,
|
||||
|
@ -4065,7 +4065,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
if (show_right_thumbnail)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
right_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)right_thumbnail_draw_width) >> 1),
|
||||
|
@ -4095,7 +4095,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
if (show_left_thumbnail)
|
||||
{
|
||||
/* Background */
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
left_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)left_thumbnail_draw_width) >> 1),
|
||||
|
@ -4135,7 +4135,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
{
|
||||
math_matrix_4x4 mymat;
|
||||
unsigned i;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
char msg[1024];
|
||||
char title_msg[255];
|
||||
char title_truncated[255];
|
||||
|
@ -4203,9 +4203,9 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
xmb->raster_block.carr.coords.vertices = 0;
|
||||
xmb->raster_block2.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_set_alpha(coord_black, MIN(
|
||||
gfx_display_set_alpha(coord_black, MIN(
|
||||
(float)video_info->xmb_alpha_factor/100, xmb->alpha));
|
||||
menu_display_set_alpha(coord_white, xmb->alpha);
|
||||
gfx_display_set_alpha(coord_white, xmb->alpha);
|
||||
|
||||
xmb_draw_bg(
|
||||
xmb,
|
||||
|
@ -4259,7 +4259,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
/**************************/
|
||||
/* Draw thumbnails: START */
|
||||
|
@ -4452,11 +4452,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
/**************************/
|
||||
|
||||
/* Clock image */
|
||||
menu_display_set_alpha(item_color, MIN(xmb->alpha, 1.00f));
|
||||
gfx_display_set_alpha(item_color, MIN(xmb->alpha, 1.00f));
|
||||
|
||||
if (video_info->battery_level_enable)
|
||||
{
|
||||
menu_display_ctx_powerstate_t powerstate;
|
||||
gfx_display_ctx_powerstate_t powerstate;
|
||||
char msg[12];
|
||||
|
||||
msg[0] = '\0';
|
||||
|
@ -4473,7 +4473,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
|
||||
if (coord_white[3] != 0 && !xmb->assets_missing)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
xmb_draw_icon(video_info,
|
||||
xmb->icon_size,
|
||||
&mymat,
|
||||
|
@ -4494,7 +4494,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
1,
|
||||
&item_color[0],
|
||||
xmb->shadow_offset);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
percent_width = (unsigned)
|
||||
|
@ -4510,7 +4510,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
|
||||
if (video_info->timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
gfx_display_ctx_datetime_t datetime;
|
||||
char timedate[255];
|
||||
int x_pos = 0;
|
||||
|
||||
|
@ -4521,7 +4521,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
if (percent_width)
|
||||
x_pos = percent_width + (xmb->icon_size / 2.5);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
xmb_draw_icon(video_info,
|
||||
xmb->icon_size,
|
||||
&mymat,
|
||||
|
@ -4535,7 +4535,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
1,
|
||||
&item_color[0],
|
||||
xmb->shadow_offset);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
timedate[0] = '\0';
|
||||
|
@ -4556,12 +4556,12 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
}
|
||||
|
||||
/* Arrow image */
|
||||
menu_display_set_alpha(item_color,
|
||||
gfx_display_set_alpha(item_color,
|
||||
MIN(xmb->textures_arrow_alpha, xmb->alpha));
|
||||
|
||||
if (coord_white[3] != 0 && !xmb->assets_missing)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
xmb_draw_icon(video_info,
|
||||
xmb->icon_size,
|
||||
&mymat,
|
||||
|
@ -4579,13 +4579,13 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
1,
|
||||
&item_color[0],
|
||||
xmb->shadow_offset);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
/* Horizontal tab icons */
|
||||
if (!xmb->assets_missing)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
for (i = 0; i <= xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL)
|
||||
+ xmb->system_tab_end; i++)
|
||||
|
@ -4595,11 +4595,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
if (!node)
|
||||
continue;
|
||||
|
||||
menu_display_set_alpha(item_color, MIN(node->alpha, xmb->alpha));
|
||||
gfx_display_set_alpha(item_color, MIN(node->alpha, xmb->alpha));
|
||||
|
||||
if (item_color[3] != 0)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
math_matrix_4x4 mymat;
|
||||
uintptr_t texture = node->icon;
|
||||
float x = xmb->x + xmb->categories_x_pos +
|
||||
|
@ -4628,7 +4628,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
if (fade_alpha <= 0.0f)
|
||||
continue;
|
||||
|
||||
menu_display_set_alpha(item_color, fade_alpha);
|
||||
gfx_display_set_alpha(item_color, fade_alpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4639,7 +4639,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
xmb_draw_icon(video_info,
|
||||
xmb->icon_size,
|
||||
|
@ -4657,7 +4657,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
}
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
/* Vertical icons */
|
||||
|
@ -4728,8 +4728,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
menu_input_pointer_t pointer;
|
||||
menu_input_get_pointer_state(&pointer);
|
||||
|
||||
menu_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f));
|
||||
menu_display_draw_cursor(
|
||||
gfx_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f));
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
&coord_white[0],
|
||||
xmb->cursor_size,
|
||||
|
@ -4740,7 +4740,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
height);
|
||||
}
|
||||
|
||||
menu_display_unset_viewport(video_info->width, video_info->height);
|
||||
gfx_display_unset_viewport(video_info->width, video_info->height);
|
||||
}
|
||||
|
||||
static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
||||
|
@ -4795,7 +4795,7 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
|||
xmb->icon_size = 128.0 * scale_factor;
|
||||
xmb->font_size = new_font_size;
|
||||
|
||||
menu_display_set_header_height(new_header_height);
|
||||
gfx_display_set_header_height(new_header_height);
|
||||
}
|
||||
|
||||
static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
||||
|
@ -4848,7 +4848,7 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
|||
xmb->icon_size = 128.0 * scale_factor;
|
||||
xmb->font_size = new_font_size;
|
||||
|
||||
menu_display_set_header_height(new_header_height);
|
||||
gfx_display_set_header_height(new_header_height);
|
||||
}
|
||||
|
||||
static void xmb_layout(xmb_handle_t *xmb)
|
||||
|
@ -4968,7 +4968,7 @@ static void xmb_init_ribbon(xmb_handle_t * xmb)
|
|||
video_coords_t coords;
|
||||
unsigned r, c, col;
|
||||
unsigned i = 0;
|
||||
video_coord_array_t *ca = menu_display_get_coords_array();
|
||||
video_coord_array_t *ca = gfx_display_get_coords_array();
|
||||
unsigned vertices_total = XMB_RIBBON_VERTICES;
|
||||
float *dummy = (float*)calloc(4 * vertices_total, sizeof(float));
|
||||
float *ribbon_verts = (float*)calloc(2 * vertices_total, sizeof(float));
|
||||
|
@ -5037,7 +5037,7 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
|||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
if (!menu_display_init_first_driver(video_is_threaded))
|
||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||
{
|
||||
free(menu);
|
||||
return NULL;
|
||||
|
@ -5101,10 +5101,10 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
|||
* for XMB, we should refactor this dependency
|
||||
* away. */
|
||||
|
||||
menu_display_set_width(width);
|
||||
menu_display_set_height(height);
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
|
||||
xmb->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
|
||||
|
@ -5185,7 +5185,7 @@ static void xmb_context_bg_destroy(xmb_handle_t *xmb)
|
|||
if (!xmb)
|
||||
return;
|
||||
video_driver_texture_unload(&xmb->textures.bg);
|
||||
video_driver_texture_unload(&menu_display_white_texture);
|
||||
video_driver_texture_unload(&gfx_display_white_texture);
|
||||
}
|
||||
|
||||
static bool xmb_load_image(void *userdata, void *data, enum menu_image_type type)
|
||||
|
@ -5203,7 +5203,7 @@ static bool xmb_load_image(void *userdata, void *data, enum menu_image_type type
|
|||
video_driver_texture_load(data,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||
&xmb->textures.bg);
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
break;
|
||||
case MENU_IMAGE_NONE:
|
||||
default:
|
||||
|
@ -5474,18 +5474,18 @@ static void xmb_context_reset_textures(
|
|||
settings_t *settings = config_get_ptr();
|
||||
xmb->assets_missing = false;
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
gfx_display_allocate_white_texture();
|
||||
|
||||
for (i = 0; i < XMB_TEXTURE_LAST; i++)
|
||||
{
|
||||
if (!menu_display_reset_textures_list(xmb_texture_path(i), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(xmb_texture_path(i), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
{
|
||||
RARCH_WARN("[XMB] Asset missing: %s%s\n", iconpath, xmb_texture_path(i));
|
||||
/* New extra battery icons could be missing */
|
||||
if (i == XMB_TEXTURE_BATTERY_80 || i == XMB_TEXTURE_BATTERY_60 || i == XMB_TEXTURE_BATTERY_40 || i == XMB_TEXTURE_BATTERY_20)
|
||||
{
|
||||
if ( /* If there are no extra battery icons revert to the old behaviour */
|
||||
!menu_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_BATTERY_FULL), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
!gfx_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_BATTERY_FULL), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
&& !(settings->uints.menu_xmb_theme == XMB_ICON_THEME_CUSTOM)
|
||||
)
|
||||
goto error;
|
||||
|
@ -5496,7 +5496,7 @@ static void xmb_context_reset_textures(
|
|||
{
|
||||
/* OSD Warning only if subsetting icon is missing */
|
||||
if (
|
||||
!menu_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_SUBSETTING), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
!gfx_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_SUBSETTING), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
&& !(settings->uints.menu_xmb_theme == XMB_ICON_THEME_CUSTOM)
|
||||
)
|
||||
{
|
||||
|
@ -5652,18 +5652,18 @@ static void xmb_context_reset_internal(xmb_handle_t *xmb,
|
|||
xmb_layout(xmb);
|
||||
if (xmb->font)
|
||||
{
|
||||
menu_display_font_free(xmb->font);
|
||||
gfx_display_font_free(xmb->font);
|
||||
xmb->font = NULL;
|
||||
}
|
||||
if (xmb->font2)
|
||||
{
|
||||
menu_display_font_free(xmb->font2);
|
||||
gfx_display_font_free(xmb->font2);
|
||||
xmb->font2 = NULL;
|
||||
}
|
||||
xmb->font = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
xmb->font = gfx_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
xmb->font_size,
|
||||
is_threaded);
|
||||
xmb->font2 = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
xmb->font2 = gfx_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
xmb->font2_size,
|
||||
is_threaded);
|
||||
|
||||
|
@ -6009,8 +6009,8 @@ static void xmb_context_destroy(void *data)
|
|||
xmb_context_destroy_horizontal_list(xmb);
|
||||
xmb_context_bg_destroy(xmb);
|
||||
|
||||
menu_display_font_free(xmb->font);
|
||||
menu_display_font_free(xmb->font2);
|
||||
gfx_display_font_free(xmb->font);
|
||||
gfx_display_font_free(xmb->font2);
|
||||
|
||||
xmb->font = NULL;
|
||||
xmb->font2 = NULL;
|
||||
|
@ -6647,7 +6647,7 @@ menu_ctx_driver_t menu_ctx_xmb = {
|
|||
xmb_set_thumbnail_system,
|
||||
xmb_get_thumbnail_system,
|
||||
xmb_set_thumbnail_content,
|
||||
menu_display_osk_ptr_at_pos,
|
||||
gfx_display_osk_ptr_at_pos,
|
||||
xmb_update_savestate_thumbnail_path,
|
||||
xmb_update_savestate_thumbnail_image,
|
||||
NULL, /* pointer_down */
|
||||
|
|
|
@ -413,7 +413,7 @@ static void xui_frame(void *data, video_frame_info_t *video_info)
|
|||
if (!d3d)
|
||||
return;
|
||||
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
gfx_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
app.RunFrame();
|
||||
XuiTimersRun();
|
||||
|
@ -444,7 +444,7 @@ static void xui_frame(void *data, video_frame_info_t *video_info)
|
|||
|
||||
XuiRenderEnd( app.GetDC() );
|
||||
|
||||
menu_display_unset_viewport(video_info->width, video_info->height);
|
||||
gfx_display_unset_viewport(video_info->width, video_info->height);
|
||||
}
|
||||
|
||||
static void blit_line(int x, int y, const char *message, bool green)
|
||||
|
@ -529,10 +529,10 @@ static void xui_render(void *data,
|
|||
const char *dir = NULL;
|
||||
const char *label = NULL;
|
||||
unsigned menu_type = 0;
|
||||
bool msg_force = menu_display_get_msg_force();
|
||||
bool msg_force = gfx_display_get_msg_force();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
||||
if (
|
||||
|
@ -541,7 +541,7 @@ static void xui_render(void *data,
|
|||
)
|
||||
return;
|
||||
|
||||
menu_display_unset_framebuffer_dirty_flag();
|
||||
gfx_display_unset_framebuffer_dirty_flag();
|
||||
gfx_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
||||
|
||||
xui_render_background();
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
|
@ -27,40 +27,24 @@
|
|||
#include "../../gfx/drivers/ctr_gu.h"
|
||||
#include "../../ctr/gpu_old.h"
|
||||
|
||||
static const float *menu_display_ctr_get_default_vertices(void)
|
||||
static const float *gfx_display_ctr_get_default_vertices(void) { return NULL; }
|
||||
|
||||
static const float *gfx_display_ctr_get_default_tex_coords(void) { return NULL; }
|
||||
|
||||
static void *gfx_display_ctr_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const float *menu_display_ctr_get_default_tex_coords(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
static void gfx_display_ctr_blend_begin(video_frame_info_t *video_info) { }
|
||||
static void gfx_display_ctr_blend_end(video_frame_info_t *video_info) { }
|
||||
static void gfx_display_ctr_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info) { }
|
||||
|
||||
static void *menu_display_ctr_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_ctr_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_ctr_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_ctr_viewport(menu_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_ctr_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_ctr_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
int colorR, colorG, colorB, colorA;
|
||||
struct ctr_texture *texture = NULL;
|
||||
const float *color = NULL;
|
||||
ctr_video_t *ctr = (ctr_video_t*)video_info->userdata;
|
||||
|
@ -100,11 +84,11 @@ static void menu_display_ctr_draw(menu_display_ctx_draw_t *draw,
|
|||
CTRGU_ATTRIBFMT(GPU_SHORT, 4) << 4,
|
||||
sizeof(ctr_vertex_t));
|
||||
|
||||
color = draw->coords->color;
|
||||
int colorR = (int)((*color++)*255.f);
|
||||
int colorG = (int)((*color++)*255.f);
|
||||
int colorB = (int)((*color++)*255.f);
|
||||
int colorA = (int)((*color++)*255.f);
|
||||
color = draw->coords->color;
|
||||
colorR = (int)((*color++)*255.f);
|
||||
colorG = (int)((*color++)*255.f);
|
||||
colorB = (int)((*color++)*255.f);
|
||||
colorA = (int)((*color++)*255.f);
|
||||
|
||||
GPU_SetTexEnv(0,
|
||||
GPU_TEVSOURCES(GPU_TEXTURE0, GPU_CONSTANT, 0),
|
||||
|
@ -155,19 +139,19 @@ static void menu_display_ctr_draw(menu_display_ctx_draw_t *draw,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_ctr_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_ctr_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_ctr_restore_clear_color(void)
|
||||
static void gfx_display_ctr_restore_clear_color(void)
|
||||
{
|
||||
#if 0
|
||||
ctr_set_clear_color(RGBA8(0x00, 0x00, 0x00, 0xFF));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_ctr_clear_color(menu_display_ctx_clearcolor_t *clearcolor, video_frame_info_t *video_info)
|
||||
static void gfx_display_ctr_clear_color(gfx_display_ctx_clearcolor_t *clearcolor, video_frame_info_t *video_info)
|
||||
{
|
||||
if (!clearcolor)
|
||||
return;
|
||||
|
@ -180,7 +164,7 @@ static void menu_display_ctr_clear_color(menu_display_ctx_clearcolor_t *clearcol
|
|||
#endif
|
||||
}
|
||||
|
||||
static bool menu_display_ctr_font_init_first(
|
||||
static bool gfx_display_ctr_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -193,19 +177,19 @@ static bool menu_display_ctr_font_init_first(
|
|||
return *handle;
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_ctr = {
|
||||
menu_display_ctr_draw,
|
||||
menu_display_ctr_draw_pipeline,
|
||||
menu_display_ctr_viewport,
|
||||
menu_display_ctr_blend_begin,
|
||||
menu_display_ctr_blend_end,
|
||||
menu_display_ctr_restore_clear_color,
|
||||
menu_display_ctr_clear_color,
|
||||
menu_display_ctr_get_default_mvp,
|
||||
menu_display_ctr_get_default_vertices,
|
||||
menu_display_ctr_get_default_tex_coords,
|
||||
menu_display_ctr_font_init_first,
|
||||
MENU_VIDEO_DRIVER_CTR,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_ctr = {
|
||||
gfx_display_ctr_draw,
|
||||
gfx_display_ctr_draw_pipeline,
|
||||
gfx_display_ctr_viewport,
|
||||
gfx_display_ctr_blend_begin,
|
||||
gfx_display_ctr_blend_end,
|
||||
gfx_display_ctr_restore_clear_color,
|
||||
gfx_display_ctr_clear_color,
|
||||
gfx_display_ctr_get_default_mvp,
|
||||
gfx_display_ctr_get_default_vertices,
|
||||
gfx_display_ctr_get_default_tex_coords,
|
||||
gfx_display_ctr_font_init_first,
|
||||
GFX_VIDEO_DRIVER_CTR,
|
||||
"ctr",
|
||||
true,
|
||||
NULL,
|
|
@ -22,47 +22,47 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/common/d3d10_common.h"
|
||||
|
||||
static const float* menu_display_d3d10_get_default_vertices(void)
|
||||
static const float* gfx_display_d3d10_get_default_vertices(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const float* menu_display_d3d10_get_default_tex_coords(void)
|
||||
static const float* gfx_display_d3d10_get_default_tex_coords(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void* menu_display_d3d10_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void* gfx_display_d3d10_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_d3d10_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d10_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)video_info->userdata;
|
||||
D3D10SetBlendState(d3d10->device,
|
||||
d3d10->blend_enable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
static void menu_display_d3d10_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d10_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)video_info->userdata;
|
||||
D3D10SetBlendState(d3d10->device,
|
||||
d3d10->blend_disable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
static void menu_display_d3d10_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d10_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_d3d10_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d10_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
int vertex_count;
|
||||
|
@ -184,7 +184,7 @@ static void menu_display_d3d10_draw(menu_display_ctx_draw_t *draw,
|
|||
return;
|
||||
}
|
||||
|
||||
static void menu_display_d3d10_draw_pipeline(menu_display_ctx_draw_t* draw,
|
||||
static void gfx_display_d3d10_draw_pipeline(gfx_display_ctx_draw_t* draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)video_info->userdata;
|
||||
|
@ -197,7 +197,7 @@ static void menu_display_d3d10_draw_pipeline(menu_display_ctx_draw_t* draw,
|
|||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
video_coord_array_t* ca = menu_display_get_coords_array();
|
||||
video_coord_array_t* ca = gfx_display_get_coords_array();
|
||||
|
||||
if (!d3d10->menu_pipeline_vbo)
|
||||
{
|
||||
|
@ -240,10 +240,10 @@ static void menu_display_d3d10_draw_pipeline(menu_display_ctx_draw_t* draw,
|
|||
}
|
||||
}
|
||||
|
||||
static void menu_display_d3d10_restore_clear_color(void) {}
|
||||
static void gfx_display_d3d10_restore_clear_color(void) {}
|
||||
|
||||
static void menu_display_d3d10_clear_color(
|
||||
menu_display_ctx_clearcolor_t* clearcolor,
|
||||
static void gfx_display_d3d10_clear_color(
|
||||
gfx_display_ctx_clearcolor_t* clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)video_info->userdata;
|
||||
|
@ -255,7 +255,7 @@ static void menu_display_d3d10_clear_color(
|
|||
d3d10->renderTargetView, (float*)clearcolor);
|
||||
}
|
||||
|
||||
static bool menu_display_d3d10_font_init_first(
|
||||
static bool gfx_display_d3d10_font_init_first(
|
||||
void** font_handle,
|
||||
void* video_data,
|
||||
const char* font_path,
|
||||
|
@ -272,7 +272,7 @@ static bool menu_display_d3d10_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
void menu_display_d3d10_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
void gfx_display_d3d10_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
D3D10_RECT rect;
|
||||
d3d10_video_t *d3d10 = (d3d10_video_t*)video_info->userdata;
|
||||
|
@ -288,7 +288,7 @@ void menu_display_d3d10_scissor_begin(video_frame_info_t *video_info, int x, int
|
|||
D3D10SetScissorRects(d3d10->device, 1, &rect);
|
||||
}
|
||||
|
||||
void menu_display_d3d10_scissor_end(video_frame_info_t *video_info)
|
||||
void gfx_display_d3d10_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
D3D10_RECT rect;
|
||||
d3d10_video_t *d3d10 = (d3d10_video_t*)video_info->userdata;
|
||||
|
@ -304,21 +304,21 @@ void menu_display_d3d10_scissor_end(video_frame_info_t *video_info)
|
|||
D3D10SetScissorRects(d3d10->device, 1, &rect);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_d3d10 = {
|
||||
menu_display_d3d10_draw,
|
||||
menu_display_d3d10_draw_pipeline,
|
||||
menu_display_d3d10_viewport,
|
||||
menu_display_d3d10_blend_begin,
|
||||
menu_display_d3d10_blend_end,
|
||||
menu_display_d3d10_restore_clear_color,
|
||||
menu_display_d3d10_clear_color,
|
||||
menu_display_d3d10_get_default_mvp,
|
||||
menu_display_d3d10_get_default_vertices,
|
||||
menu_display_d3d10_get_default_tex_coords,
|
||||
menu_display_d3d10_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D10,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d10 = {
|
||||
gfx_display_d3d10_draw,
|
||||
gfx_display_d3d10_draw_pipeline,
|
||||
gfx_display_d3d10_viewport,
|
||||
gfx_display_d3d10_blend_begin,
|
||||
gfx_display_d3d10_blend_end,
|
||||
gfx_display_d3d10_restore_clear_color,
|
||||
gfx_display_d3d10_clear_color,
|
||||
gfx_display_d3d10_get_default_mvp,
|
||||
gfx_display_d3d10_get_default_vertices,
|
||||
gfx_display_d3d10_get_default_tex_coords,
|
||||
gfx_display_d3d10_font_init_first,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D10,
|
||||
"d3d10",
|
||||
true,
|
||||
menu_display_d3d10_scissor_begin,
|
||||
menu_display_d3d10_scissor_end
|
||||
gfx_display_d3d10_scissor_begin,
|
||||
gfx_display_d3d10_scissor_end
|
||||
};
|
|
@ -21,47 +21,47 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/common/d3d11_common.h"
|
||||
|
||||
static const float* menu_display_d3d11_get_default_vertices(void)
|
||||
static const float* gfx_display_d3d11_get_default_vertices(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const float* menu_display_d3d11_get_default_tex_coords(void)
|
||||
static const float* gfx_display_d3d11_get_default_tex_coords(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void* menu_display_d3d11_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void* gfx_display_d3d11_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_d3d11_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d11_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d11_video_t* d3d11 = (d3d11_video_t*)video_info->userdata;
|
||||
D3D11SetBlendState(d3d11->context,
|
||||
d3d11->blend_enable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
static void menu_display_d3d11_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d11_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d11_video_t* d3d11 = (d3d11_video_t*)video_info->userdata;
|
||||
D3D11SetBlendState(d3d11->context,
|
||||
d3d11->blend_disable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
static void menu_display_d3d11_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d11_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_d3d11_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d11_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
int vertex_count;
|
||||
|
@ -183,7 +183,7 @@ static void menu_display_d3d11_draw(menu_display_ctx_draw_t *draw,
|
|||
return;
|
||||
}
|
||||
|
||||
static void menu_display_d3d11_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d11_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
d3d11_video_t *d3d11 = (d3d11_video_t*)video_info->userdata;
|
||||
|
@ -196,7 +196,7 @@ static void menu_display_d3d11_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
video_coord_array_t* ca = menu_display_get_coords_array();
|
||||
video_coord_array_t* ca = gfx_display_get_coords_array();
|
||||
|
||||
if (!d3d11->menu_pipeline_vbo)
|
||||
{
|
||||
|
@ -239,10 +239,10 @@ static void menu_display_d3d11_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
}
|
||||
}
|
||||
|
||||
static void menu_display_d3d11_restore_clear_color(void) {}
|
||||
static void gfx_display_d3d11_restore_clear_color(void) {}
|
||||
|
||||
static void menu_display_d3d11_clear_color(
|
||||
menu_display_ctx_clearcolor_t* clearcolor,
|
||||
static void gfx_display_d3d11_clear_color(
|
||||
gfx_display_ctx_clearcolor_t* clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
d3d11_video_t *d3d11 = (d3d11_video_t*)video_info->userdata;
|
||||
|
@ -254,7 +254,7 @@ static void menu_display_d3d11_clear_color(
|
|||
d3d11->renderTargetView, (float*)clearcolor);
|
||||
}
|
||||
|
||||
static bool menu_display_d3d11_font_init_first(
|
||||
static bool gfx_display_d3d11_font_init_first(
|
||||
void** font_handle,
|
||||
void* video_data,
|
||||
const char* font_path,
|
||||
|
@ -271,7 +271,7 @@ static bool menu_display_d3d11_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
void menu_display_d3d11_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
void gfx_display_d3d11_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
D3D11_RECT rect;
|
||||
d3d11_video_t *d3d11 = (d3d11_video_t*)video_info->userdata;
|
||||
|
@ -287,7 +287,7 @@ void menu_display_d3d11_scissor_begin(video_frame_info_t *video_info, int x, int
|
|||
D3D11SetScissorRects(d3d11->context, 1, &rect);
|
||||
}
|
||||
|
||||
void menu_display_d3d11_scissor_end(video_frame_info_t *video_info)
|
||||
void gfx_display_d3d11_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
D3D11_RECT rect;
|
||||
d3d11_video_t *d3d11 = (d3d11_video_t*)video_info->userdata;
|
||||
|
@ -303,21 +303,21 @@ void menu_display_d3d11_scissor_end(video_frame_info_t *video_info)
|
|||
D3D11SetScissorRects(d3d11->context, 1, &rect);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_d3d11 = {
|
||||
menu_display_d3d11_draw,
|
||||
menu_display_d3d11_draw_pipeline,
|
||||
menu_display_d3d11_viewport,
|
||||
menu_display_d3d11_blend_begin,
|
||||
menu_display_d3d11_blend_end,
|
||||
menu_display_d3d11_restore_clear_color,
|
||||
menu_display_d3d11_clear_color,
|
||||
menu_display_d3d11_get_default_mvp,
|
||||
menu_display_d3d11_get_default_vertices,
|
||||
menu_display_d3d11_get_default_tex_coords,
|
||||
menu_display_d3d11_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D11,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d11 = {
|
||||
gfx_display_d3d11_draw,
|
||||
gfx_display_d3d11_draw_pipeline,
|
||||
gfx_display_d3d11_viewport,
|
||||
gfx_display_d3d11_blend_begin,
|
||||
gfx_display_d3d11_blend_end,
|
||||
gfx_display_d3d11_restore_clear_color,
|
||||
gfx_display_d3d11_clear_color,
|
||||
gfx_display_d3d11_get_default_mvp,
|
||||
gfx_display_d3d11_get_default_vertices,
|
||||
gfx_display_d3d11_get_default_tex_coords,
|
||||
gfx_display_d3d11_font_init_first,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D11,
|
||||
"d3d11",
|
||||
true,
|
||||
menu_display_d3d11_scissor_begin,
|
||||
menu_display_d3d11_scissor_end
|
||||
gfx_display_d3d11_scissor_begin,
|
||||
gfx_display_d3d11_scissor_end
|
||||
};
|
|
@ -21,28 +21,28 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/common/d3d12_common.h"
|
||||
|
||||
static const float* menu_display_d3d12_get_default_vertices(void)
|
||||
static const float* gfx_display_d3d12_get_default_vertices(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const float* menu_display_d3d12_get_default_tex_coords(void)
|
||||
static const float* gfx_display_d3d12_get_default_tex_coords(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void* menu_display_d3d12_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void* gfx_display_d3d12_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_d3d12_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d12_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d12_video_t* d3d12 = (d3d12_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -50,7 +50,7 @@ static void menu_display_d3d12_blend_begin(video_frame_info_t *video_info)
|
|||
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe);
|
||||
}
|
||||
|
||||
static void menu_display_d3d12_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d12_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d12_video_t* d3d12 = (d3d12_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -58,12 +58,12 @@ static void menu_display_d3d12_blend_end(video_frame_info_t *video_info)
|
|||
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe);
|
||||
}
|
||||
|
||||
static void menu_display_d3d12_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d12_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_d3d12_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d12_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
int vertex_count;
|
||||
|
@ -200,7 +200,7 @@ static void menu_display_d3d12_draw(menu_display_ctx_draw_t *draw,
|
|||
return;
|
||||
}
|
||||
|
||||
static void menu_display_d3d12_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d12_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
d3d12_video_t *d3d12 = (d3d12_video_t*)video_info->userdata;
|
||||
|
@ -213,7 +213,7 @@ static void menu_display_d3d12_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
video_coord_array_t* ca = menu_display_get_coords_array();
|
||||
video_coord_array_t* ca = gfx_display_get_coords_array();
|
||||
|
||||
if (!d3d12->menu_pipeline_vbo)
|
||||
{
|
||||
|
@ -261,10 +261,10 @@ static void menu_display_d3d12_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
d3d12->queue.cmd, ROOT_ID_UBO, d3d12->ubo_view.BufferLocation);
|
||||
}
|
||||
|
||||
static void menu_display_d3d12_restore_clear_color(void) {}
|
||||
static void gfx_display_d3d12_restore_clear_color(void) {}
|
||||
|
||||
static void menu_display_d3d12_clear_color(
|
||||
menu_display_ctx_clearcolor_t* clearcolor, video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d12_clear_color(
|
||||
gfx_display_ctx_clearcolor_t* clearcolor, video_frame_info_t *video_info)
|
||||
{
|
||||
d3d12_video_t *d3d12 = (d3d12_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -276,7 +276,7 @@ static void menu_display_d3d12_clear_color(
|
|||
0, NULL);
|
||||
}
|
||||
|
||||
static bool menu_display_d3d12_font_init_first(
|
||||
static bool gfx_display_d3d12_font_init_first(
|
||||
void** font_handle,
|
||||
void* video_data,
|
||||
const char* font_path,
|
||||
|
@ -292,7 +292,7 @@ static bool menu_display_d3d12_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
void menu_display_d3d12_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
void gfx_display_d3d12_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
D3D12_RECT rect;
|
||||
d3d12_video_t *d3d12 = (d3d12_video_t*)video_info->userdata;
|
||||
|
@ -308,7 +308,7 @@ void menu_display_d3d12_scissor_begin(video_frame_info_t *video_info, int x, int
|
|||
D3D12RSSetScissorRects(d3d12->queue.cmd, 1, &rect);
|
||||
}
|
||||
|
||||
void menu_display_d3d12_scissor_end(video_frame_info_t *video_info)
|
||||
void gfx_display_d3d12_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
D3D12_RECT rect;
|
||||
d3d12_video_t *d3d12 = (d3d12_video_t*)video_info->userdata;
|
||||
|
@ -324,21 +324,21 @@ void menu_display_d3d12_scissor_end(video_frame_info_t *video_info)
|
|||
D3D12RSSetScissorRects(d3d12->queue.cmd, 1, &rect);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_d3d12 = {
|
||||
menu_display_d3d12_draw,
|
||||
menu_display_d3d12_draw_pipeline,
|
||||
menu_display_d3d12_viewport,
|
||||
menu_display_d3d12_blend_begin,
|
||||
menu_display_d3d12_blend_end,
|
||||
menu_display_d3d12_restore_clear_color,
|
||||
menu_display_d3d12_clear_color,
|
||||
menu_display_d3d12_get_default_mvp,
|
||||
menu_display_d3d12_get_default_vertices,
|
||||
menu_display_d3d12_get_default_tex_coords,
|
||||
menu_display_d3d12_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D12,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d12 = {
|
||||
gfx_display_d3d12_draw,
|
||||
gfx_display_d3d12_draw_pipeline,
|
||||
gfx_display_d3d12_viewport,
|
||||
gfx_display_d3d12_blend_begin,
|
||||
gfx_display_d3d12_blend_end,
|
||||
gfx_display_d3d12_restore_clear_color,
|
||||
gfx_display_d3d12_clear_color,
|
||||
gfx_display_d3d12_get_default_mvp,
|
||||
gfx_display_d3d12_get_default_vertices,
|
||||
gfx_display_d3d12_get_default_tex_coords,
|
||||
gfx_display_d3d12_font_init_first,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D12,
|
||||
"d3d12",
|
||||
true,
|
||||
menu_display_d3d12_scissor_begin,
|
||||
menu_display_d3d12_scissor_end
|
||||
gfx_display_d3d12_scissor_begin,
|
||||
gfx_display_d3d12_scissor_end
|
||||
};
|
|
@ -23,7 +23,7 @@
|
|||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/common/d3d_common.h"
|
||||
|
@ -43,17 +43,17 @@ static const float d3d8_tex_coords[] = {
|
|||
1, 0
|
||||
};
|
||||
|
||||
static const float *menu_display_d3d8_get_default_vertices(void)
|
||||
static const float *gfx_display_d3d8_get_default_vertices(void)
|
||||
{
|
||||
return &d3d8_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_d3d8_get_default_tex_coords(void)
|
||||
static const float *gfx_display_d3d8_get_default_tex_coords(void)
|
||||
{
|
||||
return &d3d8_tex_coords[0];
|
||||
}
|
||||
|
||||
static void *menu_display_d3d8_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_d3d8_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
static math_matrix_4x4 id;
|
||||
matrix_4x4_identity(id);
|
||||
|
@ -61,15 +61,15 @@ static void *menu_display_d3d8_get_default_mvp(video_frame_info_t *video_info)
|
|||
return &id;
|
||||
}
|
||||
|
||||
static INT32 menu_display_prim_to_d3d8_enum(
|
||||
enum menu_display_prim_type prim_type)
|
||||
static INT32 gfx_display_prim_to_d3d8_enum(
|
||||
enum gfx_display_prim_type prim_type)
|
||||
{
|
||||
switch (prim_type)
|
||||
{
|
||||
case MENU_DISPLAY_PRIM_TRIANGLES:
|
||||
case MENU_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLES:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
return D3DPT_COMM_TRIANGLESTRIP;
|
||||
case MENU_DISPLAY_PRIM_NONE:
|
||||
case GFX_DISPLAY_PRIM_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ static INT32 menu_display_prim_to_d3d8_enum(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d8_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d8_video_t *d3d = (d3d8_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -88,7 +88,7 @@ static void menu_display_d3d8_blend_begin(video_frame_info_t *video_info)
|
|||
d3d8_enable_blend_func(d3d->dev);
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d8_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d8_video_t *d3d = (d3d8_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -98,12 +98,12 @@ static void menu_display_d3d8_blend_end(video_frame_info_t *video_info)
|
|||
d3d8_disable_blend_func(d3d->dev);
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d8_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_bind_texture(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d8_bind_texture(gfx_display_ctx_draw_t *draw,
|
||||
d3d8_video_t *d3d)
|
||||
{
|
||||
LPDIRECT3DDEVICE8 dev = d3d->dev;
|
||||
|
@ -115,7 +115,7 @@ static void menu_display_d3d8_bind_texture(menu_display_ctx_draw_t *draw,
|
|||
d3d8_set_sampler_magfilter(d3d->dev, 0, D3DTEXF_COMM_LINEAR);
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d8_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -144,9 +144,9 @@ static void menu_display_d3d8_draw(menu_display_ctx_draw_t *draw,
|
|||
color = draw->coords->color;
|
||||
|
||||
if (!vertex)
|
||||
vertex = menu_display_d3d8_get_default_vertices();
|
||||
vertex = gfx_display_d3d8_get_default_vertices();
|
||||
if (!tex_coord)
|
||||
tex_coord = menu_display_d3d8_get_default_tex_coords();
|
||||
tex_coord = gfx_display_d3d8_get_default_tex_coords();
|
||||
|
||||
for (i = 0; i < draw->coords->vertices; i++)
|
||||
{
|
||||
|
@ -186,7 +186,7 @@ static void menu_display_d3d8_draw(menu_display_ctx_draw_t *draw,
|
|||
d3d8_vertex_buffer_unlock(d3d->menu_display.buffer);
|
||||
|
||||
if (!draw->matrix_data)
|
||||
draw->matrix_data = menu_display_d3d8_get_default_mvp(video_info);
|
||||
draw->matrix_data = gfx_display_d3d8_get_default_mvp(video_info);
|
||||
|
||||
/* ugh */
|
||||
matrix_4x4_scale(m1, 2.0, 2.0, 0);
|
||||
|
@ -209,30 +209,30 @@ static void menu_display_d3d8_draw(menu_display_ctx_draw_t *draw,
|
|||
d3d8_set_mvp(d3d->dev, &m1);
|
||||
|
||||
if (draw && draw->texture)
|
||||
menu_display_d3d8_bind_texture(draw, d3d);
|
||||
gfx_display_d3d8_bind_texture(draw, d3d);
|
||||
|
||||
d3d8_draw_primitive(d3d->dev,
|
||||
menu_display_prim_to_d3d8_enum(draw->prim_type),
|
||||
gfx_display_prim_to_d3d8_enum(draw->prim_type),
|
||||
d3d->menu_display.offset,
|
||||
draw->coords->vertices -
|
||||
((draw->prim_type == MENU_DISPLAY_PRIM_TRIANGLESTRIP)
|
||||
((draw->prim_type == GFX_DISPLAY_PRIM_TRIANGLESTRIP)
|
||||
? 2 : 0));
|
||||
|
||||
d3d->menu_display.offset += draw->coords->vertices;
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d8_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_restore_clear_color(void)
|
||||
static void gfx_display_d3d8_restore_clear_color(void)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static void menu_display_d3d8_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor, video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d8_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor, video_frame_info_t *video_info)
|
||||
{
|
||||
DWORD clear_color = 0;
|
||||
d3d8_video_t *d3d = (d3d8_video_t*)video_info->userdata;
|
||||
|
@ -250,7 +250,7 @@ static void menu_display_d3d8_clear_color(
|
|||
d3d8_clear(d3d->dev, 0, NULL, D3D_COMM_CLEAR_TARGET, clear_color, 0, 0);
|
||||
}
|
||||
|
||||
static bool menu_display_d3d8_font_init_first(
|
||||
static bool gfx_display_d3d8_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -264,19 +264,19 @@ static bool menu_display_d3d8_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_d3d8 = {
|
||||
menu_display_d3d8_draw,
|
||||
menu_display_d3d8_draw_pipeline,
|
||||
menu_display_d3d8_viewport,
|
||||
menu_display_d3d8_blend_begin,
|
||||
menu_display_d3d8_blend_end,
|
||||
menu_display_d3d8_restore_clear_color,
|
||||
menu_display_d3d8_clear_color,
|
||||
menu_display_d3d8_get_default_mvp,
|
||||
menu_display_d3d8_get_default_vertices,
|
||||
menu_display_d3d8_get_default_tex_coords,
|
||||
menu_display_d3d8_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D8,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d8 = {
|
||||
gfx_display_d3d8_draw,
|
||||
gfx_display_d3d8_draw_pipeline,
|
||||
gfx_display_d3d8_viewport,
|
||||
gfx_display_d3d8_blend_begin,
|
||||
gfx_display_d3d8_blend_end,
|
||||
gfx_display_d3d8_restore_clear_color,
|
||||
gfx_display_d3d8_clear_color,
|
||||
gfx_display_d3d8_get_default_mvp,
|
||||
gfx_display_d3d8_get_default_vertices,
|
||||
gfx_display_d3d8_get_default_tex_coords,
|
||||
gfx_display_d3d8_font_init_first,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D8,
|
||||
"d3d8",
|
||||
false,
|
||||
NULL,
|
|
@ -43,17 +43,17 @@ static const float d3d9_tex_coords[] = {
|
|||
1, 0
|
||||
};
|
||||
|
||||
static const float *menu_display_d3d9_get_default_vertices(void)
|
||||
static const float *gfx_display_d3d9_get_default_vertices(void)
|
||||
{
|
||||
return &d3d9_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_d3d9_get_default_tex_coords(void)
|
||||
static const float *gfx_display_d3d9_get_default_tex_coords(void)
|
||||
{
|
||||
return &d3d9_tex_coords[0];
|
||||
}
|
||||
|
||||
static void *menu_display_d3d9_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_d3d9_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
static math_matrix_4x4 id;
|
||||
matrix_4x4_identity(id);
|
||||
|
@ -61,15 +61,15 @@ static void *menu_display_d3d9_get_default_mvp(video_frame_info_t *video_info)
|
|||
return &id;
|
||||
}
|
||||
|
||||
static INT32 menu_display_prim_to_d3d9_enum(
|
||||
enum menu_display_prim_type prim_type)
|
||||
static INT32 gfx_display_prim_to_d3d9_enum(
|
||||
enum gfx_display_prim_type prim_type)
|
||||
{
|
||||
switch (prim_type)
|
||||
{
|
||||
case MENU_DISPLAY_PRIM_TRIANGLES:
|
||||
case MENU_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLES:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
return D3DPT_COMM_TRIANGLESTRIP;
|
||||
case MENU_DISPLAY_PRIM_NONE:
|
||||
case GFX_DISPLAY_PRIM_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ static INT32 menu_display_prim_to_d3d9_enum(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d9_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d9_video_t *d3d = (d3d9_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -88,7 +88,7 @@ static void menu_display_d3d9_blend_begin(video_frame_info_t *video_info)
|
|||
d3d9_enable_blend_func(d3d->dev);
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_d3d9_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
d3d9_video_t *d3d = (d3d9_video_t*)video_info->userdata;
|
||||
|
||||
|
@ -98,12 +98,12 @@ static void menu_display_d3d9_blend_end(video_frame_info_t *video_info)
|
|||
d3d9_disable_blend_func(d3d->dev);
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d9_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_bind_texture(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d9_bind_texture(gfx_display_ctx_draw_t *draw,
|
||||
d3d9_video_t *d3d)
|
||||
{
|
||||
LPDIRECT3DDEVICE9 dev = d3d->dev;
|
||||
|
@ -116,7 +116,7 @@ static void menu_display_d3d9_bind_texture(menu_display_ctx_draw_t *draw,
|
|||
d3d9_set_sampler_mipfilter(dev, 0, D3DTEXF_COMM_LINEAR);
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d9_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -150,9 +150,9 @@ static void menu_display_d3d9_draw(menu_display_ctx_draw_t *draw,
|
|||
color = draw->coords->color;
|
||||
|
||||
if (!vertex)
|
||||
vertex = menu_display_d3d9_get_default_vertices();
|
||||
vertex = gfx_display_d3d9_get_default_vertices();
|
||||
if (!tex_coord)
|
||||
tex_coord = menu_display_d3d9_get_default_tex_coords();
|
||||
tex_coord = gfx_display_d3d9_get_default_tex_coords();
|
||||
|
||||
for (i = 0; i < draw->coords->vertices; i++)
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ static void menu_display_d3d9_draw(menu_display_ctx_draw_t *draw,
|
|||
d3d->menu_display.buffer);
|
||||
|
||||
if (!draw->matrix_data)
|
||||
draw->matrix_data = menu_display_d3d9_get_default_mvp(video_info);
|
||||
draw->matrix_data = gfx_display_d3d9_get_default_mvp(video_info);
|
||||
|
||||
/* ugh */
|
||||
matrix_4x4_scale(m1, 2.0, 2.0, 0);
|
||||
|
@ -204,19 +204,19 @@ static void menu_display_d3d9_draw(menu_display_ctx_draw_t *draw,
|
|||
d3d9_set_mvp(d3d->dev, &m1);
|
||||
|
||||
if (draw && draw->texture)
|
||||
menu_display_d3d9_bind_texture(draw, d3d);
|
||||
gfx_display_d3d9_bind_texture(draw, d3d);
|
||||
|
||||
d3d9_draw_primitive(dev,
|
||||
(D3DPRIMITIVETYPE)menu_display_prim_to_d3d9_enum(draw->prim_type),
|
||||
(D3DPRIMITIVETYPE)gfx_display_prim_to_d3d9_enum(draw->prim_type),
|
||||
d3d->menu_display.offset,
|
||||
draw->coords->vertices -
|
||||
((draw->prim_type == MENU_DISPLAY_PRIM_TRIANGLESTRIP)
|
||||
((draw->prim_type == GFX_DISPLAY_PRIM_TRIANGLESTRIP)
|
||||
? 2 : 0));
|
||||
|
||||
d3d->menu_display.offset += draw->coords->vertices;
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_d3d9_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
#if defined(HAVE_HLSL) || defined(HAVE_CG)
|
||||
|
@ -226,7 +226,7 @@ static void menu_display_d3d9_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
if (!draw)
|
||||
return;
|
||||
|
||||
ca = menu_display_get_coords_array();
|
||||
ca = gfx_display_get_coords_array();
|
||||
|
||||
draw->x = 0;
|
||||
draw->y = 0;
|
||||
|
@ -261,13 +261,13 @@ static void menu_display_d3d9_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_restore_clear_color(void)
|
||||
static void gfx_display_d3d9_restore_clear_color(void)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static void menu_display_d3d9_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_d3d9_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
LPDIRECT3DDEVICE9 dev;
|
||||
|
@ -289,7 +289,7 @@ static void menu_display_d3d9_clear_color(
|
|||
d3d9_clear(dev, 0, NULL, D3D_COMM_CLEAR_TARGET, clear_color, 0, 0);
|
||||
}
|
||||
|
||||
static bool menu_display_d3d9_font_init_first(
|
||||
static bool gfx_display_d3d9_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float menu_font_size,
|
||||
bool is_threaded)
|
||||
|
@ -303,7 +303,7 @@ static bool menu_display_d3d9_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
void menu_display_d3d9_scissor_begin(
|
||||
void gfx_display_d3d9_scissor_begin(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ void menu_display_d3d9_scissor_begin(
|
|||
d3d9_set_scissor_rect(d3d9->dev, &rect);
|
||||
}
|
||||
|
||||
void menu_display_d3d9_scissor_end(video_frame_info_t *video_info)
|
||||
void gfx_display_d3d9_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
RECT rect;
|
||||
d3d9_video_t *d3d9 = (d3d9_video_t*)video_info->userdata;
|
||||
|
@ -337,21 +337,21 @@ void menu_display_d3d9_scissor_end(video_frame_info_t *video_info)
|
|||
d3d9_set_scissor_rect(d3d9->dev, &rect);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_d3d9 = {
|
||||
menu_display_d3d9_draw,
|
||||
menu_display_d3d9_draw_pipeline,
|
||||
menu_display_d3d9_viewport,
|
||||
menu_display_d3d9_blend_begin,
|
||||
menu_display_d3d9_blend_end,
|
||||
menu_display_d3d9_restore_clear_color,
|
||||
menu_display_d3d9_clear_color,
|
||||
menu_display_d3d9_get_default_mvp,
|
||||
menu_display_d3d9_get_default_vertices,
|
||||
menu_display_d3d9_get_default_tex_coords,
|
||||
menu_display_d3d9_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D9,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d9 = {
|
||||
gfx_display_d3d9_draw,
|
||||
gfx_display_d3d9_draw_pipeline,
|
||||
gfx_display_d3d9_viewport,
|
||||
gfx_display_d3d9_blend_begin,
|
||||
gfx_display_d3d9_blend_end,
|
||||
gfx_display_d3d9_restore_clear_color,
|
||||
gfx_display_d3d9_clear_color,
|
||||
gfx_display_d3d9_get_default_mvp,
|
||||
gfx_display_d3d9_get_default_vertices,
|
||||
gfx_display_d3d9_get_default_tex_coords,
|
||||
gfx_display_d3d9_font_init_first,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D9,
|
||||
"d3d9",
|
||||
false,
|
||||
menu_display_d3d9_scissor_begin,
|
||||
menu_display_d3d9_scissor_end
|
||||
gfx_display_d3d9_scissor_begin,
|
||||
gfx_display_d3d9_scissor_end
|
||||
};
|
|
@ -25,27 +25,27 @@
|
|||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#include "../../gfx/common/win32_common.h"
|
||||
#include "../../gfx/common/gdi_common.h"
|
||||
#endif
|
||||
|
||||
static void *menu_display_gdi_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_gdi_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_gdi_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_gdi_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_gdi_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gdi_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_gdi_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gdi_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
struct gdi_texture *texture = NULL;
|
||||
|
@ -60,12 +60,12 @@ static void menu_display_gdi_draw(menu_display_ctx_draw_t *draw,
|
|||
if (!texture || texture->width <= 1 || texture->height <= 1)
|
||||
return;
|
||||
|
||||
info.bmiHeader.biBitCount = 32;
|
||||
info.bmiHeader.biWidth = texture->width;
|
||||
info.bmiHeader.biHeight = -texture->height;
|
||||
info.bmiHeader.biPlanes = 1;
|
||||
info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
info.bmiHeader.biSizeImage = 0;
|
||||
info.bmiHeader.biBitCount = 32;
|
||||
info.bmiHeader.biWidth = texture->width;
|
||||
info.bmiHeader.biHeight = -texture->height;
|
||||
info.bmiHeader.biPlanes = 1;
|
||||
info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
info.bmiHeader.biSizeImage = 0;
|
||||
info.bmiHeader.biCompression = BI_RGB;
|
||||
|
||||
if (gdi->memDC)
|
||||
|
@ -93,12 +93,17 @@ static void menu_display_gdi_draw(menu_display_ctx_draw_t *draw,
|
|||
#if _WIN32_WINNT >= 0x0410 /* Win98 */
|
||||
blend.BlendOp = AC_SRC_OVER;
|
||||
blend.BlendFlags = 0;
|
||||
blend.SourceConstantAlpha = 255;/*clamp_8bit(draw->coords->color[3] * 255.0f);*/
|
||||
blend.SourceConstantAlpha = 255;
|
||||
#if 0
|
||||
clamp_8bit(draw->coords->color[3] * 255.0f);
|
||||
#endif
|
||||
blend.AlphaFormat = AC_SRC_ALPHA;
|
||||
|
||||
/* AlphaBlend() is only available since Win98 */
|
||||
AlphaBlend(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, blend);
|
||||
/*TransparentBlt(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, 0);*/
|
||||
#if 0
|
||||
TransparentBlt(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, 0);
|
||||
#endif
|
||||
#else
|
||||
/* Just draw without the blending */
|
||||
StretchBlt(gdi->memDC, draw->x, video_info->height - draw->height - draw->y, draw->width, draw->height, gdi->texDC, 0, 0, draw->width, draw->height, SRCCOPY);
|
||||
|
@ -110,30 +115,30 @@ static void menu_display_gdi_draw(menu_display_ctx_draw_t *draw,
|
|||
}
|
||||
}
|
||||
|
||||
static void menu_display_gdi_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gdi_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_gdi_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gdi_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_gdi_restore_clear_color(void)
|
||||
static void gfx_display_gdi_restore_clear_color(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_gdi_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_gdi_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
(void)clearcolor;
|
||||
|
||||
menu_display_gdi_restore_clear_color();
|
||||
gfx_display_gdi_restore_clear_color();
|
||||
}
|
||||
|
||||
static bool menu_display_gdi_font_init_first(
|
||||
static bool gfx_display_gdi_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float gdi_font_size,
|
||||
bool is_threaded)
|
||||
|
@ -147,31 +152,31 @@ static bool menu_display_gdi_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
static const float *menu_display_gdi_get_default_vertices(void)
|
||||
static const float *gfx_display_gdi_get_default_vertices(void)
|
||||
{
|
||||
static float dummy[16] = {0.0f};
|
||||
return &dummy[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_gdi_get_default_tex_coords(void)
|
||||
static const float *gfx_display_gdi_get_default_tex_coords(void)
|
||||
{
|
||||
static float dummy[16] = {0.0f};
|
||||
return &dummy[0];
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_gdi = {
|
||||
menu_display_gdi_draw,
|
||||
menu_display_gdi_draw_pipeline,
|
||||
menu_display_gdi_viewport,
|
||||
menu_display_gdi_blend_begin,
|
||||
menu_display_gdi_blend_end,
|
||||
menu_display_gdi_restore_clear_color,
|
||||
menu_display_gdi_clear_color,
|
||||
menu_display_gdi_get_default_mvp,
|
||||
menu_display_gdi_get_default_vertices,
|
||||
menu_display_gdi_get_default_tex_coords,
|
||||
menu_display_gdi_font_init_first,
|
||||
MENU_VIDEO_DRIVER_GDI,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gdi = {
|
||||
gfx_display_gdi_draw,
|
||||
gfx_display_gdi_draw_pipeline,
|
||||
gfx_display_gdi_viewport,
|
||||
gfx_display_gdi_blend_begin,
|
||||
gfx_display_gdi_blend_end,
|
||||
gfx_display_gdi_restore_clear_color,
|
||||
gfx_display_gdi_clear_color,
|
||||
gfx_display_gdi_get_default_mvp,
|
||||
gfx_display_gdi_get_default_vertices,
|
||||
gfx_display_gdi_get_default_tex_coords,
|
||||
gfx_display_gdi_font_init_first,
|
||||
GFX_VIDEO_DRIVER_GDI,
|
||||
"gdi",
|
||||
false,
|
||||
NULL,
|
|
@ -23,7 +23,7 @@
|
|||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/common/gl_common.h"
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
static int scx0, scx1, scy0, scy1;
|
||||
|
@ -81,17 +81,17 @@ static const GLfloat gl_tex_coords[] = {
|
|||
1, 0
|
||||
};
|
||||
|
||||
static const float *menu_display_gl_get_default_vertices(void)
|
||||
static const float *gfx_display_gl_get_default_vertices(void)
|
||||
{
|
||||
return &gl_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_gl_get_default_tex_coords(void)
|
||||
static const float *gfx_display_gl_get_default_tex_coords(void)
|
||||
{
|
||||
return &gl_tex_coords[0];
|
||||
}
|
||||
|
||||
static void *menu_display_gl_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_gl_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
gl_t *gl = (gl_t*)video_info->userdata;
|
||||
|
||||
|
@ -101,16 +101,16 @@ static void *menu_display_gl_get_default_mvp(video_frame_info_t *video_info)
|
|||
return &gl->mvp_no_rot;
|
||||
}
|
||||
|
||||
static GLenum menu_display_prim_to_gl_enum(
|
||||
enum menu_display_prim_type type)
|
||||
static GLenum gfx_display_prim_to_gl_enum(
|
||||
enum gfx_display_prim_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MENU_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
return GL_TRIANGLE_STRIP;
|
||||
case MENU_DISPLAY_PRIM_TRIANGLES:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLES:
|
||||
return GL_TRIANGLES;
|
||||
case MENU_DISPLAY_PRIM_NONE:
|
||||
case GFX_DISPLAY_PRIM_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ static GLenum menu_display_prim_to_gl_enum(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void menu_display_gl_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
gl_t *gl = (gl_t*)video_info->userdata;
|
||||
|
||||
|
@ -129,12 +129,12 @@ static void menu_display_gl_blend_begin(video_frame_info_t *video_info)
|
|||
true);
|
||||
}
|
||||
|
||||
static void menu_display_gl_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
static void menu_display_gl_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (draw)
|
||||
|
@ -143,7 +143,7 @@ static void menu_display_gl_viewport(menu_display_ctx_draw_t *draw,
|
|||
|
||||
#ifdef MALI_BUG
|
||||
static bool
|
||||
menu_display_gl_discard_draw_rectangle(menu_display_ctx_draw_t *draw,
|
||||
gfx_display_gl_discard_draw_rectangle(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info
|
||||
)
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ menu_display_gl_discard_draw_rectangle(menu_display_ctx_draw_t *draw,
|
|||
}
|
||||
#endif
|
||||
|
||||
static void menu_display_gl_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
gl_t *gl = (gl_t*)video_info->userdata;
|
||||
|
@ -227,7 +227,7 @@ static void menu_display_gl_draw(menu_display_ctx_draw_t *draw,
|
|||
return;
|
||||
|
||||
#ifdef MALI_BUG
|
||||
if (menu_display_gl_discard_draw_rectangle(draw, video_info))
|
||||
if (gfx_display_gl_discard_draw_rectangle(draw, video_info))
|
||||
{
|
||||
/*RARCH_WARN("[Menu]: discarded draw rect: %.4i %.4i %.4i %.4i\n",
|
||||
(int)draw->x, (int)draw->y, (int)draw->width, (int)draw->height);*/
|
||||
|
@ -236,35 +236,35 @@ static void menu_display_gl_draw(menu_display_ctx_draw_t *draw,
|
|||
#endif
|
||||
|
||||
if (!draw->coords->vertex)
|
||||
draw->coords->vertex = menu_display_gl_get_default_vertices();
|
||||
draw->coords->vertex = gfx_display_gl_get_default_vertices();
|
||||
if (!draw->coords->tex_coord)
|
||||
draw->coords->tex_coord = menu_display_gl_get_default_tex_coords();
|
||||
draw->coords->tex_coord = gfx_display_gl_get_default_tex_coords();
|
||||
if (!draw->coords->lut_tex_coord)
|
||||
draw->coords->lut_tex_coord = menu_display_gl_get_default_tex_coords();
|
||||
draw->coords->lut_tex_coord = gfx_display_gl_get_default_tex_coords();
|
||||
|
||||
menu_display_gl_viewport(draw, video_info);
|
||||
gfx_display_gl_viewport(draw, video_info);
|
||||
glBindTexture(GL_TEXTURE_2D, (GLuint)draw->texture);
|
||||
|
||||
gl->shader->set_coords(gl->shader_data, draw->coords);
|
||||
gl->shader->set_mvp(gl->shader_data,
|
||||
draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
|
||||
: (math_matrix_4x4*)menu_display_gl_get_default_mvp(video_info));
|
||||
: (math_matrix_4x4*)gfx_display_gl_get_default_mvp(video_info));
|
||||
|
||||
|
||||
glDrawArrays(menu_display_prim_to_gl_enum(
|
||||
glDrawArrays(gfx_display_prim_to_gl_enum(
|
||||
draw->prim_type), 0, draw->coords->vertices);
|
||||
|
||||
gl->coords.color = gl->white_color_ptr;
|
||||
}
|
||||
|
||||
static void menu_display_gl_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
struct uniform_info uniform_param;
|
||||
gl_t *gl = (gl_t*)video_info->userdata;
|
||||
static float t = 0;
|
||||
video_coord_array_t *ca = menu_display_get_coords_array();
|
||||
video_coord_array_t *ca = gfx_display_get_coords_array();
|
||||
|
||||
draw->x = 0;
|
||||
draw->y = 0;
|
||||
|
@ -333,13 +333,13 @@ static void menu_display_gl_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_gl_restore_clear_color(void)
|
||||
static void gfx_display_gl_restore_clear_color(void)
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.00f);
|
||||
}
|
||||
|
||||
static void menu_display_gl_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_gl_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!clearcolor)
|
||||
|
@ -350,7 +350,7 @@ static void menu_display_gl_clear_color(
|
|||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
static bool menu_display_gl_font_init_first(
|
||||
static bool gfx_display_gl_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float menu_font_size,
|
||||
bool is_threaded)
|
||||
|
@ -364,7 +364,7 @@ static bool menu_display_gl_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
static void menu_display_gl_scissor_begin(
|
||||
static void gfx_display_gl_scissor_begin(
|
||||
video_frame_info_t *video_info, int x, int y,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
|
@ -372,18 +372,18 @@ static void menu_display_gl_scissor_begin(
|
|||
glEnable(GL_SCISSOR_TEST);
|
||||
#ifdef MALI_BUG
|
||||
/* TODO/FIXME: If video width/height changes between
|
||||
* a call of menu_display_gl_scissor_begin() and the
|
||||
* next call of menu_display_gl_draw() (or if
|
||||
* menu_display_gl_scissor_begin() is called before the
|
||||
* first call of menu_display_gl_draw()), the scissor
|
||||
* a call of gfx_display_gl_scissor_begin() and the
|
||||
* next call of gfx_display_gl_draw() (or if
|
||||
* gfx_display_gl_scissor_begin() is called before the
|
||||
* first call of gfx_display_gl_draw()), the scissor
|
||||
* rectangle set here will be overwritten by the initialisation
|
||||
* procedure inside menu_display_gl_discard_draw_rectangle(),
|
||||
* procedure inside gfx_display_gl_discard_draw_rectangle(),
|
||||
* causing the next frame to render glitched content */
|
||||
scissor_set_rectangle(x, x + width - 1, y, y + height - 1, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_gl_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
glScissor(0, 0, video_info->width, video_info->height);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
@ -392,21 +392,21 @@ static void menu_display_gl_scissor_end(video_frame_info_t *video_info)
|
|||
#endif
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_gl = {
|
||||
menu_display_gl_draw,
|
||||
menu_display_gl_draw_pipeline,
|
||||
menu_display_gl_viewport,
|
||||
menu_display_gl_blend_begin,
|
||||
menu_display_gl_blend_end,
|
||||
menu_display_gl_restore_clear_color,
|
||||
menu_display_gl_clear_color,
|
||||
menu_display_gl_get_default_mvp,
|
||||
menu_display_gl_get_default_vertices,
|
||||
menu_display_gl_get_default_tex_coords,
|
||||
menu_display_gl_font_init_first,
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl = {
|
||||
gfx_display_gl_draw,
|
||||
gfx_display_gl_draw_pipeline,
|
||||
gfx_display_gl_viewport,
|
||||
gfx_display_gl_blend_begin,
|
||||
gfx_display_gl_blend_end,
|
||||
gfx_display_gl_restore_clear_color,
|
||||
gfx_display_gl_clear_color,
|
||||
gfx_display_gl_get_default_mvp,
|
||||
gfx_display_gl_get_default_vertices,
|
||||
gfx_display_gl_get_default_tex_coords,
|
||||
gfx_display_gl_font_init_first,
|
||||
GFX_VIDEO_DRIVER_OPENGL,
|
||||
"gl",
|
||||
false,
|
||||
menu_display_gl_scissor_begin,
|
||||
menu_display_gl_scissor_end
|
||||
gfx_display_gl_scissor_begin,
|
||||
gfx_display_gl_scissor_end
|
||||
};
|
|
@ -44,17 +44,17 @@ static const GLfloat gl1_menu_tex_coords[] = {
|
|||
1, 0
|
||||
};
|
||||
|
||||
static const float *menu_display_gl1_get_default_vertices(void)
|
||||
static const float *gfx_display_gl1_get_default_vertices(void)
|
||||
{
|
||||
return &gl1_menu_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_gl1_get_default_tex_coords(void)
|
||||
static const float *gfx_display_gl1_get_default_tex_coords(void)
|
||||
{
|
||||
return &gl1_menu_tex_coords[0];
|
||||
}
|
||||
|
||||
static void *menu_display_gl1_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_gl1_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
gl1_t *gl1 = (gl1_t*)video_info->userdata;
|
||||
|
||||
|
@ -64,16 +64,16 @@ static void *menu_display_gl1_get_default_mvp(video_frame_info_t *video_info)
|
|||
return &gl1->mvp_no_rot;
|
||||
}
|
||||
|
||||
static GLenum menu_display_prim_to_gl1_enum(
|
||||
enum menu_display_prim_type type)
|
||||
static GLenum gfx_display_prim_to_gl1_enum(
|
||||
enum gfx_display_prim_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MENU_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
return GL_TRIANGLE_STRIP;
|
||||
case MENU_DISPLAY_PRIM_TRIANGLES:
|
||||
case GFX_DISPLAY_PRIM_TRIANGLES:
|
||||
return GL_TRIANGLES;
|
||||
case MENU_DISPLAY_PRIM_NONE:
|
||||
case GFX_DISPLAY_PRIM_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -81,25 +81,25 @@ static GLenum menu_display_prim_to_gl1_enum(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void menu_display_gl1_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl1_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
static void menu_display_gl1_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl1_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
static void menu_display_gl1_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl1_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (draw)
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
}
|
||||
|
||||
static void menu_display_gl1_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl1_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
video_shader_ctx_mvp_t mvp;
|
||||
|
@ -109,13 +109,13 @@ static void menu_display_gl1_draw(menu_display_ctx_draw_t *draw,
|
|||
return;
|
||||
|
||||
if (!draw->coords->vertex)
|
||||
draw->coords->vertex = menu_display_gl1_get_default_vertices();
|
||||
draw->coords->vertex = gfx_display_gl1_get_default_vertices();
|
||||
if (!draw->coords->tex_coord)
|
||||
draw->coords->tex_coord = menu_display_gl1_get_default_tex_coords();
|
||||
draw->coords->tex_coord = gfx_display_gl1_get_default_tex_coords();
|
||||
if (!draw->coords->lut_tex_coord)
|
||||
draw->coords->lut_tex_coord = menu_display_gl1_get_default_tex_coords();
|
||||
draw->coords->lut_tex_coord = gfx_display_gl1_get_default_tex_coords();
|
||||
|
||||
menu_display_gl1_viewport(draw, video_info);
|
||||
gfx_display_gl1_viewport(draw, video_info);
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
|
@ -123,7 +123,7 @@ static void menu_display_gl1_draw(menu_display_ctx_draw_t *draw,
|
|||
|
||||
mvp.data = gl1;
|
||||
mvp.matrix = draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
|
||||
: (math_matrix_4x4*)menu_display_gl1_get_default_mvp(video_info);
|
||||
: (math_matrix_4x4*)gfx_display_gl1_get_default_mvp(video_info);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
|
@ -155,7 +155,7 @@ static void menu_display_gl1_draw(menu_display_ctx_draw_t *draw,
|
|||
glColorPointer(4, GL_FLOAT, 0, draw->coords->color);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, draw->coords->tex_coord);
|
||||
|
||||
glDrawArrays(menu_display_prim_to_gl1_enum(
|
||||
glDrawArrays(gfx_display_prim_to_gl1_enum(
|
||||
draw->prim_type), 0, draw->coords->vertices);
|
||||
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
|
@ -170,13 +170,13 @@ static void menu_display_gl1_draw(menu_display_ctx_draw_t *draw,
|
|||
gl1->coords.color = gl1->white_color_ptr;
|
||||
}
|
||||
|
||||
static void menu_display_gl1_restore_clear_color(void)
|
||||
static void gfx_display_gl1_restore_clear_color(void)
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
static void menu_display_gl1_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_gl1_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!clearcolor)
|
||||
|
@ -187,7 +187,7 @@ static void menu_display_gl1_clear_color(
|
|||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
static bool menu_display_gl1_font_init_first(
|
||||
static bool gfx_display_gl1_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float menu_font_size,
|
||||
bool is_threaded)
|
||||
|
@ -201,34 +201,34 @@ static bool menu_display_gl1_font_init_first(
|
|||
return true;
|
||||
}
|
||||
|
||||
static void menu_display_gl1_scissor_begin(video_frame_info_t *video_info, int x, int y,
|
||||
static void gfx_display_gl1_scissor_begin(video_frame_info_t *video_info, int x, int y,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
glScissor(x, video_info->height - y - height, width, height);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
static void menu_display_gl1_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl1_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
glScissor(0, 0, video_info->width, video_info->height);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_gl1 = {
|
||||
menu_display_gl1_draw,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl1 = {
|
||||
gfx_display_gl1_draw,
|
||||
NULL,
|
||||
menu_display_gl1_viewport,
|
||||
menu_display_gl1_blend_begin,
|
||||
menu_display_gl1_blend_end,
|
||||
menu_display_gl1_restore_clear_color,
|
||||
menu_display_gl1_clear_color,
|
||||
menu_display_gl1_get_default_mvp,
|
||||
menu_display_gl1_get_default_vertices,
|
||||
menu_display_gl1_get_default_tex_coords,
|
||||
menu_display_gl1_font_init_first,
|
||||
MENU_VIDEO_DRIVER_OPENGL1,
|
||||
gfx_display_gl1_viewport,
|
||||
gfx_display_gl1_blend_begin,
|
||||
gfx_display_gl1_blend_end,
|
||||
gfx_display_gl1_restore_clear_color,
|
||||
gfx_display_gl1_clear_color,
|
||||
gfx_display_gl1_get_default_mvp,
|
||||
gfx_display_gl1_get_default_vertices,
|
||||
gfx_display_gl1_get_default_tex_coords,
|
||||
gfx_display_gl1_font_init_first,
|
||||
GFX_VIDEO_DRIVER_OPENGL1,
|
||||
"gl1",
|
||||
false,
|
||||
menu_display_gl1_scissor_begin,
|
||||
menu_display_gl1_scissor_end
|
||||
gfx_display_gl1_scissor_begin,
|
||||
gfx_display_gl1_scissor_end
|
||||
};
|
|
@ -21,7 +21,7 @@
|
|||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
@ -48,7 +48,7 @@ static const float gl_core_colors[] = {
|
|||
1.0f, 1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
static void *menu_display_gl_core_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_gl_core_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
gl_core_t *gl_core = (gl_core_t*)video_info->userdata;
|
||||
if (!gl_core)
|
||||
|
@ -56,29 +56,29 @@ static void *menu_display_gl_core_get_default_mvp(video_frame_info_t *video_info
|
|||
return &gl_core->mvp_no_rot;
|
||||
}
|
||||
|
||||
static const float *menu_display_gl_core_get_default_vertices(void)
|
||||
static const float *gfx_display_gl_core_get_default_vertices(void)
|
||||
{
|
||||
return &gl_core_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_gl_core_get_default_color(void)
|
||||
static const float *gfx_display_gl_core_get_default_color(void)
|
||||
{
|
||||
return &gl_core_colors[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_gl_core_get_default_tex_coords(void)
|
||||
static const float *gfx_display_gl_core_get_default_tex_coords(void)
|
||||
{
|
||||
return &gl_core_tex_coords[0];
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_core_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (draw)
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
|
@ -106,7 +106,7 @@ static void menu_display_gl_core_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
default:
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
ca = menu_display_get_coords_array();
|
||||
ca = gfx_display_get_coords_array();
|
||||
draw->coords = (struct video_coords*)&ca->coords;
|
||||
draw->pipeline.backend_data = ubo_scratch_data;
|
||||
draw->pipeline.backend_data_size = 2 * sizeof(float);
|
||||
|
@ -127,7 +127,7 @@ static void menu_display_gl_core_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
|
||||
/* Match UBO layout in shader. */
|
||||
memcpy(ubo_scratch_data,
|
||||
menu_display_gl_core_get_default_mvp(video_info),
|
||||
gfx_display_gl_core_get_default_mvp(video_info),
|
||||
sizeof(math_matrix_4x4));
|
||||
memcpy(ubo_scratch_data + sizeof(math_matrix_4x4),
|
||||
output_size,
|
||||
|
@ -140,9 +140,9 @@ static void menu_display_gl_core_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
+ 2 * sizeof(float), &t, sizeof(t));
|
||||
memcpy(ubo_scratch_data + sizeof(math_matrix_4x4)
|
||||
+ 3 * sizeof(float), &yflip, sizeof(yflip));
|
||||
draw->coords = &blank_coords;
|
||||
draw->coords = &blank_coords;
|
||||
blank_coords.vertices = 4;
|
||||
draw->prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw->prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ static void menu_display_gl_core_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_core_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
const float *vertex = NULL;
|
||||
|
@ -169,13 +169,13 @@ static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw,
|
|||
color = draw->coords->color;
|
||||
|
||||
if (!vertex)
|
||||
vertex = menu_display_gl_core_get_default_vertices();
|
||||
vertex = gfx_display_gl_core_get_default_vertices();
|
||||
if (!tex_coord)
|
||||
tex_coord = menu_display_gl_core_get_default_tex_coords();
|
||||
tex_coord = gfx_display_gl_core_get_default_tex_coords();
|
||||
if (!color)
|
||||
color = menu_display_gl_core_get_default_color();
|
||||
color = gfx_display_gl_core_get_default_color();
|
||||
|
||||
menu_display_gl_core_viewport(draw, video_info);
|
||||
gfx_display_gl_core_viewport(draw, video_info);
|
||||
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
@ -239,7 +239,7 @@ static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw,
|
|||
if (!loc)
|
||||
{
|
||||
const math_matrix_4x4 *mat = draw->matrix_data
|
||||
? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)menu_display_gl_core_get_default_mvp(video_info);
|
||||
? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)gfx_display_gl_core_get_default_mvp(video_info);
|
||||
if (gl->pipelines.alpha_blend_loc.flat_ubo_vertex >= 0)
|
||||
glUniform4fv(gl->pipelines.alpha_blend_loc.flat_ubo_vertex,
|
||||
4, mat->data);
|
||||
|
@ -262,10 +262,18 @@ static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw,
|
|||
glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE,
|
||||
4 * sizeof(float), (void *)(uintptr_t)0);
|
||||
|
||||
if (draw->prim_type == MENU_DISPLAY_PRIM_TRIANGLESTRIP)
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, draw->coords->vertices);
|
||||
else if (draw->prim_type == MENU_DISPLAY_PRIM_TRIANGLES)
|
||||
glDrawArrays(GL_TRIANGLES, 0, draw->coords->vertices);
|
||||
switch (draw->prim_type)
|
||||
{
|
||||
case GFX_DISPLAY_PRIM_TRIANGLESTRIP:
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, draw->coords->vertices);
|
||||
break;
|
||||
case GFX_DISPLAY_PRIM_TRIANGLES:
|
||||
glDrawArrays(GL_TRIANGLES, 0, draw->coords->vertices);
|
||||
break;
|
||||
case GFX_DISPLAY_PRIM_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
glDisableVertexAttribArray(0);
|
||||
glDisableVertexAttribArray(1);
|
||||
|
@ -275,13 +283,13 @@ static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw,
|
|||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_restore_clear_color(void)
|
||||
static void gfx_display_gl_core_restore_clear_color(void)
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.00f);
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_gl_core_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!clearcolor)
|
||||
|
@ -291,7 +299,7 @@ static void menu_display_gl_core_clear_color(
|
|||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl_core_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
gl_core_t *gl = (gl_core_t*)video_info->userdata;
|
||||
|
||||
|
@ -300,12 +308,12 @@ static void menu_display_gl_core_blend_begin(video_frame_info_t *video_info)
|
|||
glUseProgram(gl->pipelines.alpha_blend);
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl_core_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
static bool menu_display_gl_core_font_init_first(
|
||||
static bool gfx_display_gl_core_font_init_first(
|
||||
void **font_handle, void *video_data, const char *font_path,
|
||||
float menu_font_size, bool is_threaded)
|
||||
{
|
||||
|
@ -321,33 +329,33 @@ static bool menu_display_gl_core_font_init_first(
|
|||
return false;
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_scissor_begin(video_frame_info_t *video_info,
|
||||
static void gfx_display_gl_core_scissor_begin(video_frame_info_t *video_info,
|
||||
int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
glScissor(x, video_info->height - y - height, width, height);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
static void menu_display_gl_core_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_gl_core_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_gl_core = {
|
||||
menu_display_gl_core_draw,
|
||||
menu_display_gl_core_draw_pipeline,
|
||||
menu_display_gl_core_viewport,
|
||||
menu_display_gl_core_blend_begin,
|
||||
menu_display_gl_core_blend_end,
|
||||
menu_display_gl_core_restore_clear_color,
|
||||
menu_display_gl_core_clear_color,
|
||||
menu_display_gl_core_get_default_mvp,
|
||||
menu_display_gl_core_get_default_vertices,
|
||||
menu_display_gl_core_get_default_tex_coords,
|
||||
menu_display_gl_core_font_init_first,
|
||||
MENU_VIDEO_DRIVER_OPENGL_CORE,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl_core = {
|
||||
gfx_display_gl_core_draw,
|
||||
gfx_display_gl_core_draw_pipeline,
|
||||
gfx_display_gl_core_viewport,
|
||||
gfx_display_gl_core_blend_begin,
|
||||
gfx_display_gl_core_blend_end,
|
||||
gfx_display_gl_core_restore_clear_color,
|
||||
gfx_display_gl_core_clear_color,
|
||||
gfx_display_gl_core_get_default_mvp,
|
||||
gfx_display_gl_core_get_default_vertices,
|
||||
gfx_display_gl_core_get_default_tex_coords,
|
||||
gfx_display_gl_core_font_init_first,
|
||||
GFX_VIDEO_DRIVER_OPENGL_CORE,
|
||||
"glcore",
|
||||
false,
|
||||
menu_display_gl_core_scissor_begin,
|
||||
menu_display_gl_core_scissor_end
|
||||
gfx_display_gl_core_scissor_begin,
|
||||
gfx_display_gl_core_scissor_end
|
||||
};
|
|
@ -19,23 +19,23 @@
|
|||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#import "../../gfx/common/metal_common.h"
|
||||
|
||||
static const float *menu_display_metal_get_default_vertices(void)
|
||||
static const float *gfx_display_metal_get_default_vertices(void)
|
||||
{
|
||||
return [MenuDisplay defaultVertices];
|
||||
}
|
||||
|
||||
static const float *menu_display_metal_get_default_tex_coords(void)
|
||||
static const float *gfx_display_metal_get_default_tex_coords(void)
|
||||
{
|
||||
return [MenuDisplay defaultTexCoords];
|
||||
}
|
||||
|
||||
static void *menu_display_metal_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_metal_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
if (!md)
|
||||
|
@ -44,7 +44,7 @@ static void *menu_display_metal_get_default_mvp(video_frame_info_t *video_info)
|
|||
return (void *)&md.viewportMVP->projectionMatrix;
|
||||
}
|
||||
|
||||
static void menu_display_metal_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_metal_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
if (!md)
|
||||
|
@ -53,7 +53,7 @@ static void menu_display_metal_blend_begin(video_frame_info_t *video_info)
|
|||
md.display.blend = YES;
|
||||
}
|
||||
|
||||
static void menu_display_metal_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_metal_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
if (!md)
|
||||
|
@ -62,7 +62,7 @@ static void menu_display_metal_blend_end(video_frame_info_t *video_info)
|
|||
md.display.blend = NO;
|
||||
}
|
||||
|
||||
static void menu_display_metal_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_metal_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
|
@ -72,7 +72,7 @@ static void menu_display_metal_draw(menu_display_ctx_draw_t *draw,
|
|||
[md.display draw:draw video:video_info];
|
||||
}
|
||||
|
||||
static void menu_display_metal_draw_pipeline(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info)
|
||||
static void gfx_display_metal_draw_pipeline(gfx_display_ctx_draw_t *draw, video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
if (!md || !draw)
|
||||
|
@ -81,12 +81,12 @@ static void menu_display_metal_draw_pipeline(menu_display_ctx_draw_t *draw, vide
|
|||
[md.display drawPipeline:draw video:video_info];
|
||||
}
|
||||
|
||||
static void menu_display_metal_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_metal_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_metal_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
static void gfx_display_metal_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
if (!md)
|
||||
|
@ -96,7 +96,7 @@ static void menu_display_metal_scissor_begin(video_frame_info_t *video_info, int
|
|||
[md.display setScissorRect:r];
|
||||
}
|
||||
|
||||
static void menu_display_metal_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_metal_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
if (!md)
|
||||
|
@ -105,12 +105,12 @@ static void menu_display_metal_scissor_end(video_frame_info_t *video_info)
|
|||
[md.display clearScissorRect];
|
||||
}
|
||||
|
||||
static void menu_display_metal_restore_clear_color(void)
|
||||
static void gfx_display_metal_restore_clear_color(void)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
static void menu_display_metal_clear_color(menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_metal_clear_color(gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)video_info->userdata;
|
||||
|
@ -120,7 +120,7 @@ static void menu_display_metal_clear_color(menu_display_ctx_clearcolor_t *clearc
|
|||
md.display.clearColor = MTLClearColorMake(clearcolor->r, clearcolor->g, clearcolor->b, clearcolor->a);
|
||||
}
|
||||
|
||||
static bool menu_display_metal_font_init_first(
|
||||
static bool gfx_display_metal_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -137,21 +137,21 @@ static bool menu_display_metal_font_init_first(
|
|||
return false;
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_metal = {
|
||||
.draw = menu_display_metal_draw,
|
||||
.draw_pipeline = menu_display_metal_draw_pipeline,
|
||||
.viewport = menu_display_metal_viewport,
|
||||
.blend_begin = menu_display_metal_blend_begin,
|
||||
.blend_end = menu_display_metal_blend_end,
|
||||
.restore_clear_color = menu_display_metal_restore_clear_color,
|
||||
.clear_color = menu_display_metal_clear_color,
|
||||
.get_default_mvp = menu_display_metal_get_default_mvp,
|
||||
.get_default_vertices = menu_display_metal_get_default_vertices,
|
||||
.get_default_tex_coords = menu_display_metal_get_default_tex_coords,
|
||||
.font_init_first = menu_display_metal_font_init_first,
|
||||
.type = MENU_VIDEO_DRIVER_METAL,
|
||||
.ident = "menu_display_metal",
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_metal = {
|
||||
.draw = gfx_display_metal_draw,
|
||||
.draw_pipeline = gfx_display_metal_draw_pipeline,
|
||||
.viewport = gfx_display_metal_viewport,
|
||||
.blend_begin = gfx_display_metal_blend_begin,
|
||||
.blend_end = gfx_display_metal_blend_end,
|
||||
.restore_clear_color = gfx_display_metal_restore_clear_color,
|
||||
.clear_color = gfx_display_metal_clear_color,
|
||||
.get_default_mvp = gfx_display_metal_get_default_mvp,
|
||||
.get_default_vertices = gfx_display_metal_get_default_vertices,
|
||||
.get_default_tex_coords = gfx_display_metal_get_default_tex_coords,
|
||||
.font_init_first = gfx_display_metal_font_init_first,
|
||||
.type = GFX_VIDEO_DRIVER_METAL,
|
||||
.ident = "gfx_display_metal",
|
||||
.handles_transform = NO,
|
||||
.scissor_begin = menu_display_metal_scissor_begin,
|
||||
.scissor_end = menu_display_metal_scissor_end
|
||||
.scissor_begin = gfx_display_metal_scissor_begin,
|
||||
.scissor_end = gfx_display_metal_scissor_end
|
||||
};
|
|
@ -20,48 +20,48 @@
|
|||
#include "../../gfx/font_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
static void *menu_display_switch_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_switch_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_switch_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_switch_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_switch_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_switch_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_switch_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_switch_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_switch_draw_pipeline(
|
||||
menu_display_ctx_draw_t *draw, video_frame_info_t *video_info)
|
||||
static void gfx_display_switch_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw, video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_switch_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_switch_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_switch_restore_clear_color(void)
|
||||
static void gfx_display_switch_restore_clear_color(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_switch_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_switch_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
(void)clearcolor;
|
||||
}
|
||||
|
||||
static bool menu_display_switch_font_init_first(
|
||||
static bool gfx_display_switch_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -74,31 +74,31 @@ static bool menu_display_switch_font_init_first(
|
|||
return *handle;
|
||||
}
|
||||
|
||||
static const float *menu_display_switch_get_default_vertices(void)
|
||||
static const float *gfx_display_switch_get_default_vertices(void)
|
||||
{
|
||||
static float dummy[16] = {0.0f};
|
||||
return &dummy[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_switch_get_default_tex_coords(void)
|
||||
static const float *gfx_display_switch_get_default_tex_coords(void)
|
||||
{
|
||||
static float dummy[16] = {0.0f};
|
||||
return &dummy[0];
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_switch = {
|
||||
menu_display_switch_draw,
|
||||
menu_display_switch_draw_pipeline,
|
||||
menu_display_switch_viewport,
|
||||
menu_display_switch_blend_begin,
|
||||
menu_display_switch_blend_end,
|
||||
menu_display_switch_restore_clear_color,
|
||||
menu_display_switch_clear_color,
|
||||
menu_display_switch_get_default_mvp,
|
||||
menu_display_switch_get_default_vertices,
|
||||
menu_display_switch_get_default_tex_coords,
|
||||
menu_display_switch_font_init_first,
|
||||
MENU_VIDEO_DRIVER_SWITCH,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_switch = {
|
||||
gfx_display_switch_draw,
|
||||
gfx_display_switch_draw_pipeline,
|
||||
gfx_display_switch_viewport,
|
||||
gfx_display_switch_blend_begin,
|
||||
gfx_display_switch_blend_end,
|
||||
gfx_display_switch_restore_clear_color,
|
||||
gfx_display_switch_clear_color,
|
||||
gfx_display_switch_get_default_mvp,
|
||||
gfx_display_switch_get_default_vertices,
|
||||
gfx_display_switch_get_default_tex_coords,
|
||||
gfx_display_switch_font_init_first,
|
||||
GFX_VIDEO_DRIVER_SWITCH,
|
||||
"switch",
|
||||
false,
|
||||
NULL,
|
|
@ -21,7 +21,7 @@
|
|||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
|
@ -49,22 +49,22 @@ static const float vita2d_colors[] = {
|
|||
1.0f, 1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
static const float *menu_display_vita2d_get_default_vertices(void)
|
||||
static const float *gfx_display_vita2d_get_default_vertices(void)
|
||||
{
|
||||
return &vita2d_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_vita2d_get_default_color(void)
|
||||
static const float *gfx_display_vita2d_get_default_color(void)
|
||||
{
|
||||
return &vita2d_colors[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_vita2d_get_default_tex_coords(void)
|
||||
static const float *gfx_display_vita2d_get_default_tex_coords(void)
|
||||
{
|
||||
return &vita2d_tex_coords[0];
|
||||
}
|
||||
|
||||
static void *menu_display_vita2d_get_default_mvp(
|
||||
static void *gfx_display_vita2d_get_default_mvp(
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
vita_video_t *vita2d = (vita_video_t*)video_info->userdata;
|
||||
|
@ -75,17 +75,17 @@ static void *menu_display_vita2d_get_default_mvp(
|
|||
return &vita2d->mvp_no_rot;
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_vita2d_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_vita2d_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vita2d_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (draw){
|
||||
|
@ -93,7 +93,7 @@ static void menu_display_vita2d_viewport(menu_display_ctx_draw_t *draw,
|
|||
}
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -112,17 +112,17 @@ static void menu_display_vita2d_draw(menu_display_ctx_draw_t *draw,
|
|||
color = draw->coords->color;
|
||||
|
||||
if (!vertex)
|
||||
vertex = menu_display_vita2d_get_default_vertices();
|
||||
vertex = gfx_display_vita2d_get_default_vertices();
|
||||
if (!tex_coord)
|
||||
tex_coord = menu_display_vita2d_get_default_tex_coords();
|
||||
tex_coord = gfx_display_vita2d_get_default_tex_coords();
|
||||
if (!draw->coords->lut_tex_coord)
|
||||
draw->coords->lut_tex_coord = menu_display_vita2d_get_default_tex_coords();
|
||||
draw->coords->lut_tex_coord = gfx_display_vita2d_get_default_tex_coords();
|
||||
if (!texture)
|
||||
return;
|
||||
if (!color)
|
||||
color = menu_display_vita2d_get_default_color();
|
||||
color = gfx_display_vita2d_get_default_color();
|
||||
|
||||
menu_display_vita2d_viewport(draw, video_info);
|
||||
gfx_display_vita2d_viewport(draw, video_info);
|
||||
|
||||
vita2d_texture_tint_vertex *vertices = (vita2d_texture_tint_vertex *)vita2d_pool_memalign(
|
||||
draw->coords->vertices * sizeof(vita2d_texture_tint_vertex),
|
||||
|
@ -141,30 +141,30 @@ static void menu_display_vita2d_draw(menu_display_ctx_draw_t *draw,
|
|||
}
|
||||
|
||||
const math_matrix_4x4 *mat = draw->matrix_data
|
||||
? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)menu_display_vita2d_get_default_mvp(video_info);
|
||||
? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)gfx_display_vita2d_get_default_mvp(video_info);
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
{
|
||||
default:
|
||||
{
|
||||
vita2d_draw_array_textured_mat(texture, vertices, draw->coords->vertices, menu_display_vita2d_get_default_mvp(video_info));
|
||||
vita2d_draw_array_textured_mat(texture, vertices, draw->coords->vertices, gfx_display_vita2d_get_default_mvp(video_info));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vita2d_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_restore_clear_color(void)
|
||||
static void gfx_display_vita2d_restore_clear_color(void)
|
||||
{
|
||||
vita2d_set_clear_color(RGBA8(0x00, 0x00, 0x00, 0xFF));
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_vita2d_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!clearcolor)
|
||||
|
@ -176,7 +176,7 @@ static void menu_display_vita2d_clear_color(
|
|||
vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT, vita2d_get_clear_color());
|
||||
}
|
||||
|
||||
static bool menu_display_vita2d_font_init_first(
|
||||
static bool gfx_display_vita2d_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -189,34 +189,34 @@ static bool menu_display_vita2d_font_init_first(
|
|||
return *handle;
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_vita2d_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
vita2d_set_region_clip(SCE_GXM_REGION_CLIP_NONE, 0, 0, video_info->width, video_info->height);
|
||||
vita2d_disable_clipping();
|
||||
}
|
||||
|
||||
static void menu_display_vita2d_scissor_begin(video_frame_info_t *video_info, int x, int y,
|
||||
static void gfx_display_vita2d_scissor_begin(video_frame_info_t *video_info, int x, int y,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
vita2d_set_clip_rectangle(x, y, x + width, y + height);
|
||||
vita2d_set_region_clip(SCE_GXM_REGION_CLIP_OUTSIDE, x, y, x + width, y + height);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_vita2d = {
|
||||
menu_display_vita2d_draw,
|
||||
menu_display_vita2d_draw_pipeline,
|
||||
menu_display_vita2d_viewport,
|
||||
menu_display_vita2d_blend_begin,
|
||||
menu_display_vita2d_blend_end,
|
||||
menu_display_vita2d_restore_clear_color,
|
||||
menu_display_vita2d_clear_color,
|
||||
menu_display_vita2d_get_default_mvp,
|
||||
menu_display_vita2d_get_default_vertices,
|
||||
menu_display_vita2d_get_default_tex_coords,
|
||||
menu_display_vita2d_font_init_first,
|
||||
MENU_VIDEO_DRIVER_VITA2D,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_vita2d = {
|
||||
gfx_display_vita2d_draw,
|
||||
gfx_display_vita2d_draw_pipeline,
|
||||
gfx_display_vita2d_viewport,
|
||||
gfx_display_vita2d_blend_begin,
|
||||
gfx_display_vita2d_blend_end,
|
||||
gfx_display_vita2d_restore_clear_color,
|
||||
gfx_display_vita2d_clear_color,
|
||||
gfx_display_vita2d_get_default_mvp,
|
||||
gfx_display_vita2d_get_default_vertices,
|
||||
gfx_display_vita2d_get_default_tex_coords,
|
||||
gfx_display_vita2d_font_init_first,
|
||||
GFX_VIDEO_DRIVER_VITA2D,
|
||||
"vita2d",
|
||||
true,
|
||||
menu_display_vita2d_scissor_begin,
|
||||
menu_display_vita2d_scissor_end
|
||||
gfx_display_vita2d_scissor_begin,
|
||||
gfx_display_vita2d_scissor_end
|
||||
};
|
|
@ -20,7 +20,7 @@
|
|||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
@ -48,7 +48,7 @@ static const float vk_colors[] = {
|
|||
1.0f, 1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
static void *menu_display_vk_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_vk_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
vk_t *vk = (vk_t*)video_info->userdata;
|
||||
if (!vk)
|
||||
|
@ -56,50 +56,50 @@ static void *menu_display_vk_get_default_mvp(video_frame_info_t *video_info)
|
|||
return &vk->mvp_no_rot;
|
||||
}
|
||||
|
||||
static const float *menu_display_vk_get_default_vertices(void)
|
||||
static const float *gfx_display_vk_get_default_vertices(void)
|
||||
{
|
||||
return &vk_vertexes[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_vk_get_default_color(void)
|
||||
static const float *gfx_display_vk_get_default_color(void)
|
||||
{
|
||||
return &vk_colors[0];
|
||||
}
|
||||
|
||||
static const float *menu_display_vk_get_default_tex_coords(void)
|
||||
static const float *gfx_display_vk_get_default_tex_coords(void)
|
||||
{
|
||||
return &vk_tex_coords[0];
|
||||
}
|
||||
|
||||
static unsigned to_display_pipeline(
|
||||
enum menu_display_prim_type type, bool blend)
|
||||
enum gfx_display_prim_type type, bool blend)
|
||||
{
|
||||
return ((type == MENU_DISPLAY_PRIM_TRIANGLESTRIP) << 1) | (blend << 0);
|
||||
return ((type == GFX_DISPLAY_PRIM_TRIANGLESTRIP) << 1) | (blend << 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
static unsigned to_menu_pipeline(
|
||||
enum menu_display_prim_type type, unsigned pipeline)
|
||||
enum gfx_display_prim_type type, unsigned pipeline)
|
||||
{
|
||||
switch (pipeline)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
return 4 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
return 4 + (type == GFX_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
return 6 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
return 6 + (type == GFX_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
case VIDEO_SHADER_MENU_3:
|
||||
return 8 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
return 8 + (type == GFX_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
return 10 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
return 10 + (type == GFX_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
return 12 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
return 12 + (type == GFX_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void menu_display_vk_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vk_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
vk_t *vk = (vk_t*)video_info->userdata;
|
||||
|
@ -115,7 +115,7 @@ static void menu_display_vk_viewport(menu_display_ctx_draw_t *draw,
|
|||
vk->vk_vp.maxDepth = 1.0f;
|
||||
}
|
||||
|
||||
static void menu_display_vk_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
|
@ -143,7 +143,7 @@ static void menu_display_vk_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
default:
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
ca = menu_display_get_coords_array();
|
||||
ca = gfx_display_get_coords_array();
|
||||
draw->coords = (struct video_coords*)&ca->coords;
|
||||
draw->pipeline.backend_data = ubo_scratch_data;
|
||||
draw->pipeline.backend_data_size = 2 * sizeof(float);
|
||||
|
@ -164,7 +164,7 @@ static void menu_display_vk_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
|
||||
/* Match UBO layout in shader. */
|
||||
memcpy(ubo_scratch_data,
|
||||
menu_display_vk_get_default_mvp(video_info),
|
||||
gfx_display_vk_get_default_mvp(video_info),
|
||||
sizeof(math_matrix_4x4));
|
||||
memcpy(ubo_scratch_data + sizeof(math_matrix_4x4),
|
||||
output_size,
|
||||
|
@ -182,7 +182,7 @@ static void menu_display_vk_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
+ 3 * sizeof(float), &yflip, sizeof(yflip));
|
||||
draw->coords = &blank_coords;
|
||||
blank_coords.vertices = 4;
|
||||
draw->prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw->prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ static void menu_display_vk_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_vk_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vk_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -211,17 +211,17 @@ static void menu_display_vk_draw(menu_display_ctx_draw_t *draw,
|
|||
color = draw->coords->color;
|
||||
|
||||
if (!vertex)
|
||||
vertex = menu_display_vk_get_default_vertices();
|
||||
vertex = gfx_display_vk_get_default_vertices();
|
||||
if (!tex_coord)
|
||||
tex_coord = menu_display_vk_get_default_tex_coords();
|
||||
tex_coord = gfx_display_vk_get_default_tex_coords();
|
||||
if (!draw->coords->lut_tex_coord)
|
||||
draw->coords->lut_tex_coord = menu_display_vk_get_default_tex_coords();
|
||||
draw->coords->lut_tex_coord = gfx_display_vk_get_default_tex_coords();
|
||||
if (!texture)
|
||||
texture = &vk->display.blank_texture;
|
||||
if (!color)
|
||||
color = menu_display_vk_get_default_color();
|
||||
color = gfx_display_vk_get_default_color();
|
||||
|
||||
menu_display_vk_viewport(draw, video_info);
|
||||
gfx_display_vk_viewport(draw, video_info);
|
||||
|
||||
vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT;
|
||||
|
||||
|
@ -284,7 +284,7 @@ static void menu_display_vk_draw(menu_display_ctx_draw_t *draw,
|
|||
(texture->default_smooth ? vk->samplers.linear
|
||||
: vk->samplers.nearest);
|
||||
call.uniform = draw->matrix_data
|
||||
? draw->matrix_data : menu_display_vk_get_default_mvp(video_info);
|
||||
? draw->matrix_data : gfx_display_vk_get_default_mvp(video_info);
|
||||
call.uniform_size = sizeof(math_matrix_4x4);
|
||||
call.vbo = ⦥
|
||||
call.vertices = draw->coords->vertices;
|
||||
|
@ -295,12 +295,12 @@ static void menu_display_vk_draw(menu_display_ctx_draw_t *draw,
|
|||
}
|
||||
}
|
||||
|
||||
static void menu_display_vk_restore_clear_color(void)
|
||||
static void gfx_display_vk_restore_clear_color(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void menu_display_vk_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_vk_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
VkClearRect rect;
|
||||
|
@ -325,7 +325,7 @@ static void menu_display_vk_clear_color(
|
|||
vkCmdClearAttachments(vk->cmd, 1, &attachment, 1, &rect);
|
||||
}
|
||||
|
||||
static void menu_display_vk_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_vk_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
vk_t *vk = (vk_t*)video_info->userdata;
|
||||
|
||||
|
@ -333,7 +333,7 @@ static void menu_display_vk_blend_begin(video_frame_info_t *video_info)
|
|||
vk->display.blend = true;
|
||||
}
|
||||
|
||||
static void menu_display_vk_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_vk_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
vk_t *vk = (vk_t*)video_info->userdata;
|
||||
|
||||
|
@ -341,7 +341,7 @@ static void menu_display_vk_blend_end(video_frame_info_t *video_info)
|
|||
vk->display.blend = false;
|
||||
}
|
||||
|
||||
static bool menu_display_vk_font_init_first(
|
||||
static bool gfx_display_vk_font_init_first(
|
||||
void **font_handle, void *video_data, const char *font_path,
|
||||
float menu_font_size, bool is_threaded)
|
||||
{
|
||||
|
@ -357,7 +357,7 @@ static bool menu_display_vk_font_init_first(
|
|||
return false;
|
||||
}
|
||||
|
||||
static void menu_display_vk_scissor_begin(video_frame_info_t *video_info,
|
||||
static void gfx_display_vk_scissor_begin(video_frame_info_t *video_info,
|
||||
int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
vk_t *vk = (vk_t*)video_info->userdata;
|
||||
|
@ -370,7 +370,7 @@ static void menu_display_vk_scissor_begin(video_frame_info_t *video_info,
|
|||
vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT;
|
||||
}
|
||||
|
||||
static void menu_display_vk_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_vk_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
vk_t *vk = (vk_t*)video_info->userdata;
|
||||
|
||||
|
@ -378,21 +378,21 @@ static void menu_display_vk_scissor_end(video_frame_info_t *video_info)
|
|||
vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT;
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_vulkan = {
|
||||
menu_display_vk_draw,
|
||||
menu_display_vk_draw_pipeline,
|
||||
menu_display_vk_viewport,
|
||||
menu_display_vk_blend_begin,
|
||||
menu_display_vk_blend_end,
|
||||
menu_display_vk_restore_clear_color,
|
||||
menu_display_vk_clear_color,
|
||||
menu_display_vk_get_default_mvp,
|
||||
menu_display_vk_get_default_vertices,
|
||||
menu_display_vk_get_default_tex_coords,
|
||||
menu_display_vk_font_init_first,
|
||||
MENU_VIDEO_DRIVER_VULKAN,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_vulkan = {
|
||||
gfx_display_vk_draw,
|
||||
gfx_display_vk_draw_pipeline,
|
||||
gfx_display_vk_viewport,
|
||||
gfx_display_vk_blend_begin,
|
||||
gfx_display_vk_blend_end,
|
||||
gfx_display_vk_restore_clear_color,
|
||||
gfx_display_vk_clear_color,
|
||||
gfx_display_vk_get_default_mvp,
|
||||
gfx_display_vk_get_default_vertices,
|
||||
gfx_display_vk_get_default_tex_coords,
|
||||
gfx_display_vk_font_init_first,
|
||||
GFX_VIDEO_DRIVER_VULKAN,
|
||||
"vulkan",
|
||||
false,
|
||||
menu_display_vk_scissor_begin,
|
||||
menu_display_vk_scissor_end
|
||||
gfx_display_vk_scissor_begin,
|
||||
gfx_display_vk_scissor_end
|
||||
};
|
|
@ -20,7 +20,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../gfx_display.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
|
@ -28,38 +28,38 @@
|
|||
#include "../../wiiu/system/memory.h"
|
||||
#include "../../wiiu/wiiu_dbg.h"
|
||||
|
||||
static const float *menu_display_wiiu_get_default_vertices(void)
|
||||
static const float *gfx_display_wiiu_get_default_vertices(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const float *menu_display_wiiu_get_default_tex_coords(void)
|
||||
static const float *gfx_display_wiiu_get_default_tex_coords(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *menu_display_wiiu_get_default_mvp(video_frame_info_t *video_info)
|
||||
static void *gfx_display_wiiu_get_default_mvp(video_frame_info_t *video_info)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_blend_begin(video_frame_info_t *video_info)
|
||||
static void gfx_display_wiiu_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_blend_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_wiiu_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_wiiu_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
wiiu_video_t *wiiu = (wiiu_video_t*)video_info->userdata;
|
||||
|
@ -228,7 +228,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
|
|||
sizeof(*wiiu->vertex_cache.v), wiiu->vertex_cache.v);
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_wiiu_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
video_coord_array_t *ca = NULL;
|
||||
|
@ -241,7 +241,7 @@ static void menu_display_wiiu_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
ca = menu_display_get_coords_array();
|
||||
ca = gfx_display_get_coords_array();
|
||||
if (!wiiu->menu_shader_vbo)
|
||||
{
|
||||
wiiu->menu_shader_vbo = MEM2_alloc(ca->coords.vertices * 2 * sizeof(float), GX2_VERTEX_BUFFER_ALIGNMENT);
|
||||
|
@ -282,15 +282,15 @@ static void menu_display_wiiu_draw_pipeline(menu_display_ctx_draw_t *draw,
|
|||
GX2SetPixelUniformBlock(1, sizeof(*wiiu->menu_shader_ubo), wiiu->menu_shader_ubo);
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_restore_clear_color(void)
|
||||
static void gfx_display_wiiu_restore_clear_color(void)
|
||||
{
|
||||
#if 0
|
||||
wiiu_set_clear_color(RGBA8(0x00, 0x00, 0x00, 0xFF));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_clear_color(
|
||||
menu_display_ctx_clearcolor_t *clearcolor,
|
||||
static void gfx_display_wiiu_clear_color(
|
||||
gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!clearcolor)
|
||||
|
@ -304,7 +304,7 @@ static void menu_display_wiiu_clear_color(
|
|||
#endif
|
||||
}
|
||||
|
||||
static bool menu_display_wiiu_font_init_first(
|
||||
static bool gfx_display_wiiu_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -317,32 +317,32 @@ static bool menu_display_wiiu_font_init_first(
|
|||
return *handle;
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_scissor_begin(video_frame_info_t *video_info, int x, int y,
|
||||
static void gfx_display_wiiu_scissor_begin(video_frame_info_t *video_info, int x, int y,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
GX2SetScissor(MAX(x, 0), MAX(video_info->height - y - height, 0), MIN(width, video_info->width), MIN(height, video_info->height));
|
||||
}
|
||||
|
||||
static void menu_display_wiiu_scissor_end(video_frame_info_t *video_info)
|
||||
static void gfx_display_wiiu_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
GX2SetScissor(0, 0, video_info->width, video_info->height);
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_wiiu = {
|
||||
menu_display_wiiu_draw,
|
||||
menu_display_wiiu_draw_pipeline,
|
||||
menu_display_wiiu_viewport,
|
||||
menu_display_wiiu_blend_begin,
|
||||
menu_display_wiiu_blend_end,
|
||||
menu_display_wiiu_restore_clear_color,
|
||||
menu_display_wiiu_clear_color,
|
||||
menu_display_wiiu_get_default_mvp,
|
||||
menu_display_wiiu_get_default_vertices,
|
||||
menu_display_wiiu_get_default_tex_coords,
|
||||
menu_display_wiiu_font_init_first,
|
||||
MENU_VIDEO_DRIVER_WIIU,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_wiiu = {
|
||||
gfx_display_wiiu_draw,
|
||||
gfx_display_wiiu_draw_pipeline,
|
||||
gfx_display_wiiu_viewport,
|
||||
gfx_display_wiiu_blend_begin,
|
||||
gfx_display_wiiu_blend_end,
|
||||
gfx_display_wiiu_restore_clear_color,
|
||||
gfx_display_wiiu_clear_color,
|
||||
gfx_display_wiiu_get_default_mvp,
|
||||
gfx_display_wiiu_get_default_vertices,
|
||||
gfx_display_wiiu_get_default_tex_coords,
|
||||
gfx_display_wiiu_font_init_first,
|
||||
GFX_VIDEO_DRIVER_WIIU,
|
||||
"gx2",
|
||||
true,
|
||||
menu_display_wiiu_scissor_begin,
|
||||
menu_display_wiiu_scissor_end
|
||||
gfx_display_wiiu_scissor_begin,
|
||||
gfx_display_wiiu_scissor_end
|
||||
};
|
|
@ -31,37 +31,37 @@ float osk_dark[16] = {
|
|||
0.00, 0.00, 0.00, 0.85,
|
||||
};
|
||||
|
||||
uintptr_t menu_display_white_texture;
|
||||
uintptr_t gfx_display_white_texture;
|
||||
|
||||
static bool menu_display_has_windowed = false;
|
||||
static bool gfx_display_has_windowed = false;
|
||||
|
||||
/* Width, height and pitch of the menu framebuffer */
|
||||
static unsigned menu_display_framebuf_width = 0;
|
||||
static unsigned menu_display_framebuf_height = 0;
|
||||
static size_t menu_display_framebuf_pitch = 0;
|
||||
static unsigned gfx_display_framebuf_width = 0;
|
||||
static unsigned gfx_display_framebuf_height = 0;
|
||||
static size_t gfx_display_framebuf_pitch = 0;
|
||||
|
||||
/* Height of the menu display header */
|
||||
static unsigned menu_display_header_height = 0;
|
||||
static unsigned gfx_display_header_height = 0;
|
||||
|
||||
static bool menu_display_msg_force = false;
|
||||
static bool menu_display_framebuf_dirty = false;
|
||||
static bool gfx_display_msg_force = false;
|
||||
static bool gfx_display_framebuf_dirty = false;
|
||||
|
||||
|
||||
static video_coord_array_t menu_disp_ca;
|
||||
|
||||
static void *menu_display_null_get_default_mvp(video_frame_info_t *video_info) { return NULL; }
|
||||
static void menu_display_null_blend_begin(video_frame_info_t *video_info) { }
|
||||
static void menu_display_null_blend_end(video_frame_info_t *video_info) { }
|
||||
static void menu_display_null_draw(menu_display_ctx_draw_t *draw,
|
||||
static void *gfx_display_null_get_default_mvp(video_frame_info_t *video_info) { return NULL; }
|
||||
static void gfx_display_null_blend_begin(video_frame_info_t *video_info) { }
|
||||
static void gfx_display_null_blend_end(video_frame_info_t *video_info) { }
|
||||
static void gfx_display_null_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info) { }
|
||||
static void menu_display_null_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_null_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info) { }
|
||||
static void menu_display_null_viewport(menu_display_ctx_draw_t *draw,
|
||||
static void gfx_display_null_viewport(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info) { }
|
||||
static void menu_display_null_restore_clear_color(void) { }
|
||||
static void menu_display_null_clear_color(menu_display_ctx_clearcolor_t *clearcolor, video_frame_info_t *video_info) { }
|
||||
static void gfx_display_null_restore_clear_color(void) { }
|
||||
static void gfx_display_null_clear_color(gfx_display_ctx_clearcolor_t *clearcolor, video_frame_info_t *video_info) { }
|
||||
|
||||
static bool menu_display_null_font_init_first(
|
||||
static bool gfx_display_null_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
|
@ -75,31 +75,31 @@ static bool menu_display_null_font_init_first(
|
|||
return false;
|
||||
}
|
||||
|
||||
static const float *menu_display_null_get_default_vertices(void)
|
||||
static const float *gfx_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 const float *gfx_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_pipeline,
|
||||
menu_display_null_viewport,
|
||||
menu_display_null_blend_begin,
|
||||
menu_display_null_blend_end,
|
||||
menu_display_null_restore_clear_color,
|
||||
menu_display_null_clear_color,
|
||||
menu_display_null_get_default_mvp,
|
||||
menu_display_null_get_default_vertices,
|
||||
menu_display_null_get_default_tex_coords,
|
||||
menu_display_null_font_init_first,
|
||||
MENU_VIDEO_DRIVER_GENERIC,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_null = {
|
||||
gfx_display_null_draw,
|
||||
gfx_display_null_draw_pipeline,
|
||||
gfx_display_null_viewport,
|
||||
gfx_display_null_blend_begin,
|
||||
gfx_display_null_blend_end,
|
||||
gfx_display_null_restore_clear_color,
|
||||
gfx_display_null_clear_color,
|
||||
gfx_display_null_get_default_mvp,
|
||||
gfx_display_null_get_default_vertices,
|
||||
gfx_display_null_get_default_tex_coords,
|
||||
gfx_display_null_font_init_first,
|
||||
GFX_VIDEO_DRIVER_GENERIC,
|
||||
"null",
|
||||
false,
|
||||
NULL,
|
||||
|
@ -107,64 +107,64 @@ menu_display_ctx_driver_t menu_display_ctx_null = {
|
|||
};
|
||||
|
||||
/* Menu display drivers */
|
||||
static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = {
|
||||
static gfx_display_ctx_driver_t *gfx_display_ctx_drivers[] = {
|
||||
#ifdef HAVE_D3D8
|
||||
&menu_display_ctx_d3d8,
|
||||
&gfx_display_ctx_d3d8,
|
||||
#endif
|
||||
#ifdef HAVE_D3D9
|
||||
&menu_display_ctx_d3d9,
|
||||
&gfx_display_ctx_d3d9,
|
||||
#endif
|
||||
#ifdef HAVE_D3D10
|
||||
&menu_display_ctx_d3d10,
|
||||
&gfx_display_ctx_d3d10,
|
||||
#endif
|
||||
#ifdef HAVE_D3D11
|
||||
&menu_display_ctx_d3d11,
|
||||
&gfx_display_ctx_d3d11,
|
||||
#endif
|
||||
#ifdef HAVE_D3D12
|
||||
&menu_display_ctx_d3d12,
|
||||
&gfx_display_ctx_d3d12,
|
||||
#endif
|
||||
#ifdef HAVE_OPENGL
|
||||
&menu_display_ctx_gl,
|
||||
&gfx_display_ctx_gl,
|
||||
#endif
|
||||
#ifdef HAVE_OPENGL1
|
||||
&menu_display_ctx_gl1,
|
||||
&gfx_display_ctx_gl1,
|
||||
#endif
|
||||
#ifdef HAVE_OPENGL_CORE
|
||||
&menu_display_ctx_gl_core,
|
||||
&gfx_display_ctx_gl_core,
|
||||
#endif
|
||||
#ifdef HAVE_VULKAN
|
||||
&menu_display_ctx_vulkan,
|
||||
&gfx_display_ctx_vulkan,
|
||||
#endif
|
||||
#ifdef HAVE_METAL
|
||||
&menu_display_ctx_metal,
|
||||
&gfx_display_ctx_metal,
|
||||
#endif
|
||||
#ifdef HAVE_VITA2D
|
||||
&menu_display_ctx_vita2d,
|
||||
&gfx_display_ctx_vita2d,
|
||||
#endif
|
||||
#ifdef _3DS
|
||||
&menu_display_ctx_ctr,
|
||||
&gfx_display_ctx_ctr,
|
||||
#endif
|
||||
#ifdef WIIU
|
||||
&menu_display_ctx_wiiu,
|
||||
&gfx_display_ctx_wiiu,
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#ifdef HAVE_GDI
|
||||
&menu_display_ctx_gdi,
|
||||
&gfx_display_ctx_gdi,
|
||||
#endif
|
||||
#endif
|
||||
&menu_display_ctx_null,
|
||||
&gfx_display_ctx_null,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static menu_display_ctx_driver_t *menu_disp = NULL;
|
||||
static gfx_display_ctx_driver_t *menu_disp = NULL;
|
||||
|
||||
static INLINE float menu_display_scalef(float val,
|
||||
static INLINE float gfx_display_scalef(float val,
|
||||
float oldmin, float oldmax, float newmin, float newmax)
|
||||
{
|
||||
return (((val - oldmin) * (newmax - newmin)) / (oldmax - oldmin)) + newmin;
|
||||
}
|
||||
|
||||
static INLINE float menu_display_randf(float min, float max)
|
||||
static INLINE float gfx_display_randf(float min, float max)
|
||||
{
|
||||
return (rand() * ((max - min) / RAND_MAX)) + min;
|
||||
}
|
||||
|
@ -172,73 +172,73 @@ static INLINE float menu_display_randf(float min, float max)
|
|||
|
||||
/* Check if the current menu driver is compatible
|
||||
* with your video driver. */
|
||||
static bool menu_display_check_compatibility(
|
||||
enum menu_display_driver_type type,
|
||||
static bool gfx_display_check_compatibility(
|
||||
enum gfx_display_driver_type type,
|
||||
bool video_is_threaded)
|
||||
{
|
||||
const char *video_driver = video_driver_get_ident();
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case MENU_VIDEO_DRIVER_GENERIC:
|
||||
case GFX_VIDEO_DRIVER_GENERIC:
|
||||
return true;
|
||||
case MENU_VIDEO_DRIVER_OPENGL:
|
||||
case GFX_VIDEO_DRIVER_OPENGL:
|
||||
if (string_is_equal(video_driver, "gl"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_OPENGL1:
|
||||
case GFX_VIDEO_DRIVER_OPENGL1:
|
||||
if (string_is_equal(video_driver, "gl1"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_OPENGL_CORE:
|
||||
case GFX_VIDEO_DRIVER_OPENGL_CORE:
|
||||
if (string_is_equal(video_driver, "glcore"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_VULKAN:
|
||||
case GFX_VIDEO_DRIVER_VULKAN:
|
||||
if (string_is_equal(video_driver, "vulkan"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_METAL:
|
||||
case GFX_VIDEO_DRIVER_METAL:
|
||||
if (string_is_equal(video_driver, "metal"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_DIRECT3D8:
|
||||
case GFX_VIDEO_DRIVER_DIRECT3D8:
|
||||
if (string_is_equal(video_driver, "d3d8"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_DIRECT3D9:
|
||||
case GFX_VIDEO_DRIVER_DIRECT3D9:
|
||||
if (string_is_equal(video_driver, "d3d9"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_DIRECT3D10:
|
||||
case GFX_VIDEO_DRIVER_DIRECT3D10:
|
||||
if (string_is_equal(video_driver, "d3d10"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_DIRECT3D11:
|
||||
case GFX_VIDEO_DRIVER_DIRECT3D11:
|
||||
if (string_is_equal(video_driver, "d3d11"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_DIRECT3D12:
|
||||
case GFX_VIDEO_DRIVER_DIRECT3D12:
|
||||
if (string_is_equal(video_driver, "d3d12"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_VITA2D:
|
||||
case GFX_VIDEO_DRIVER_VITA2D:
|
||||
if (string_is_equal(video_driver, "vita2d"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_CTR:
|
||||
case GFX_VIDEO_DRIVER_CTR:
|
||||
if (string_is_equal(video_driver, "ctr"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_WIIU:
|
||||
case GFX_VIDEO_DRIVER_WIIU:
|
||||
if (string_is_equal(video_driver, "gx2"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_GDI:
|
||||
case GFX_VIDEO_DRIVER_GDI:
|
||||
if (string_is_equal(video_driver, "gdi"))
|
||||
return true;
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_SWITCH:
|
||||
case GFX_VIDEO_DRIVER_SWITCH:
|
||||
if (string_is_equal(video_driver, "switch"))
|
||||
return true;
|
||||
break;
|
||||
|
@ -249,33 +249,33 @@ static bool menu_display_check_compatibility(
|
|||
|
||||
/* Reset the menu's coordinate array vertices.
|
||||
* NOTE: Not every menu driver uses this. */
|
||||
void menu_display_coords_array_reset(void)
|
||||
void gfx_display_coords_array_reset(void)
|
||||
{
|
||||
menu_disp_ca.coords.vertices = 0;
|
||||
}
|
||||
|
||||
video_coord_array_t *menu_display_get_coords_array(void)
|
||||
video_coord_array_t *gfx_display_get_coords_array(void)
|
||||
{
|
||||
return &menu_disp_ca;
|
||||
}
|
||||
|
||||
|
||||
/* Begin blending operation */
|
||||
void menu_display_blend_begin(video_frame_info_t *video_info)
|
||||
void gfx_display_blend_begin(video_frame_info_t *video_info)
|
||||
{
|
||||
if (menu_disp && menu_disp->blend_begin)
|
||||
menu_disp->blend_begin(video_info);
|
||||
}
|
||||
|
||||
/* End blending operation */
|
||||
void menu_display_blend_end(video_frame_info_t *video_info)
|
||||
void gfx_display_blend_end(video_frame_info_t *video_info)
|
||||
{
|
||||
if (menu_disp && menu_disp->blend_end)
|
||||
menu_disp->blend_end(video_info);
|
||||
}
|
||||
|
||||
/* Begin scissoring operation */
|
||||
void menu_display_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
void gfx_display_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
if (menu_disp && menu_disp->scissor_begin)
|
||||
{
|
||||
|
@ -315,13 +315,13 @@ void menu_display_scissor_begin(video_frame_info_t *video_info, int x, int y, un
|
|||
}
|
||||
|
||||
/* End scissoring operation */
|
||||
void menu_display_scissor_end(video_frame_info_t *video_info)
|
||||
void gfx_display_scissor_end(video_frame_info_t *video_info)
|
||||
{
|
||||
if (menu_disp && menu_disp->scissor_end)
|
||||
menu_disp->scissor_end(video_info);
|
||||
}
|
||||
|
||||
font_data_t *menu_display_font_file(
|
||||
font_data_t *gfx_display_font_file(
|
||||
char* fontpath, float menu_font_size, bool is_threaded)
|
||||
{
|
||||
font_data_t *font_data = NULL;
|
||||
|
@ -337,7 +337,7 @@ font_data_t *menu_display_font_file(
|
|||
return font_data;
|
||||
}
|
||||
|
||||
bool menu_display_restore_clear_color(void)
|
||||
bool gfx_display_restore_clear_color(void)
|
||||
{
|
||||
if (!menu_disp || !menu_disp->restore_clear_color)
|
||||
return false;
|
||||
|
@ -345,14 +345,14 @@ bool menu_display_restore_clear_color(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
void menu_display_clear_color(menu_display_ctx_clearcolor_t *color,
|
||||
void gfx_display_clear_color(gfx_display_ctx_clearcolor_t *color,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (menu_disp && menu_disp->clear_color)
|
||||
menu_disp->clear_color(color, video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!menu_disp || !draw || !menu_disp->draw)
|
||||
|
@ -365,7 +365,7 @@ void menu_display_draw(menu_display_ctx_draw_t *draw,
|
|||
menu_disp->draw(draw, video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_blend(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_blend(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (!menu_disp || !draw || !menu_disp->draw)
|
||||
|
@ -375,19 +375,19 @@ void menu_display_draw_blend(menu_display_ctx_draw_t *draw,
|
|||
return;
|
||||
if (draw->width <= 0)
|
||||
return;
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
menu_disp->draw(draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
if (menu_disp && draw && menu_disp->draw_pipeline)
|
||||
menu_disp->draw_pipeline(draw, video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_bg(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_bg(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info, bool add_opacity_to_wallpaper,
|
||||
float override_opacity)
|
||||
{
|
||||
|
@ -419,34 +419,34 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw,
|
|||
add_opacity_to_wallpaper = true;
|
||||
|
||||
if (add_opacity_to_wallpaper)
|
||||
menu_display_set_alpha(draw->color, override_opacity);
|
||||
gfx_display_set_alpha(draw->color, override_opacity);
|
||||
|
||||
if (!draw->texture)
|
||||
draw->texture = menu_display_white_texture;
|
||||
draw->texture = gfx_display_white_texture;
|
||||
|
||||
if (menu_disp && menu_disp->get_default_mvp)
|
||||
draw->matrix_data = (math_matrix_4x4*)menu_disp->get_default_mvp(video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_gradient(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_gradient(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
draw->texture = 0;
|
||||
draw->x = 0;
|
||||
draw->y = 0;
|
||||
|
||||
menu_display_draw_bg(draw, video_info, false,
|
||||
gfx_display_draw_bg(draw, video_info, false,
|
||||
video_info->menu_wallpaper_opacity);
|
||||
menu_display_draw(draw, video_info);
|
||||
gfx_display_draw(draw, video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_quad(
|
||||
void gfx_display_draw_quad(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
|
||||
coords.vertices = 4;
|
||||
|
@ -464,19 +464,19 @@ void menu_display_draw_quad(
|
|||
draw.height = h;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.scale_factor = 1.0f;
|
||||
draw.rotation = 0.0f;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
if (menu_disp && menu_disp->blend_end)
|
||||
menu_disp->blend_end(video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_polygon(
|
||||
void gfx_display_draw_polygon(
|
||||
video_frame_info_t *video_info,
|
||||
int x1, int y1,
|
||||
int x2, int y2,
|
||||
|
@ -485,7 +485,7 @@ void menu_display_draw_polygon(
|
|||
unsigned width, unsigned height,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
|
||||
float vertex[8];
|
||||
|
@ -514,26 +514,26 @@ void menu_display_draw_polygon(
|
|||
draw.height = height;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.scale_factor = 1.0f;
|
||||
draw.rotation = 0.0f;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
if (menu_disp && menu_disp->blend_end)
|
||||
menu_disp->blend_end(video_info);
|
||||
}
|
||||
|
||||
void menu_display_draw_texture(
|
||||
void gfx_display_draw_texture(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color, uintptr_t texture)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
rotate_draw.matrix = &mymat;
|
||||
|
@ -550,30 +550,30 @@ void menu_display_draw_texture(
|
|||
draw.height = h;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
coords.color = (const float*)color;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
draw.texture = texture;
|
||||
draw.x = x;
|
||||
draw.y = height - y;
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
/* Draw the texture split into 9 sections, without scaling the corners.
|
||||
* The middle sections will only scale in the X axis, and the side
|
||||
* sections will only scale in the Y axis. */
|
||||
void menu_display_draw_texture_slice(
|
||||
void gfx_display_draw_texture_slice(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned new_w, unsigned new_h,
|
||||
unsigned width, unsigned height,
|
||||
float *color, unsigned offset, float scale_factor, uintptr_t texture)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
unsigned i;
|
||||
|
@ -637,11 +637,11 @@ void menu_display_draw_texture_slice(
|
|||
draw.height = height;
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
coords.color = (const float*)(color == NULL ? colors : color);
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
draw.texture = texture;
|
||||
draw.x = 0;
|
||||
|
@ -672,7 +672,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0];
|
||||
tex_coord[7] = T_TR[1];
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* top-middle section */
|
||||
vert_coord[0] = V_BL[0] + vert_woff;
|
||||
|
@ -693,7 +693,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0] + tex_mid_width;
|
||||
tex_coord[7] = T_TR[1];
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* top-right corner */
|
||||
vert_coord[0] = V_BL[0] + vert_woff + vert_scaled_mid_width;
|
||||
|
@ -714,7 +714,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0] + tex_mid_width + tex_woff;
|
||||
tex_coord[7] = T_TR[1];
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* middle-left section */
|
||||
vert_coord[0] = V_BL[0];
|
||||
|
@ -735,7 +735,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0];
|
||||
tex_coord[7] = T_TR[1] + tex_hoff;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* center section */
|
||||
vert_coord[0] = V_BL[0] + vert_woff;
|
||||
|
@ -756,7 +756,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0] + tex_mid_width;
|
||||
tex_coord[7] = T_TR[1] + tex_hoff;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* middle-right section */
|
||||
vert_coord[0] = V_BL[0] + vert_woff + vert_scaled_mid_width;
|
||||
|
@ -777,7 +777,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0] + tex_woff + tex_mid_width;
|
||||
tex_coord[7] = T_TR[1] + tex_hoff;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* bottom-left corner */
|
||||
vert_coord[0] = V_BL[0];
|
||||
|
@ -798,7 +798,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0];
|
||||
tex_coord[7] = T_TR[1] + tex_hoff + tex_mid_height;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* bottom-middle section */
|
||||
vert_coord[0] = V_BL[0] + vert_woff;
|
||||
|
@ -819,7 +819,7 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0] + tex_mid_width;
|
||||
tex_coord[7] = T_TR[1] + tex_hoff + tex_mid_height;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
/* bottom-right corner */
|
||||
vert_coord[0] = V_BL[0] + vert_woff + vert_scaled_mid_width;
|
||||
|
@ -840,14 +840,14 @@ void menu_display_draw_texture_slice(
|
|||
tex_coord[6] = T_TR[0] + tex_woff + tex_mid_width;
|
||||
tex_coord[7] = T_TR[1] + tex_hoff + tex_mid_height;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
free(colors);
|
||||
free(vert_coord);
|
||||
free(tex_coord);
|
||||
}
|
||||
|
||||
void menu_display_rotate_z(menu_display_ctx_rotate_draw_t *draw,
|
||||
void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
math_matrix_4x4 matrix_rotated, matrix_scaled;
|
||||
|
@ -880,16 +880,16 @@ void menu_display_rotate_z(menu_display_ctx_rotate_draw_t *draw,
|
|||
/*
|
||||
* Draw a hardware cursor on top of the screen for the mouse.
|
||||
*/
|
||||
void menu_display_draw_cursor(
|
||||
void gfx_display_draw_cursor(
|
||||
video_frame_info_t *video_info,
|
||||
float *color, float cursor_size, uintptr_t texture,
|
||||
float x, float y, unsigned width, unsigned height)
|
||||
{
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool cursor_visible = settings->bools.video_fullscreen ||
|
||||
!menu_display_has_windowed;
|
||||
!gfx_display_has_windowed;
|
||||
if (!settings->bools.menu_mouse_enable || !cursor_visible)
|
||||
return;
|
||||
|
||||
|
@ -909,16 +909,16 @@ void menu_display_draw_cursor(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
|
||||
if (menu_disp && menu_disp->blend_end)
|
||||
menu_disp->blend_end(video_info);
|
||||
}
|
||||
|
||||
void menu_display_push_quad(
|
||||
void gfx_display_push_quad(
|
||||
unsigned width, unsigned height,
|
||||
const float *colors, int x1, int y1,
|
||||
int x2, int y2)
|
||||
|
@ -956,7 +956,7 @@ void menu_display_push_quad(
|
|||
video_coord_array_append(ca, &coords, 3);
|
||||
}
|
||||
|
||||
void menu_display_snow(
|
||||
void gfx_display_snow(
|
||||
int16_t pointer_x,
|
||||
int16_t pointer_y,
|
||||
int width, int height)
|
||||
|
@ -984,7 +984,7 @@ void menu_display_snow(
|
|||
#endif
|
||||
|
||||
p->y += p->yspeed;
|
||||
p->x += menu_display_scalef(
|
||||
p->x += gfx_display_scalef(
|
||||
pointer_x, 0, width, -0.3, 0.3);
|
||||
p->x += p->xspeed;
|
||||
|
||||
|
@ -993,8 +993,8 @@ void menu_display_snow(
|
|||
}
|
||||
else if (max_gen > 0 && timeout <= 0)
|
||||
{
|
||||
p->xspeed = menu_display_randf(-0.2, 0.2);
|
||||
p->yspeed = menu_display_randf(1, 2);
|
||||
p->xspeed = gfx_display_randf(-0.2, 0.2);
|
||||
p->yspeed = gfx_display_randf(1, 2);
|
||||
p->y = 0;
|
||||
p->x = rand() % width;
|
||||
p->alpha = (float)rand() / (float)RAND_MAX;
|
||||
|
@ -1018,7 +1018,7 @@ void menu_display_snow(
|
|||
if (!p->alive)
|
||||
continue;
|
||||
|
||||
alpha = menu_display_randf(0, 100) > 90 ?
|
||||
alpha = gfx_display_randf(0, 100) > 90 ?
|
||||
p->alpha/2 : p->alpha;
|
||||
|
||||
for (j = 0; j < 16; j++)
|
||||
|
@ -1028,7 +1028,7 @@ void menu_display_snow(
|
|||
colors[j] = alpha;
|
||||
}
|
||||
|
||||
menu_display_push_quad(width, height,
|
||||
gfx_display_push_quad(width, height,
|
||||
colors, p->x-2, p->y-2, p->x+2, p->y+2);
|
||||
|
||||
j++;
|
||||
|
@ -1037,7 +1037,7 @@ void menu_display_snow(
|
|||
|
||||
/* Setup: Initializes the font associated
|
||||
* to the menu driver */
|
||||
font_data_t *menu_display_font(
|
||||
font_data_t *gfx_display_font(
|
||||
enum application_special_type type,
|
||||
float menu_font_size,
|
||||
bool is_threaded)
|
||||
|
@ -1052,11 +1052,11 @@ font_data_t *menu_display_font(
|
|||
fill_pathname_application_special(
|
||||
fontpath, sizeof(fontpath), type);
|
||||
|
||||
return menu_display_font_file(fontpath, menu_font_size, is_threaded);
|
||||
return gfx_display_font_file(fontpath, menu_font_size, is_threaded);
|
||||
}
|
||||
|
||||
/* Returns the OSK key at a given position */
|
||||
int menu_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
int gfx_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -1081,54 +1081,54 @@ int menu_display_osk_ptr_at_pos(void *data, int x, int y,
|
|||
}
|
||||
|
||||
/* Get the menu framebuffer's size dimensions. */
|
||||
void menu_display_get_fb_size(unsigned *fb_width,
|
||||
void gfx_display_get_fb_size(unsigned *fb_width,
|
||||
unsigned *fb_height, size_t *fb_pitch)
|
||||
{
|
||||
*fb_width = menu_display_framebuf_width;
|
||||
*fb_height = menu_display_framebuf_height;
|
||||
*fb_pitch = menu_display_framebuf_pitch;
|
||||
*fb_width = gfx_display_framebuf_width;
|
||||
*fb_height = gfx_display_framebuf_height;
|
||||
*fb_pitch = gfx_display_framebuf_pitch;
|
||||
}
|
||||
|
||||
/* Set the menu framebuffer's width. */
|
||||
void menu_display_set_width(unsigned width)
|
||||
void gfx_display_set_width(unsigned width)
|
||||
{
|
||||
menu_display_framebuf_width = width;
|
||||
gfx_display_framebuf_width = width;
|
||||
}
|
||||
|
||||
/* Set the menu framebuffer's height. */
|
||||
void menu_display_set_height(unsigned height)
|
||||
void gfx_display_set_height(unsigned height)
|
||||
{
|
||||
menu_display_framebuf_height = height;
|
||||
gfx_display_framebuf_height = height;
|
||||
}
|
||||
|
||||
void menu_display_set_header_height(unsigned height)
|
||||
void gfx_display_set_header_height(unsigned height)
|
||||
{
|
||||
menu_display_header_height = height;
|
||||
gfx_display_header_height = height;
|
||||
}
|
||||
|
||||
unsigned menu_display_get_header_height(void)
|
||||
unsigned gfx_display_get_header_height(void)
|
||||
{
|
||||
return menu_display_header_height;
|
||||
return gfx_display_header_height;
|
||||
}
|
||||
|
||||
size_t menu_display_get_framebuffer_pitch(void)
|
||||
size_t gfx_display_get_framebuffer_pitch(void)
|
||||
{
|
||||
return menu_display_framebuf_pitch;
|
||||
return gfx_display_framebuf_pitch;
|
||||
}
|
||||
|
||||
void menu_display_set_framebuffer_pitch(size_t pitch)
|
||||
void gfx_display_set_framebuffer_pitch(size_t pitch)
|
||||
{
|
||||
menu_display_framebuf_pitch = pitch;
|
||||
gfx_display_framebuf_pitch = pitch;
|
||||
}
|
||||
|
||||
bool menu_display_get_msg_force(void)
|
||||
bool gfx_display_get_msg_force(void)
|
||||
{
|
||||
return menu_display_msg_force;
|
||||
return gfx_display_msg_force;
|
||||
}
|
||||
|
||||
void menu_display_set_msg_force(bool state)
|
||||
void gfx_display_set_msg_force(bool state)
|
||||
{
|
||||
menu_display_msg_force = state;
|
||||
gfx_display_msg_force = state;
|
||||
}
|
||||
|
||||
/* Returns true if an animation is still active or
|
||||
|
@ -1139,19 +1139,19 @@ void menu_display_set_msg_force(bool state)
|
|||
* so that we don't have to render the menu graphics per-frame
|
||||
* unless a change has happened.
|
||||
* */
|
||||
bool menu_display_get_update_pending(void)
|
||||
bool gfx_display_get_update_pending(void)
|
||||
{
|
||||
if (gfx_animation_is_active() || menu_display_framebuf_dirty)
|
||||
if (gfx_animation_is_active() || gfx_display_framebuf_dirty)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void menu_display_set_viewport(unsigned width, unsigned height)
|
||||
void gfx_display_set_viewport(unsigned width, unsigned height)
|
||||
{
|
||||
video_driver_set_viewport(width, height, true, false);
|
||||
}
|
||||
|
||||
void menu_display_unset_viewport(unsigned width, unsigned height)
|
||||
void gfx_display_unset_viewport(unsigned width, unsigned height)
|
||||
{
|
||||
video_driver_set_viewport(width, height, false, true);
|
||||
}
|
||||
|
@ -1159,24 +1159,24 @@ void menu_display_unset_viewport(unsigned width, unsigned height)
|
|||
/* Checks if the menu framebuffer has its 'dirty flag' set. This
|
||||
* means that the current contents of the framebuffer has changed
|
||||
* and that it has to be rendered to the screen. */
|
||||
bool menu_display_get_framebuffer_dirty_flag(void)
|
||||
bool gfx_display_get_framebuffer_dirty_flag(void)
|
||||
{
|
||||
return menu_display_framebuf_dirty;
|
||||
return gfx_display_framebuf_dirty;
|
||||
}
|
||||
|
||||
/* Set the menu framebuffer's 'dirty flag'. */
|
||||
void menu_display_set_framebuffer_dirty_flag(void)
|
||||
void gfx_display_set_framebuffer_dirty_flag(void)
|
||||
{
|
||||
menu_display_framebuf_dirty = true;
|
||||
gfx_display_framebuf_dirty = true;
|
||||
}
|
||||
|
||||
/* Unset the menu framebufer's 'dirty flag'. */
|
||||
void menu_display_unset_framebuffer_dirty_flag(void)
|
||||
void gfx_display_unset_framebuffer_dirty_flag(void)
|
||||
{
|
||||
menu_display_framebuf_dirty = false;
|
||||
gfx_display_framebuf_dirty = false;
|
||||
}
|
||||
|
||||
void menu_display_draw_keyboard(
|
||||
void gfx_display_draw_keyboard(
|
||||
uintptr_t hover_texture,
|
||||
const font_data_t *font,
|
||||
video_frame_info_t *video_info,
|
||||
|
@ -1195,7 +1195,7 @@ void menu_display_draw_keyboard(
|
|||
1.00, 1.00, 1.00, 1.00,
|
||||
};
|
||||
|
||||
menu_display_draw_quad(
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
0, height/2.0, width, height/2.0,
|
||||
width, height,
|
||||
|
@ -1214,9 +1214,9 @@ void menu_display_draw_keyboard(
|
|||
|
||||
if (i == id)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
menu_display_draw_texture(
|
||||
gfx_display_draw_texture(
|
||||
video_info,
|
||||
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width,
|
||||
height/2.0 + ptr_height*1.5 + line_y,
|
||||
|
@ -1225,12 +1225,12 @@ void menu_display_draw_keyboard(
|
|||
&white[0],
|
||||
hover_texture);
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
color = text_color;
|
||||
}
|
||||
|
||||
menu_display_draw_text(font, grid[i],
|
||||
gfx_display_draw_text(font, grid[i],
|
||||
width/2.0 - (11*ptr_width)/2.0 + (i % 11)
|
||||
* ptr_width + ptr_width/2.0,
|
||||
height/2.0 + ptr_height + line_y + font->size / 3,
|
||||
|
@ -1241,7 +1241,7 @@ void menu_display_draw_keyboard(
|
|||
|
||||
/* Draw text on top of the screen.
|
||||
*/
|
||||
void menu_display_draw_text(
|
||||
void gfx_display_draw_text(
|
||||
const font_data_t *font, const char *text,
|
||||
float x, float y, int width, int height,
|
||||
uint32_t color, enum text_alignment text_align,
|
||||
|
@ -1280,7 +1280,7 @@ void menu_display_draw_text(
|
|||
video_driver_set_osd_msg(text, ¶ms, (void*)font);
|
||||
}
|
||||
|
||||
bool menu_display_reset_textures_list(
|
||||
bool gfx_display_reset_textures_list(
|
||||
const char *texture_path, const char *iconpath,
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
unsigned *width, unsigned *height)
|
||||
|
@ -1318,7 +1318,7 @@ bool menu_display_reset_textures_list(
|
|||
}
|
||||
|
||||
|
||||
bool menu_display_reset_textures_list_buffer(
|
||||
bool gfx_display_reset_textures_list_buffer(
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
void* buffer, unsigned buffer_len, enum image_type_enum image_type,
|
||||
unsigned *width, unsigned *height)
|
||||
|
@ -1348,13 +1348,13 @@ bool menu_display_reset_textures_list_buffer(
|
|||
|
||||
/* Teardown; deinitializes and frees all
|
||||
* fonts associated to the menu driver */
|
||||
void menu_display_font_free(font_data_t *font)
|
||||
void gfx_display_font_free(font_data_t *font)
|
||||
{
|
||||
font_driver_free(font);
|
||||
}
|
||||
|
||||
|
||||
void menu_display_allocate_white_texture(void)
|
||||
void gfx_display_allocate_white_texture(void)
|
||||
{
|
||||
struct texture_image ti;
|
||||
static const uint8_t white_data[] = { 0xff, 0xff, 0xff, 0xff };
|
||||
|
@ -1363,11 +1363,11 @@ void menu_display_allocate_white_texture(void)
|
|||
ti.height = 1;
|
||||
ti.pixels = (uint32_t*)&white_data;
|
||||
|
||||
if (menu_display_white_texture)
|
||||
video_driver_texture_unload(&menu_display_white_texture);
|
||||
if (gfx_display_white_texture)
|
||||
video_driver_texture_unload(&gfx_display_white_texture);
|
||||
|
||||
video_driver_texture_load(&ti,
|
||||
TEXTURE_FILTER_NEAREST, &menu_display_white_texture);
|
||||
TEXTURE_FILTER_NEAREST, &gfx_display_white_texture);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1376,48 +1376,48 @@ void gfx_display_free(void)
|
|||
video_coord_array_free(&menu_disp_ca);
|
||||
gfx_animation_ctl(MENU_ANIMATION_CTL_DEINIT, NULL);
|
||||
|
||||
menu_display_msg_force = false;
|
||||
menu_display_header_height = 0;
|
||||
menu_display_framebuf_width = 0;
|
||||
menu_display_framebuf_height = 0;
|
||||
menu_display_framebuf_pitch = 0;
|
||||
gfx_display_msg_force = false;
|
||||
gfx_display_header_height = 0;
|
||||
gfx_display_framebuf_width = 0;
|
||||
gfx_display_framebuf_height = 0;
|
||||
gfx_display_framebuf_pitch = 0;
|
||||
menu_disp = NULL;
|
||||
menu_display_has_windowed = false;
|
||||
gfx_display_has_windowed = false;
|
||||
}
|
||||
|
||||
void gfx_display_init(void)
|
||||
{
|
||||
menu_display_has_windowed = video_driver_has_windowed();
|
||||
gfx_display_has_windowed = video_driver_has_windowed();
|
||||
menu_disp_ca.allocated = 0;
|
||||
}
|
||||
|
||||
|
||||
bool menu_display_driver_exists(const char *s)
|
||||
bool gfx_display_driver_exists(const char *s)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE(menu_display_ctx_drivers); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(gfx_display_ctx_drivers); i++)
|
||||
{
|
||||
if (string_is_equal(s, menu_display_ctx_drivers[i]->ident))
|
||||
if (string_is_equal(s, gfx_display_ctx_drivers[i]->ident))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_display_init_first_driver(bool video_is_threaded)
|
||||
bool gfx_display_init_first_driver(bool video_is_threaded)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; menu_display_ctx_drivers[i]; i++)
|
||||
for (i = 0; gfx_display_ctx_drivers[i]; i++)
|
||||
{
|
||||
if (!menu_display_check_compatibility(
|
||||
menu_display_ctx_drivers[i]->type,
|
||||
if (!gfx_display_check_compatibility(
|
||||
gfx_display_ctx_drivers[i]->type,
|
||||
video_is_threaded))
|
||||
continue;
|
||||
|
||||
RARCH_LOG("[Menu]: Found menu display driver: \"%s\".\n",
|
||||
menu_display_ctx_drivers[i]->ident);
|
||||
menu_disp = menu_display_ctx_drivers[i];
|
||||
gfx_display_ctx_drivers[i]->ident);
|
||||
menu_disp = gfx_display_ctx_drivers[i];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -47,17 +47,60 @@ RETRO_BEGIN_DECLS
|
|||
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha \
|
||||
}
|
||||
|
||||
/* TODO/FIXME - global, not thread-safe */
|
||||
extern float osk_dark[16];
|
||||
|
||||
enum gfx_display_prim_type
|
||||
{
|
||||
GFX_DISPLAY_PRIM_NONE = 0,
|
||||
GFX_DISPLAY_PRIM_TRIANGLESTRIP,
|
||||
GFX_DISPLAY_PRIM_TRIANGLES
|
||||
};
|
||||
|
||||
typedef struct menu_display_ctx_driver
|
||||
enum gfx_display_driver_type
|
||||
{
|
||||
GFX_VIDEO_DRIVER_GENERIC = 0,
|
||||
GFX_VIDEO_DRIVER_OPENGL,
|
||||
GFX_VIDEO_DRIVER_OPENGL1,
|
||||
GFX_VIDEO_DRIVER_OPENGL_CORE,
|
||||
GFX_VIDEO_DRIVER_VULKAN,
|
||||
GFX_VIDEO_DRIVER_METAL,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D8,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D9,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D10,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D11,
|
||||
GFX_VIDEO_DRIVER_DIRECT3D12,
|
||||
GFX_VIDEO_DRIVER_VITA2D,
|
||||
GFX_VIDEO_DRIVER_CTR,
|
||||
GFX_VIDEO_DRIVER_WIIU,
|
||||
GFX_VIDEO_DRIVER_GDI,
|
||||
GFX_VIDEO_DRIVER_SWITCH
|
||||
};
|
||||
|
||||
typedef struct gfx_display_ctx_clearcolor
|
||||
{
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
float a;
|
||||
} gfx_display_ctx_clearcolor_t;
|
||||
|
||||
typedef struct gfx_display_frame_info
|
||||
{
|
||||
bool shadows_enable;
|
||||
} gfx_display_frame_info_t;
|
||||
|
||||
typedef struct gfx_display_ctx_draw gfx_display_ctx_draw_t;
|
||||
|
||||
|
||||
typedef struct gfx_display_ctx_driver
|
||||
{
|
||||
/* Draw graphics to the screen. */
|
||||
void (*draw)(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info);
|
||||
void (*draw)(gfx_display_ctx_draw_t *draw, video_frame_info_t *video_info);
|
||||
/* Draw one of the menu pipeline shaders. */
|
||||
void (*draw_pipeline)(menu_display_ctx_draw_t *draw,
|
||||
void (*draw_pipeline)(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void (*viewport)(menu_display_ctx_draw_t *draw,
|
||||
void (*viewport)(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
/* Start blending operation. */
|
||||
void (*blend_begin)(video_frame_info_t *video_info);
|
||||
|
@ -66,7 +109,7 @@ typedef struct menu_display_ctx_driver
|
|||
/* Set the clear color back to its default values. */
|
||||
void (*restore_clear_color)(void);
|
||||
/* Set the color to be used when clearing the screen */
|
||||
void (*clear_color)(menu_display_ctx_clearcolor_t *clearcolor,
|
||||
void (*clear_color)(gfx_display_ctx_clearcolor_t *clearcolor,
|
||||
video_frame_info_t *video_info);
|
||||
/* Get the default Model-View-Projection matrix */
|
||||
void *(*get_default_mvp)(video_frame_info_t *video_info);
|
||||
|
@ -79,15 +122,15 @@ typedef struct menu_display_ctx_driver
|
|||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded);
|
||||
enum menu_display_driver_type type;
|
||||
enum gfx_display_driver_type type;
|
||||
const char *ident;
|
||||
bool handles_transform;
|
||||
/* Enables and disables scissoring */
|
||||
void (*scissor_begin)(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height);
|
||||
void (*scissor_end)(video_frame_info_t *video_info);
|
||||
} menu_display_ctx_driver_t;
|
||||
} gfx_display_ctx_driver_t;
|
||||
|
||||
struct menu_display_ctx_draw
|
||||
struct gfx_display_ctx_draw
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
|
@ -100,7 +143,7 @@ struct menu_display_ctx_draw
|
|||
size_t vertex_count;
|
||||
struct video_coords *coords;
|
||||
void *matrix_data;
|
||||
enum menu_display_prim_type prim_type;
|
||||
enum gfx_display_prim_type prim_type;
|
||||
struct
|
||||
{
|
||||
unsigned id;
|
||||
|
@ -112,7 +155,7 @@ struct menu_display_ctx_draw
|
|||
float scale_factor;
|
||||
};
|
||||
|
||||
typedef struct menu_display_ctx_rotate_draw
|
||||
typedef struct gfx_display_ctx_rotate_draw
|
||||
{
|
||||
bool scale_enable;
|
||||
float rotation;
|
||||
|
@ -120,122 +163,122 @@ typedef struct menu_display_ctx_rotate_draw
|
|||
float scale_y;
|
||||
float scale_z;
|
||||
math_matrix_4x4 *matrix;
|
||||
} menu_display_ctx_rotate_draw_t;
|
||||
} gfx_display_ctx_rotate_draw_t;
|
||||
|
||||
typedef struct menu_display_ctx_coord_draw
|
||||
typedef struct gfx_display_ctx_coord_draw
|
||||
{
|
||||
const float *ptr;
|
||||
} menu_display_ctx_coord_draw_t;
|
||||
} gfx_display_ctx_coord_draw_t;
|
||||
|
||||
typedef struct menu_display_ctx_datetime
|
||||
typedef struct gfx_display_ctx_datetime
|
||||
{
|
||||
char *s;
|
||||
size_t len;
|
||||
unsigned time_mode;
|
||||
} menu_display_ctx_datetime_t;
|
||||
} gfx_display_ctx_datetime_t;
|
||||
|
||||
typedef struct menu_display_ctx_powerstate
|
||||
typedef struct gfx_display_ctx_powerstate
|
||||
{
|
||||
char *s;
|
||||
size_t len;
|
||||
unsigned percent;
|
||||
bool battery_enabled;
|
||||
bool charging;
|
||||
} menu_display_ctx_powerstate_t;
|
||||
} gfx_display_ctx_powerstate_t;
|
||||
|
||||
#define menu_display_set_alpha(color, alpha_value) (color[3] = color[7] = color[11] = color[15] = (alpha_value))
|
||||
#define gfx_display_set_alpha(color, alpha_value) (color[3] = color[7] = color[11] = color[15] = (alpha_value))
|
||||
|
||||
void gfx_display_free(void);
|
||||
|
||||
void gfx_display_init(void);
|
||||
|
||||
void menu_display_blend_begin(video_frame_info_t *video_info);
|
||||
void gfx_display_blend_begin(video_frame_info_t *video_info);
|
||||
|
||||
void menu_display_blend_end(video_frame_info_t *video_info);
|
||||
void gfx_display_blend_end(video_frame_info_t *video_info);
|
||||
|
||||
void menu_display_push_quad(
|
||||
void gfx_display_push_quad(
|
||||
unsigned width, unsigned height,
|
||||
const float *colors, int x1, int y1,
|
||||
int x2, int y2);
|
||||
|
||||
void menu_display_snow(
|
||||
void gfx_display_snow(
|
||||
int16_t pointer_x,
|
||||
int16_t pointer_y,
|
||||
int width, int height);
|
||||
|
||||
void menu_display_draw_cursor(
|
||||
void gfx_display_draw_cursor(
|
||||
video_frame_info_t *video_info,
|
||||
float *color, float cursor_size, uintptr_t texture,
|
||||
float x, float y, unsigned width, unsigned height);
|
||||
|
||||
void menu_display_draw_text(
|
||||
void gfx_display_draw_text(
|
||||
const font_data_t *font, const char *text,
|
||||
float x, float y, int width, int height,
|
||||
uint32_t color, enum text_alignment text_align,
|
||||
float scale_factor, bool shadows_enable, float shadow_offset,
|
||||
bool draw_outside);
|
||||
|
||||
font_data_t *menu_display_font(
|
||||
font_data_t *gfx_display_font(
|
||||
enum application_special_type type,
|
||||
float font_size,
|
||||
bool video_is_threaded);
|
||||
|
||||
|
||||
void menu_display_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height);
|
||||
void menu_display_scissor_end(video_frame_info_t *video_info);
|
||||
void gfx_display_scissor_begin(video_frame_info_t *video_info, int x, int y, unsigned width, unsigned height);
|
||||
void gfx_display_scissor_end(video_frame_info_t *video_info);
|
||||
|
||||
void menu_display_font_free(font_data_t *font);
|
||||
void gfx_display_font_free(font_data_t *font);
|
||||
|
||||
void menu_display_coords_array_reset(void);
|
||||
video_coord_array_t *menu_display_get_coords_array(void);
|
||||
void gfx_display_coords_array_reset(void);
|
||||
video_coord_array_t *gfx_display_get_coords_array(void);
|
||||
|
||||
void menu_display_set_width(unsigned width);
|
||||
void menu_display_get_fb_size(unsigned *fb_width, unsigned *fb_height,
|
||||
void gfx_display_set_width(unsigned width);
|
||||
void gfx_display_get_fb_size(unsigned *fb_width, unsigned *fb_height,
|
||||
size_t *fb_pitch);
|
||||
void menu_display_set_height(unsigned height);
|
||||
void menu_display_set_header_height(unsigned height);
|
||||
unsigned menu_display_get_header_height(void);
|
||||
size_t menu_display_get_framebuffer_pitch(void);
|
||||
void menu_display_set_framebuffer_pitch(size_t pitch);
|
||||
void gfx_display_set_height(unsigned height);
|
||||
void gfx_display_set_header_height(unsigned height);
|
||||
unsigned gfx_display_get_header_height(void);
|
||||
size_t gfx_display_get_framebuffer_pitch(void);
|
||||
void gfx_display_set_framebuffer_pitch(size_t pitch);
|
||||
|
||||
bool menu_display_get_msg_force(void);
|
||||
void menu_display_set_msg_force(bool state);
|
||||
bool menu_display_get_update_pending(void);
|
||||
void menu_display_set_viewport(unsigned width, unsigned height);
|
||||
void menu_display_unset_viewport(unsigned width, unsigned height);
|
||||
bool menu_display_get_framebuffer_dirty_flag(void);
|
||||
void menu_display_set_framebuffer_dirty_flag(void);
|
||||
void menu_display_unset_framebuffer_dirty_flag(void);
|
||||
bool menu_display_init_first_driver(bool video_is_threaded);
|
||||
bool menu_display_restore_clear_color(void);
|
||||
void menu_display_clear_color(menu_display_ctx_clearcolor_t *color,
|
||||
bool gfx_display_get_msg_force(void);
|
||||
void gfx_display_set_msg_force(bool state);
|
||||
bool gfx_display_get_update_pending(void);
|
||||
void gfx_display_set_viewport(unsigned width, unsigned height);
|
||||
void gfx_display_unset_viewport(unsigned width, unsigned height);
|
||||
bool gfx_display_get_framebuffer_dirty_flag(void);
|
||||
void gfx_display_set_framebuffer_dirty_flag(void);
|
||||
void gfx_display_unset_framebuffer_dirty_flag(void);
|
||||
bool gfx_display_init_first_driver(bool video_is_threaded);
|
||||
bool gfx_display_restore_clear_color(void);
|
||||
void gfx_display_clear_color(gfx_display_ctx_clearcolor_t *color,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw_blend(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_blend(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw_keyboard(
|
||||
void gfx_display_draw_keyboard(
|
||||
uintptr_t hover_texture,
|
||||
const font_data_t *font,
|
||||
video_frame_info_t *video_info,
|
||||
char *grid[], unsigned id,
|
||||
unsigned text_color);
|
||||
|
||||
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw_bg(
|
||||
menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_bg(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info,
|
||||
bool add_opacity, float opacity_override);
|
||||
void menu_display_draw_gradient(
|
||||
menu_display_ctx_draw_t *draw,
|
||||
void gfx_display_draw_gradient(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
void menu_display_draw_quad(
|
||||
void gfx_display_draw_quad(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color);
|
||||
void menu_display_draw_polygon(
|
||||
void gfx_display_draw_polygon(
|
||||
video_frame_info_t *video_info,
|
||||
int x1, int y1,
|
||||
int x2, int y2,
|
||||
|
@ -243,64 +286,60 @@ void menu_display_draw_polygon(
|
|||
int x4, int y4,
|
||||
unsigned width, unsigned height,
|
||||
float *color);
|
||||
void menu_display_draw_texture(
|
||||
void gfx_display_draw_texture(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color, uintptr_t texture);
|
||||
void menu_display_draw_texture_slice(
|
||||
void gfx_display_draw_texture_slice(
|
||||
video_frame_info_t *video_info,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned new_w, unsigned new_h, unsigned width, unsigned height,
|
||||
float *color, unsigned offset, float scale_factor, uintptr_t texture);
|
||||
|
||||
void menu_display_rotate_z(menu_display_ctx_rotate_draw_t *draw,
|
||||
void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
|
||||
void menu_display_handle_wallpaper_upload(retro_task_t *task,
|
||||
void *task_data,
|
||||
void *user_data, const char *err);
|
||||
font_data_t *gfx_display_font_file(char* fontpath, float font_size, bool is_threaded);
|
||||
|
||||
font_data_t *menu_display_font_file(char* fontpath, float font_size, bool is_threaded);
|
||||
|
||||
bool menu_display_reset_textures_list(
|
||||
bool gfx_display_reset_textures_list(
|
||||
const char *texture_path, const char *iconpath,
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
bool menu_display_reset_textures_list_buffer(
|
||||
bool gfx_display_reset_textures_list_buffer(
|
||||
uintptr_t *item, enum texture_filter_type filter_type,
|
||||
void* buffer, unsigned buffer_len, enum image_type_enum image_type,
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
/* Returns the OSK key at a given position */
|
||||
int menu_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
int gfx_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
unsigned width, unsigned height);
|
||||
|
||||
|
||||
void menu_display_allocate_white_texture(void);
|
||||
void gfx_display_allocate_white_texture(void);
|
||||
|
||||
bool menu_display_driver_exists(const char *s);
|
||||
bool gfx_display_driver_exists(const char *s);
|
||||
|
||||
bool menu_display_init_first_driver(bool video_is_threaded);
|
||||
bool gfx_display_init_first_driver(bool video_is_threaded);
|
||||
|
||||
extern uintptr_t menu_display_white_texture;
|
||||
extern uintptr_t gfx_display_white_texture;
|
||||
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_gl;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_gl_core;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_gl1;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_vulkan;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_metal;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_d3d8;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_d3d9;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_d3d10;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_d3d11;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_d3d12;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_vita2d;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_ctr;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_wiiu;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_gdi;
|
||||
extern menu_display_ctx_driver_t menu_display_ctx_switch;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_gl;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_gl_core;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_gl1;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_vulkan;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_metal;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_d3d8;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_d3d9;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_d3d10;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_d3d11;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_d3d12;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_vita2d;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_ctr;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_wiiu;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_gdi;
|
||||
extern gfx_display_ctx_driver_t gfx_display_ctx_switch;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
|
|
@ -251,33 +251,6 @@ enum xmb_shader_pipeline
|
|||
XMB_SHADER_PIPELINE_LAST
|
||||
};
|
||||
|
||||
enum menu_display_prim_type
|
||||
{
|
||||
MENU_DISPLAY_PRIM_NONE = 0,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP,
|
||||
MENU_DISPLAY_PRIM_TRIANGLES
|
||||
};
|
||||
|
||||
enum menu_display_driver_type
|
||||
{
|
||||
MENU_VIDEO_DRIVER_GENERIC = 0,
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
MENU_VIDEO_DRIVER_OPENGL1,
|
||||
MENU_VIDEO_DRIVER_OPENGL_CORE,
|
||||
MENU_VIDEO_DRIVER_VULKAN,
|
||||
MENU_VIDEO_DRIVER_METAL,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D8,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D9,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D10,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D11,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D12,
|
||||
MENU_VIDEO_DRIVER_VITA2D,
|
||||
MENU_VIDEO_DRIVER_CTR,
|
||||
MENU_VIDEO_DRIVER_WIIU,
|
||||
MENU_VIDEO_DRIVER_GDI,
|
||||
MENU_VIDEO_DRIVER_SWITCH
|
||||
};
|
||||
|
||||
enum rgui_thumbnail_scaler
|
||||
{
|
||||
RGUI_THUMB_SCALE_POINT = 0,
|
||||
|
@ -391,21 +364,6 @@ enum playlist_entry_remove_enable_type
|
|||
|
||||
typedef uintptr_t menu_texture_item;
|
||||
|
||||
typedef struct menu_display_ctx_clearcolor
|
||||
{
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
float a;
|
||||
} menu_display_ctx_clearcolor_t;
|
||||
|
||||
typedef struct menu_display_frame_info
|
||||
{
|
||||
bool shadows_enable;
|
||||
} menu_display_frame_info_t;
|
||||
|
||||
typedef struct menu_display_ctx_draw menu_display_ctx_draw_t;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1733,7 +1733,7 @@ static void strftime_am_pm(char* ptr, size_t maxsize, const char* format,
|
|||
/* Display the date and time - time_mode will influence how
|
||||
* the time representation will look like.
|
||||
* */
|
||||
void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
|
||||
void menu_display_timedate(gfx_display_ctx_datetime_t *datetime)
|
||||
{
|
||||
if (!datetime)
|
||||
return;
|
||||
|
@ -1823,7 +1823,7 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
|
|||
|
||||
|
||||
/* Display current (battery) power state */
|
||||
void menu_display_powerstate(menu_display_ctx_powerstate_t *powerstate)
|
||||
void menu_display_powerstate(gfx_display_ctx_powerstate_t *powerstate)
|
||||
{
|
||||
int percent = 0;
|
||||
enum frontend_powerstate state = FRONTEND_POWERSTATE_NONE;
|
||||
|
@ -1842,7 +1842,7 @@ void menu_display_powerstate(menu_display_ctx_powerstate_t *powerstate)
|
|||
/* Get last recorded state */
|
||||
state = get_last_powerstate(&percent);
|
||||
|
||||
/* Populate menu_display_ctx_powerstate_t */
|
||||
/* Populate gfx_display_ctx_powerstate_t */
|
||||
powerstate->battery_enabled = (state != FRONTEND_POWERSTATE_NONE) &&
|
||||
(state != FRONTEND_POWERSTATE_NO_SOURCE);
|
||||
|
||||
|
@ -1875,7 +1875,7 @@ bool menu_driver_iterate(menu_ctx_iterate_t *iterate)
|
|||
|
||||
menu_driver_pending_quick_menu = false;
|
||||
menu_entries_flush_stack(NULL, MENU_SETTINGS);
|
||||
menu_display_set_msg_force(true);
|
||||
gfx_display_set_msg_force(true);
|
||||
|
||||
generic_action_ok_displaylist_push("", NULL,
|
||||
"", 0, 0, 0, ACTION_OK_DL_CONTENT_SETTINGS);
|
||||
|
|
|
@ -486,9 +486,14 @@ void menu_display_handle_savestate_thumbnail_upload(retro_task_t *task,
|
|||
void *task_data,
|
||||
void *user_data, const char *err);
|
||||
|
||||
void menu_display_timedate(menu_display_ctx_datetime_t *datetime);
|
||||
void menu_display_timedate(gfx_display_ctx_datetime_t *datetime);
|
||||
|
||||
void menu_display_powerstate(gfx_display_ctx_powerstate_t *powerstate);
|
||||
|
||||
void menu_display_handle_wallpaper_upload(retro_task_t *task,
|
||||
void *task_data,
|
||||
void *user_data, const char *err);
|
||||
|
||||
void menu_display_powerstate(menu_display_ctx_powerstate_t *powerstate);
|
||||
|
||||
void menu_driver_destroy(void);
|
||||
|
||||
|
|
|
@ -601,7 +601,7 @@ void menu_thumbnail_get_draw_dimensions(
|
|||
}
|
||||
|
||||
/* Account for scale factor
|
||||
* > Side note: We cannot use the menu_display_ctx_draw_t
|
||||
* > Side note: We cannot use the gfx_display_ctx_draw_t
|
||||
* 'scale_factor' parameter for scaling thumbnails,
|
||||
* since this clips off any part of the expanded image
|
||||
* that extends beyond the bounding box. But even if
|
||||
|
@ -641,8 +641,8 @@ void menu_thumbnail_draw(
|
|||
/* Only draw thumbnail if it is available... */
|
||||
if (thumbnail->status == MENU_THUMBNAIL_STATUS_AVAILABLE)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
float draw_width;
|
||||
|
@ -661,14 +661,14 @@ void menu_thumbnail_draw(
|
|||
if (thumbnail_alpha <= 0.0f)
|
||||
return;
|
||||
else if (thumbnail_alpha < 1.0f)
|
||||
menu_display_set_alpha(thumbnail_color, thumbnail_alpha);
|
||||
gfx_display_set_alpha(thumbnail_color, thumbnail_alpha);
|
||||
|
||||
/* Get thumbnail dimensions */
|
||||
menu_thumbnail_get_draw_dimensions(
|
||||
thumbnail, width, height, scale_factor,
|
||||
&draw_width, &draw_height);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
/* Perform 'rotation' step
|
||||
* > Note that rotation does not actually work...
|
||||
|
@ -677,7 +677,7 @@ void menu_thumbnail_draw(
|
|||
* off any 'corners' that extend beyond the bounding box
|
||||
* > Since the result is visual garbage, we disable
|
||||
* rotation entirely
|
||||
* > But we still have to call menu_display_rotate_z(),
|
||||
* > But we still have to call gfx_display_rotate_z(),
|
||||
* or nothing will be drawn...
|
||||
* Note that we also disable scaling here (scale_enable),
|
||||
* since we handle scaling internally... */
|
||||
|
@ -688,7 +688,7 @@ void menu_thumbnail_draw(
|
|||
rotate_draw.scale_z = 1.0f;
|
||||
rotate_draw.scale_enable = false;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
/* Configure draw object
|
||||
* > Note: Colour, width/height and position must
|
||||
|
@ -703,7 +703,7 @@ void menu_thumbnail_draw(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = thumbnail->texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
/* Set thumbnail alignment within bounding box */
|
||||
|
@ -764,7 +764,7 @@ void menu_thumbnail_draw(
|
|||
if (shadow->alpha < 1.0f)
|
||||
shadow_alpha *= shadow->alpha;
|
||||
|
||||
menu_display_set_alpha(shadow_color, shadow_alpha);
|
||||
gfx_display_set_alpha(shadow_color, shadow_alpha);
|
||||
|
||||
/* Configure shadow based on effect type
|
||||
* > Not using a switch() here, since we've
|
||||
|
@ -793,7 +793,7 @@ void menu_thumbnail_draw(
|
|||
draw.y = shadow_y;
|
||||
|
||||
/* Draw shadow */
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -805,7 +805,7 @@ void menu_thumbnail_draw(
|
|||
draw.y = draw_y;
|
||||
|
||||
/* Draw thumbnail */
|
||||
menu_display_draw(&draw, video_info);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -705,8 +705,8 @@ static void menu_widgets_draw_icon(
|
|||
float rotation, float scale_factor,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
|
||||
|
@ -720,7 +720,7 @@ static void menu_widgets_draw_icon(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
|
@ -737,10 +737,10 @@ static void menu_widgets_draw_icon(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
gfx_display_draw(&draw, video_info);
|
||||
}
|
||||
|
||||
|
||||
|
@ -754,8 +754,8 @@ static void menu_widgets_draw_icon_blend(
|
|||
float rotation, float scale_factor,
|
||||
float *color)
|
||||
{
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
menu_display_ctx_draw_t draw;
|
||||
gfx_display_ctx_rotate_draw_t rotate_draw;
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
math_matrix_4x4 mymat;
|
||||
|
||||
|
@ -769,7 +769,7 @@ static void menu_widgets_draw_icon_blend(
|
|||
rotate_draw.scale_z = 1;
|
||||
rotate_draw.scale_enable = true;
|
||||
|
||||
menu_display_rotate_z(&rotate_draw, video_info);
|
||||
gfx_display_rotate_z(&rotate_draw, video_info);
|
||||
|
||||
coords.vertices = 4;
|
||||
coords.vertex = NULL;
|
||||
|
@ -786,10 +786,10 @@ static void menu_widgets_draw_icon_blend(
|
|||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_draw_blend(&draw, video_info);
|
||||
gfx_display_draw_blend(&draw, video_info);
|
||||
}
|
||||
|
||||
static float menu_widgets_get_thumbnail_scale_factor(const float dst_width, const float dst_height,
|
||||
|
@ -982,7 +982,7 @@ void menu_widgets_iterate(
|
|||
|
||||
video_driver_texture_unload(&screenshot_texture);
|
||||
|
||||
menu_display_reset_textures_list(screenshot_filename,
|
||||
gfx_display_reset_textures_list(screenshot_filename,
|
||||
"", &screenshot_texture, TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||
&screenshot_texture_width, &screenshot_texture_height);
|
||||
|
||||
|
@ -1018,29 +1018,29 @@ static int menu_widgets_draw_indicator(video_frame_info_t *video_info,
|
|||
{
|
||||
unsigned width;
|
||||
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
|
||||
if (icon)
|
||||
{
|
||||
unsigned height = simple_widget_height * 2;
|
||||
width = height;
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
top_right_x_advance - width, y,
|
||||
width, height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
menu_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
menu_widgets_draw_icon(video_info, width, height,
|
||||
icon, top_right_x_advance - width, y,
|
||||
video_info->width, video_info->height,
|
||||
0, 1, menu_widgets_pure_white
|
||||
);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1049,14 +1049,14 @@ static int menu_widgets_draw_indicator(video_frame_info_t *video_info,
|
|||
|
||||
width = font_driver_get_message_width(font_regular, txt, (unsigned)strlen(txt), 1) + simple_widget_padding*2;
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
top_right_x_advance - width, y,
|
||||
width, height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
txt,
|
||||
top_right_x_advance - width + simple_widget_padding, widget_font_size + simple_widget_padding/4,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1122,8 +1122,8 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
rect_y = video_info->height - msg->offset_y;
|
||||
rect_height = msg_queue_height/2;
|
||||
|
||||
menu_display_set_alpha(msg_queue_current_background, msg->alpha);
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_set_alpha(msg_queue_current_background, msg->alpha);
|
||||
gfx_display_draw_quad(video_info,
|
||||
rect_x, rect_y,
|
||||
rect_width, rect_height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1138,8 +1138,8 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
else
|
||||
msg_queue_current_bar = msg_queue_task_progress_2;
|
||||
|
||||
menu_display_set_alpha(msg_queue_current_bar, 1.0f);
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_set_alpha(msg_queue_current_bar, 1.0f);
|
||||
gfx_display_draw_quad(video_info,
|
||||
msg_queue_task_rect_start_x, video_info->height - msg->offset_y,
|
||||
bar_width, rect_height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1148,8 +1148,8 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
}
|
||||
|
||||
/* Icon */
|
||||
menu_display_set_alpha(menu_widgets_pure_white, msg->alpha);
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, msg->alpha);
|
||||
gfx_display_blend_begin(video_info);
|
||||
menu_widgets_draw_icon(video_info,
|
||||
msg_queue_height/2,
|
||||
msg_queue_height/2,
|
||||
|
@ -1160,7 +1160,7 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
video_info->height,
|
||||
msg->task_finished ? 0 : msg->hourglass_rotation,
|
||||
1, menu_widgets_pure_white);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
/* Text */
|
||||
if (draw_msg_new)
|
||||
|
@ -1168,8 +1168,8 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
font_driver_flush(video_info->width, video_info->height, font_regular, video_info);
|
||||
font_raster_regular.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_scissor_begin(video_info, rect_x, rect_y, rect_width, rect_height);
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_scissor_begin(video_info, rect_x, rect_y, rect_width, rect_height);
|
||||
gfx_display_draw_text(font_regular,
|
||||
msg->msg_new,
|
||||
msg_queue_task_text_start_x,
|
||||
video_info->height - msg->offset_y + msg_queue_text_scale_factor * widget_font_size + msg_queue_height/4 - widget_font_size/2.25f - msg_queue_height/2 + msg->msg_transition_animation,
|
||||
|
@ -1183,7 +1183,7 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
);
|
||||
}
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
msg->msg,
|
||||
msg_queue_task_text_start_x,
|
||||
video_info->height - msg->offset_y + msg_queue_text_scale_factor * widget_font_size + msg_queue_height/4 - widget_font_size/2.25f + msg->msg_transition_animation,
|
||||
|
@ -1201,12 +1201,12 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
|
|||
font_driver_flush(video_info->width, video_info->height, font_regular, video_info);
|
||||
font_raster_regular.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_scissor_end(video_info);
|
||||
gfx_display_scissor_end(video_info);
|
||||
}
|
||||
|
||||
/* Progress text */
|
||||
text_color = COLOR_TEXT_ALPHA(0xFFFFFF00, (unsigned)(msg->alpha/2*255.0f));
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
task_percentage,
|
||||
msg_queue_rect_start_x - msg_queue_icon_size_x + rect_width - msg_queue_glyph_width,
|
||||
video_info->height - msg->offset_y + msg_queue_text_scale_factor * widget_font_size + msg_queue_height/4 - widget_font_size/2.25f,
|
||||
|
@ -1231,9 +1231,9 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
|||
icon = menu_widgets_icons_textures[MENU_WIDGETS_ICON_INFO]; /* TODO: Real icon logic here */
|
||||
|
||||
/* Icon */
|
||||
menu_display_set_alpha(msg_queue_info, msg->alpha);
|
||||
menu_display_set_alpha(menu_widgets_pure_white, msg->alpha);
|
||||
menu_display_set_alpha(msg_queue_background, msg->alpha);
|
||||
gfx_display_set_alpha(msg_queue_info, msg->alpha);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, msg->alpha);
|
||||
gfx_display_set_alpha(msg_queue_background, msg->alpha);
|
||||
|
||||
if (!msg->unfolded || msg->unfolding)
|
||||
{
|
||||
|
@ -1243,13 +1243,13 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
|||
font_raster_regular.carr.coords.vertices = 0;
|
||||
font_raster_bold.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_scissor_begin(video_info, msg_queue_scissor_start_x, 0,
|
||||
gfx_display_scissor_begin(video_info, msg_queue_scissor_start_x, 0,
|
||||
(msg_queue_scissor_start_x + msg->width - simple_widget_padding*2) * msg->unfold, video_info->height);
|
||||
}
|
||||
|
||||
if (msg_queue_has_icons)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
/* (int) cast is to be consistent with the rect drawing and prevent alignment
|
||||
* issues, don't remove it */
|
||||
menu_widgets_draw_icon(video_info,
|
||||
|
@ -1258,13 +1258,13 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
|||
video_info->width, video_info->height,
|
||||
0, 1, msg_queue_background);
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
/* Background */
|
||||
bar_width = simple_widget_padding + msg->width;
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
msg_queue_rect_start_x, video_info->height - msg->offset_y,
|
||||
bar_width, msg_queue_height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1274,7 +1274,7 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
|||
/* Text */
|
||||
text_color = COLOR_TEXT_ALPHA(0xFFFFFF00, (unsigned)(msg->alpha*255.0f));
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
msg->msg,
|
||||
msg_queue_regular_text_start - ((1.0f-msg->unfold) * msg->width/2),
|
||||
video_info->height - msg->offset_y + msg_queue_regular_text_base_y - msg->text_height/2,
|
||||
|
@ -1292,12 +1292,12 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
|||
font_raster_regular.carr.coords.vertices = 0;
|
||||
font_raster_bold.carr.coords.vertices = 0;
|
||||
|
||||
menu_display_scissor_end(video_info);
|
||||
gfx_display_scissor_end(video_info);
|
||||
}
|
||||
|
||||
if (msg_queue_has_icons)
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
|
||||
menu_widgets_draw_icon(video_info,
|
||||
msg_queue_icon_size_x, msg_queue_icon_size_y,
|
||||
|
@ -1317,14 +1317,14 @@ static void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_in
|
|||
video_info->width, video_info->height,
|
||||
0, 1, menu_widgets_pure_white);
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_widgets_draw_backdrop(video_frame_info_t *video_info, float alpha)
|
||||
{
|
||||
menu_display_set_alpha(menu_widgets_backdrop, alpha);
|
||||
menu_display_draw_quad(video_info, 0, 0, video_info->width, video_info->height, video_info->width, video_info->height, menu_widgets_backdrop);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop, alpha);
|
||||
gfx_display_draw_quad(video_info, 0, 0, video_info->width, video_info->height, video_info->width, video_info->height, menu_widgets_backdrop);
|
||||
}
|
||||
|
||||
static void menu_widgets_draw_load_content_animation(video_frame_info_t *video_info)
|
||||
|
@ -1340,8 +1340,8 @@ static void menu_widgets_draw_load_content_animation(video_frame_info_t *video_i
|
|||
menu_widgets_draw_backdrop(video_info, load_content_animation_fade_alpha);
|
||||
|
||||
/* Icon */
|
||||
menu_display_set_alpha(icon_color, load_content_animation_icon_alpha);
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_set_alpha(icon_color, load_content_animation_icon_alpha);
|
||||
gfx_display_blend_begin(video_info);
|
||||
menu_widgets_draw_icon(video_info, icon_size,
|
||||
icon_size, load_content_animation_icon,
|
||||
video_info->width/2 - icon_size/2,
|
||||
|
@ -1350,10 +1350,10 @@ static void menu_widgets_draw_load_content_animation(video_frame_info_t *video_i
|
|||
video_info->height,
|
||||
0, 1, icon_color
|
||||
);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
|
||||
/* Text */
|
||||
menu_display_draw_text(font_bold,
|
||||
gfx_display_draw_text(font_bold,
|
||||
load_content_animation_content_name,
|
||||
video_info->width/2,
|
||||
video_info->height/2 + (175 + 25) * last_scale_factor + text_offset,
|
||||
|
@ -1387,7 +1387,7 @@ void menu_widgets_frame(void *data)
|
|||
|
||||
menu_widgets_frame_count++;
|
||||
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
gfx_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
/* Font setup */
|
||||
font_driver_bind_block(font_regular, &font_raster_regular);
|
||||
|
@ -1405,7 +1405,7 @@ void menu_widgets_frame(void *data)
|
|||
0.00, 1.00, 0.00, 1.00,
|
||||
0.00, 1.00, 0.00, 1.00,
|
||||
};
|
||||
menu_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
|
||||
menu_widgets_draw_icon_blend(video_info,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1415,28 +1415,28 @@ void menu_widgets_frame(void *data)
|
|||
0, 1, menu_widgets_pure_white
|
||||
);
|
||||
/* top line */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
video_info->width, divider_width_1px,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
/* bottom line */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, video_info->height-divider_width_1px,
|
||||
video_info->width, divider_width_1px,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
/* left line */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
divider_width_1px, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
outline_color
|
||||
);
|
||||
/* right line */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
video_info->width-divider_width_1px, 0,
|
||||
divider_width_1px, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1452,15 +1452,15 @@ void menu_widgets_frame(void *data)
|
|||
if (libretro_message_alpha > 0.0f)
|
||||
{
|
||||
unsigned text_color = COLOR_TEXT_ALPHA(0xffffffff, (unsigned)(libretro_message_alpha*255.0f));
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, libretro_message_alpha);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, libretro_message_alpha);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, video_info->height - generic_message_height,
|
||||
libretro_message_width, generic_message_height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig);
|
||||
|
||||
menu_display_draw_text(font_regular, libretro_message,
|
||||
gfx_display_draw_text(font_regular, libretro_message,
|
||||
simple_widget_padding,
|
||||
video_info->height - generic_message_height/2 + widget_font_size/4,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1472,15 +1472,15 @@ void menu_widgets_frame(void *data)
|
|||
if (generic_message_alpha > 0.0f)
|
||||
{
|
||||
unsigned text_color = COLOR_TEXT_ALPHA(0xffffffff, (unsigned)(generic_message_alpha*255.0f));
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, generic_message_alpha);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, generic_message_alpha);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, video_info->height - generic_message_height,
|
||||
video_info->width, generic_message_height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig);
|
||||
|
||||
menu_display_draw_text(font_regular, generic_message,
|
||||
gfx_display_draw_text(font_regular, generic_message,
|
||||
video_info->width/2,
|
||||
video_info->height - generic_message_height/2 + widget_font_size/4,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1494,16 +1494,16 @@ void menu_widgets_frame(void *data)
|
|||
char shotname[256];
|
||||
gfx_animation_ctx_ticker_t ticker;
|
||||
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, screenshot_y,
|
||||
screenshot_width, screenshot_height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
menu_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
menu_widgets_draw_icon(video_info,
|
||||
screenshot_thumbnail_width, screenshot_thumbnail_height,
|
||||
screenshot_texture,
|
||||
|
@ -1512,7 +1512,7 @@ void menu_widgets_frame(void *data)
|
|||
0, 1, menu_widgets_pure_white
|
||||
);
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
msg_hash_to_str(MSG_SCREENSHOT_SAVED),
|
||||
screenshot_thumbnail_width + simple_widget_padding, widget_font_size * 1.9f + screenshot_y,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1529,7 +1529,7 @@ void menu_widgets_frame(void *data)
|
|||
|
||||
gfx_animation_ticker(&ticker);
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
shotname,
|
||||
screenshot_thumbnail_width + simple_widget_padding, widget_font_size * 2.9f + screenshot_y,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1544,14 +1544,14 @@ void menu_widgets_frame(void *data)
|
|||
{
|
||||
unsigned unfold_offet = ((1.0f-cheevo_unfold) * cheevo_width/2);
|
||||
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
menu_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, 1.0f);
|
||||
|
||||
/* Default icon */
|
||||
if (!cheevo_badge)
|
||||
{
|
||||
/* Backdrop */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, (int)cheevo_y,
|
||||
cheevo_height, cheevo_height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1560,12 +1560,12 @@ void menu_widgets_frame(void *data)
|
|||
/* Icon */
|
||||
if (menu_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT])
|
||||
{
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
menu_widgets_draw_icon(video_info,
|
||||
cheevo_height, cheevo_height,
|
||||
menu_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT], 0, cheevo_y,
|
||||
video_info->width, video_info->height, 0, 1, menu_widgets_pure_white);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
}
|
||||
/* Badge */
|
||||
|
@ -1580,20 +1580,20 @@ void menu_widgets_frame(void *data)
|
|||
scissor_me_timbers = (fabs(cheevo_unfold - 1.0f) > 0.01); /* I _think_ cheevo_unfold changes in another thread */
|
||||
if (scissor_me_timbers)
|
||||
{
|
||||
menu_display_scissor_begin(video_info,
|
||||
gfx_display_scissor_begin(video_info,
|
||||
cheevo_height, 0,
|
||||
(unsigned)((float)(cheevo_width) * cheevo_unfold), cheevo_height);
|
||||
}
|
||||
|
||||
/* Backdrop */
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
cheevo_height, (int)cheevo_y,
|
||||
cheevo_width, cheevo_height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig);
|
||||
|
||||
/* Title */
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
msg_hash_to_str(MSG_ACHIEVEMENT_UNLOCKED),
|
||||
cheevo_height + simple_widget_padding - unfold_offet, widget_font_size * 1.9f + cheevo_y,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1606,7 +1606,7 @@ void menu_widgets_frame(void *data)
|
|||
|
||||
/* TODO: is a ticker necessary ? */
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
cheevo_title,
|
||||
cheevo_height + simple_widget_padding - unfold_offet, widget_font_size * 2.9f + cheevo_y,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1619,7 +1619,7 @@ void menu_widgets_frame(void *data)
|
|||
{
|
||||
font_driver_flush(video_info->width, video_info->height, font_regular, video_info);
|
||||
font_raster_regular.carr.coords.vertices = 0;
|
||||
menu_display_scissor_end(video_info);
|
||||
gfx_display_scissor_end(video_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1680,9 +1680,9 @@ void menu_widgets_frame(void *data)
|
|||
bar_percentage = 1.0f;
|
||||
|
||||
/* Backdrop */
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, volume_alpha);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, volume_alpha);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
volume_width,
|
||||
volume_height,
|
||||
|
@ -1694,9 +1694,9 @@ void menu_widgets_frame(void *data)
|
|||
/* Icon */
|
||||
if (volume_icon)
|
||||
{
|
||||
menu_display_set_alpha(menu_widgets_pure_white, volume_text_alpha);
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, volume_text_alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
gfx_display_blend_begin(video_info);
|
||||
menu_widgets_draw_icon(video_info,
|
||||
icon_size, icon_size,
|
||||
volume_icon,
|
||||
|
@ -1704,7 +1704,7 @@ void menu_widgets_frame(void *data)
|
|||
video_info->width, video_info->height,
|
||||
0, 1, menu_widgets_pure_white
|
||||
);
|
||||
menu_display_blend_end(video_info);
|
||||
gfx_display_blend_end(video_info);
|
||||
}
|
||||
|
||||
if (volume_mute)
|
||||
|
@ -1712,7 +1712,7 @@ void menu_widgets_frame(void *data)
|
|||
if (!menu_widgets_icons_textures[MENU_WIDGETS_ICON_VOLUME_MUTE])
|
||||
{
|
||||
const char *text = msg_hash_to_str(MSG_AUDIO_MUTED);
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
text,
|
||||
volume_width/2, volume_height/2 + widget_font_size / 3,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1724,17 +1724,17 @@ void menu_widgets_frame(void *data)
|
|||
else
|
||||
{
|
||||
/* Bar */
|
||||
menu_display_set_alpha(bar_background, volume_text_alpha);
|
||||
menu_display_set_alpha(bar_foreground, volume_text_alpha);
|
||||
gfx_display_set_alpha(bar_background, volume_text_alpha);
|
||||
gfx_display_set_alpha(bar_foreground, volume_text_alpha);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
bar_x + bar_percentage * bar_width, bar_y,
|
||||
bar_width - bar_percentage * bar_width, bar_height,
|
||||
video_info->width, video_info->height,
|
||||
bar_background
|
||||
);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
bar_x, bar_y,
|
||||
bar_percentage * bar_width, bar_height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1748,7 +1748,7 @@ void menu_widgets_frame(void *data)
|
|||
snprintf(percentage_msg, sizeof(percentage_msg), "%d%%",
|
||||
(int)(volume_percent * 100.0f));
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
msg,
|
||||
volume_width - simple_widget_padding, widget_font_size * 2,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1757,7 +1757,7 @@ void menu_widgets_frame(void *data)
|
|||
1, false, 0, false
|
||||
);
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
percentage_msg,
|
||||
icon_size, widget_font_size * 2,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1799,16 +1799,16 @@ void menu_widgets_frame(void *data)
|
|||
* not bleed off the edge of the screen */
|
||||
fps_text_x = (fps_text_x < 0) ? 0 : fps_text_x;
|
||||
|
||||
menu_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
gfx_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(video_info,
|
||||
top_right_x_advance - total_width, 0,
|
||||
total_width, simple_widget_height,
|
||||
video_info->width, video_info->height,
|
||||
menu_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
menu_display_draw_text(font_regular,
|
||||
gfx_display_draw_text(font_regular,
|
||||
text,
|
||||
fps_text_x, widget_font_size + simple_widget_padding/4,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1842,8 +1842,8 @@ void menu_widgets_frame(void *data)
|
|||
/* Screenshot */
|
||||
if (screenshot_alpha > 0.0f)
|
||||
{
|
||||
menu_display_set_alpha(menu_widgets_pure_white, screenshot_alpha);
|
||||
menu_display_draw_quad(video_info,
|
||||
gfx_display_set_alpha(menu_widgets_pure_white, screenshot_alpha);
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
video_info->width, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
|
@ -1863,12 +1863,12 @@ void menu_widgets_frame(void *data)
|
|||
font_raster_bold.carr.coords.vertices = 0;
|
||||
}
|
||||
|
||||
menu_display_unset_viewport(video_info->width, video_info->height);
|
||||
gfx_display_unset_viewport(video_info->width, video_info->height);
|
||||
}
|
||||
|
||||
bool menu_widgets_init(bool video_is_threaded)
|
||||
{
|
||||
if (!menu_display_init_first_driver(video_is_threaded))
|
||||
if (!gfx_display_init_first_driver(video_is_threaded))
|
||||
goto error;
|
||||
|
||||
menu_widgets_frame_count = 0;
|
||||
|
@ -1917,12 +1917,12 @@ static void menu_widgets_layout(
|
|||
/* > Free existing */
|
||||
if (font_regular)
|
||||
{
|
||||
menu_display_font_free(font_regular);
|
||||
gfx_display_font_free(font_regular);
|
||||
font_regular = NULL;
|
||||
}
|
||||
if (font_bold)
|
||||
{
|
||||
menu_display_font_free(font_bold);
|
||||
gfx_display_font_free(font_bold);
|
||||
font_bold = NULL;
|
||||
}
|
||||
|
||||
|
@ -1940,17 +1940,17 @@ static void menu_widgets_layout(
|
|||
|
||||
/* Create regular font */
|
||||
fill_pathname_join(font_path, ozone_path, "regular.ttf", sizeof(font_path));
|
||||
font_regular = menu_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
font_regular = gfx_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
|
||||
/* Create bold font */
|
||||
fill_pathname_join(font_path, ozone_path, "bold.ttf", sizeof(font_path));
|
||||
font_bold = menu_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
font_bold = gfx_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Load fonts from user-supplied path */
|
||||
font_regular = menu_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
font_bold = menu_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
font_regular = gfx_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
font_bold = gfx_display_font_file(font_path, widget_font_size, is_threaded);
|
||||
}
|
||||
|
||||
/* > Get actual font size */
|
||||
|
@ -2062,13 +2062,13 @@ void menu_widgets_context_reset(bool is_threaded,
|
|||
/* Icons */
|
||||
for (i = 0; i < MENU_WIDGETS_ICON_LAST; i++)
|
||||
{
|
||||
menu_display_reset_textures_list(menu_widgets_icons_names[i], monochrome_png_path, &menu_widgets_icons_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
gfx_display_reset_textures_list(menu_widgets_icons_names[i], monochrome_png_path, &menu_widgets_icons_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
}
|
||||
|
||||
/* Message queue */
|
||||
menu_display_reset_textures_list("msg_queue_icon.png", menu_widgets_path, &msg_queue_icon, TEXTURE_FILTER_LINEAR, NULL, NULL);
|
||||
menu_display_reset_textures_list("msg_queue_icon_outline.png", menu_widgets_path, &msg_queue_icon_outline, TEXTURE_FILTER_LINEAR, NULL, NULL);
|
||||
menu_display_reset_textures_list("msg_queue_icon_rect.png", menu_widgets_path, &msg_queue_icon_rect, TEXTURE_FILTER_NEAREST, NULL, NULL);
|
||||
gfx_display_reset_textures_list("msg_queue_icon.png", menu_widgets_path, &msg_queue_icon, TEXTURE_FILTER_LINEAR, NULL, NULL);
|
||||
gfx_display_reset_textures_list("msg_queue_icon_outline.png", menu_widgets_path, &msg_queue_icon_outline, TEXTURE_FILTER_LINEAR, NULL, NULL);
|
||||
gfx_display_reset_textures_list("msg_queue_icon_rect.png", menu_widgets_path, &msg_queue_icon_rect, TEXTURE_FILTER_NEAREST, NULL, NULL);
|
||||
|
||||
msg_queue_has_icons = msg_queue_icon && msg_queue_icon_outline && msg_queue_icon_rect;
|
||||
|
||||
|
@ -2099,9 +2099,9 @@ void menu_widgets_context_destroy(void)
|
|||
|
||||
/* Fonts */
|
||||
if (font_regular)
|
||||
menu_display_font_free(font_regular);
|
||||
gfx_display_font_free(font_regular);
|
||||
if (font_bold)
|
||||
menu_display_font_free(font_bold);
|
||||
gfx_display_font_free(font_bold);
|
||||
|
||||
font_regular = NULL;
|
||||
font_bold = NULL;
|
||||
|
@ -2260,7 +2260,7 @@ bool menu_widgets_ai_service_overlay_load(
|
|||
if (ai_service_overlay_state == 0)
|
||||
{
|
||||
bool res;
|
||||
res = menu_display_reset_textures_list_buffer(
|
||||
res = gfx_display_reset_textures_list_buffer(
|
||||
&ai_service_overlay_texture,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||
(void *) buffer, buffer_len, image_type,
|
||||
|
@ -2530,7 +2530,7 @@ static void menu_widgets_get_badge_texture(menu_texture_item *tex, const char *b
|
|||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
menu_display_reset_textures_list(badge_file, fullpath,
|
||||
gfx_display_reset_textures_list(badge_file, fullpath,
|
||||
tex, TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -229,11 +229,10 @@
|
|||
05A8C55D20DB72F000FF7857 /* menu_input_bind_dialog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu_input_bind_dialog.c; sourceTree = "<group>"; };
|
||||
05A8C55E20DB72F000FF7857 /* menu_osk_utf8_pages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = menu_osk_utf8_pages.h; sourceTree = "<group>"; };
|
||||
05A8C55F20DB72F000FF7857 /* menu_osk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = menu_osk.h; sourceTree = "<group>"; };
|
||||
05A8C56120DB72F000FF7857 /* menu_display_vulkan.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu_display_vulkan.c; sourceTree = "<group>"; };
|
||||
05A8C56220DB72F000FF7857 /* menu_display_vga.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu_display_vga.c; sourceTree = "<group>"; };
|
||||
05A8C56320DB72F000FF7857 /* menu_display_gl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu_display_gl.c; sourceTree = "<group>"; };
|
||||
05A8C56420DB72F000FF7857 /* menu_display_d3d10.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu_display_d3d10.c; sourceTree = "<group>"; };
|
||||
05A8C56F20DB72F000FF7857 /* menu_display_metal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = menu_display_metal.m; sourceTree = "<group>"; };
|
||||
05A8C56120DB72F000FF7857 /* gfx_display_vulkan.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = gfx_display_vulkan.c; sourceTree = "<group>"; };
|
||||
05A8C56320DB72F000FF7857 /* gfx_display_gl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = gfx_display_gl.c; sourceTree = "<group>"; };
|
||||
05A8C56420DB72F000FF7857 /* gfx_display_d3d10.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = gfx_display_d3d10.c; sourceTree = "<group>"; };
|
||||
05A8C56F20DB72F000FF7857 /* gfx_display_metal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = gfx_display_metal.m; sourceTree = "<group>"; };
|
||||
05A8C57020DB72F000FF7857 /* menu_entries.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = menu_entries.h; sourceTree = "<group>"; };
|
||||
05A8C57220DB72F000FF7857 /* msg_hash_pl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = msg_hash_pl.h; sourceTree = "<group>"; };
|
||||
05A8C57320DB72F000FF7857 /* msg_hash_pt_br.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = msg_hash_pt_br.c; sourceTree = "<group>"; };
|
||||
|
@ -850,11 +849,10 @@
|
|||
05A8C56020DB72F000FF7857 /* drivers_display */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
05A8C56420DB72F000FF7857 /* menu_display_d3d10.c */,
|
||||
05A8C56320DB72F000FF7857 /* menu_display_gl.c */,
|
||||
05A8C56F20DB72F000FF7857 /* menu_display_metal.m */,
|
||||
05A8C56220DB72F000FF7857 /* menu_display_vga.c */,
|
||||
05A8C56120DB72F000FF7857 /* menu_display_vulkan.c */,
|
||||
05A8C56420DB72F000FF7857 /* gfx_display_d3d10.c */,
|
||||
05A8C56320DB72F000FF7857 /* gfx_display_gl.c */,
|
||||
05A8C56F20DB72F000FF7857 /* gfx_display_metal.m */,
|
||||
05A8C56120DB72F000FF7857 /* gfx_display_vulkan.c */,
|
||||
);
|
||||
path = drivers_display;
|
||||
sourceTree = "<group>";
|
||||
|
|
12
retroarch.c
12
retroarch.c
|
@ -6362,7 +6362,7 @@ static void command_event_reinit(const int flags)
|
|||
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, (void*)(intptr_t)-1);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_set_framebuffer_dirty_flag();
|
||||
gfx_display_set_framebuffer_dirty_flag();
|
||||
if (configuration_settings->bools.video_fullscreen)
|
||||
video_driver_hide_mouse();
|
||||
if (menu_driver_alive && current_video->set_nonblock_state)
|
||||
|
@ -14558,7 +14558,7 @@ static void menu_input_get_mouse_hw_state(
|
|||
struct video_viewport vp = {0};
|
||||
|
||||
/* Read display/framebuffer info */
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
/* Adjust X pos */
|
||||
|
@ -14660,7 +14660,7 @@ static void menu_input_get_touchscreen_hw_state(
|
|||
return;
|
||||
}
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
joypad_info.joy_idx = 0;
|
||||
joypad_info.auto_binds = NULL;
|
||||
|
@ -15143,7 +15143,7 @@ static float menu_input_get_dpi(void)
|
|||
unsigned fb_width, fb_height;
|
||||
|
||||
/* Read framebuffer info */
|
||||
menu_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
gfx_display_get_fb_size(&fb_width, &fb_height, &fb_pitch);
|
||||
|
||||
/* Rationale for current 'DPI' determination method:
|
||||
* - Divide screen height by DPI, to get number of vertical
|
||||
|
@ -23458,7 +23458,7 @@ static void drivers_init(int flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
menu_display_init_first_driver(video_is_threaded);
|
||||
gfx_display_init_first_driver(video_is_threaded);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -27374,7 +27374,7 @@ static enum runloop_state runloop_check_state(void)
|
|||
BIT64_SET(menu_data->state, MENU_STATE_RENDER_FRAMEBUFFER);
|
||||
|
||||
if (BIT64_GET(menu_data->state, MENU_STATE_RENDER_FRAMEBUFFER))
|
||||
menu_display_set_framebuffer_dirty_flag();
|
||||
gfx_display_set_framebuffer_dirty_flag();
|
||||
|
||||
if (BIT64_GET(menu_data->state, MENU_STATE_RENDER_MESSAGEBOX)
|
||||
&& !string_is_empty(menu_data->menu_state_msg))
|
||||
|
|
Loading…
Reference in New Issue