mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
cleanups
This commit is contained in:
parent
e08689ed98
commit
7f958862fe
@ -1300,18 +1300,16 @@ void gfx_display_rotate_z(gfx_display_ctx_rotate_draw_t *draw, void *data)
|
||||
* Draw a hardware cursor on top of the screen for the mouse.
|
||||
*/
|
||||
void gfx_display_draw_cursor(
|
||||
video_frame_info_t *video_info,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
bool cursor_visible,
|
||||
float *color, float cursor_size, uintptr_t texture,
|
||||
float x, float y, unsigned width, unsigned height)
|
||||
{
|
||||
gfx_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
bool cursor_visible = video_info->fullscreen
|
||||
|| video_info->menu_mouse_enable;
|
||||
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
if (!cursor_visible)
|
||||
return;
|
||||
|
||||
|
@ -219,7 +219,10 @@ void gfx_display_snow(
|
||||
int width, int height);
|
||||
|
||||
void gfx_display_draw_cursor(
|
||||
video_frame_info_t *video_info,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
bool cursor_visible,
|
||||
float *color, float cursor_size, uintptr_t texture,
|
||||
float x, float y, unsigned width, unsigned height);
|
||||
|
||||
|
@ -5143,9 +5143,14 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
1.0f, 1.0f, 1.0f, 1.0f,
|
||||
1.0f, 1.0f, 1.0f, 1.0f
|
||||
};
|
||||
bool cursor_visible = video_info->fullscreen
|
||||
|| video_info->menu_mouse_enable;
|
||||
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
cursor_visible,
|
||||
color_white,
|
||||
mui->cursor_size,
|
||||
mui->textures.list[MUI_TEXTURE_POINTER],
|
||||
|
@ -2259,9 +2259,15 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
/* Cursor */
|
||||
if (ozone->show_cursor && (ozone->pointer.type != MENU_POINTER_DISABLED))
|
||||
{
|
||||
bool cursor_visible = video_info->fullscreen
|
||||
|| video_info->menu_mouse_enable;
|
||||
|
||||
gfx_display_set_alpha(ozone_pure_white, 1.0f);
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
cursor_visible,
|
||||
ozone_pure_white,
|
||||
ozone->dimensions.cursor_size,
|
||||
ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_POINTER],
|
||||
|
@ -3029,11 +3029,18 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
||||
if (stripes->mouse_show)
|
||||
{
|
||||
menu_input_pointer_t pointer;
|
||||
bool cursor_visible = video_info->fullscreen
|
||||
|| video_info->menu_mouse_enable;
|
||||
|
||||
menu_input_get_pointer_state(&pointer);
|
||||
|
||||
gfx_display_set_alpha(stripes_coord_white, MIN(stripes->alpha, 1.00f));
|
||||
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
cursor_visible,
|
||||
&stripes_coord_white[0],
|
||||
stripes->cursor_size,
|
||||
stripes->textures.list[STRIPES_TEXTURE_POINTER],
|
||||
|
@ -4922,11 +4922,17 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
if (xmb->mouse_show)
|
||||
{
|
||||
menu_input_pointer_t pointer;
|
||||
bool cursor_visible = video_info->fullscreen
|
||||
|| video_info->menu_mouse_enable;
|
||||
|
||||
menu_input_get_pointer_state(&pointer);
|
||||
|
||||
gfx_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f));
|
||||
gfx_display_draw_cursor(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
cursor_visible,
|
||||
&coord_white[0],
|
||||
xmb->cursor_size,
|
||||
xmb->textures.list[XMB_TEXTURE_POINTER],
|
||||
|
Loading…
Reference in New Issue
Block a user