mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
gfx_display_draw_cursor - take out early return
This commit is contained in:
parent
8e5596873a
commit
cecd48e6b5
@ -1213,9 +1213,6 @@ void gfx_display_draw_cursor(
|
|||||||
gfx_display_t *p_disp = disp_get_ptr();
|
gfx_display_t *p_disp = disp_get_ptr();
|
||||||
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
|
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
|
||||||
|
|
||||||
if (!cursor_visible)
|
|
||||||
return;
|
|
||||||
|
|
||||||
coords.vertices = 4;
|
coords.vertices = 4;
|
||||||
coords.vertex = NULL;
|
coords.vertex = NULL;
|
||||||
coords.tex_coord = NULL;
|
coords.tex_coord = NULL;
|
||||||
|
@ -6796,18 +6796,19 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
|||||||
bool cursor_visible = video_fullscreen
|
bool cursor_visible = video_fullscreen
|
||||||
&& menu_mouse_enable;
|
&& menu_mouse_enable;
|
||||||
|
|
||||||
gfx_display_draw_cursor(
|
if (cursor_visible)
|
||||||
userdata,
|
gfx_display_draw_cursor(
|
||||||
video_width,
|
userdata,
|
||||||
video_height,
|
video_width,
|
||||||
cursor_visible,
|
video_height,
|
||||||
color_white,
|
cursor_visible,
|
||||||
mui->cursor_size,
|
color_white,
|
||||||
mui->textures.list[MUI_TEXTURE_POINTER],
|
mui->cursor_size,
|
||||||
mui->pointer.x,
|
mui->textures.list[MUI_TEXTURE_POINTER],
|
||||||
mui->pointer.y,
|
mui->pointer.x,
|
||||||
video_width,
|
mui->pointer.y,
|
||||||
video_height);
|
video_width,
|
||||||
|
video_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Undo any transparency adjustments caused
|
/* Undo any transparency adjustments caused
|
||||||
|
@ -2904,19 +2904,20 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||||||
bool cursor_visible = video_fullscreen && menu_mouse_enable;
|
bool cursor_visible = video_fullscreen && menu_mouse_enable;
|
||||||
|
|
||||||
gfx_display_set_alpha(ozone_pure_white, 1.0f);
|
gfx_display_set_alpha(ozone_pure_white, 1.0f);
|
||||||
gfx_display_draw_cursor(
|
if (cursor_visible)
|
||||||
userdata,
|
gfx_display_draw_cursor(
|
||||||
video_width,
|
userdata,
|
||||||
video_height,
|
video_width,
|
||||||
cursor_visible,
|
video_height,
|
||||||
ozone_pure_white,
|
cursor_visible,
|
||||||
ozone->dimensions.cursor_size,
|
ozone_pure_white,
|
||||||
ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_POINTER],
|
ozone->dimensions.cursor_size,
|
||||||
ozone->pointer.x,
|
ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_POINTER],
|
||||||
ozone->pointer.y,
|
ozone->pointer.x,
|
||||||
video_width,
|
ozone->pointer.y,
|
||||||
video_height
|
video_width,
|
||||||
);
|
video_height
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unbind fonts */
|
/* Unbind fonts */
|
||||||
|
@ -3034,18 +3034,19 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
|||||||
|
|
||||||
gfx_display_set_alpha(stripes_coord_white, MIN(stripes->alpha, 1.00f));
|
gfx_display_set_alpha(stripes_coord_white, MIN(stripes->alpha, 1.00f));
|
||||||
|
|
||||||
gfx_display_draw_cursor(
|
if (cursor_visible)
|
||||||
userdata,
|
gfx_display_draw_cursor(
|
||||||
video_width,
|
userdata,
|
||||||
video_height,
|
video_width,
|
||||||
cursor_visible,
|
video_height,
|
||||||
&stripes_coord_white[0],
|
cursor_visible,
|
||||||
stripes->cursor_size,
|
&stripes_coord_white[0],
|
||||||
stripes->textures.list[STRIPES_TEXTURE_POINTER],
|
stripes->cursor_size,
|
||||||
pointer.x,
|
stripes->textures.list[STRIPES_TEXTURE_POINTER],
|
||||||
pointer.y,
|
pointer.x,
|
||||||
video_width,
|
pointer.y,
|
||||||
video_height);
|
video_width,
|
||||||
|
video_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
video_driver_set_viewport(video_width, video_height, false, true);
|
video_driver_set_viewport(video_width, video_height, false, true);
|
||||||
|
@ -5281,18 +5281,19 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||||||
&& menu_mouse_enable;
|
&& menu_mouse_enable;
|
||||||
|
|
||||||
gfx_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f));
|
gfx_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f));
|
||||||
gfx_display_draw_cursor(
|
if (cursor_visible)
|
||||||
userdata,
|
gfx_display_draw_cursor(
|
||||||
video_width,
|
userdata,
|
||||||
video_height,
|
video_width,
|
||||||
cursor_visible,
|
video_height,
|
||||||
&coord_white[0],
|
cursor_visible,
|
||||||
xmb->cursor_size,
|
&coord_white[0],
|
||||||
xmb->textures.list[XMB_TEXTURE_POINTER],
|
xmb->cursor_size,
|
||||||
xmb->pointer.x,
|
xmb->textures.list[XMB_TEXTURE_POINTER],
|
||||||
xmb->pointer.y,
|
xmb->pointer.x,
|
||||||
video_width,
|
xmb->pointer.y,
|
||||||
video_height);
|
video_width,
|
||||||
|
video_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
video_driver_set_viewport(video_width, video_height, false, true);
|
video_driver_set_viewport(video_width, video_height, false, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user