Cleanups for cursor code

This commit is contained in:
twinaphex 2016-04-19 07:35:26 +02:00
parent 846bea4074
commit 528eddbed5
2 changed files with 11 additions and 5 deletions

View File

@ -80,6 +80,11 @@ typedef struct mui_handle
unsigned glyph_width;
char box_message[PATH_MAX_LENGTH];
struct
{
int size;
} cursor;
struct
{
struct
@ -656,10 +661,10 @@ static void mui_draw_cursor(mui_handle_t *mui,
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
draw.x = x - 32;
draw.y = (int)height - y - 32;
draw.width = 64;
draw.height = 64;
draw.x = x - (mui->cursor.size / 2);
draw.y = (int)height - y - (mui->cursor.size / 2);
draw.width = mui->cursor.size;
draw.height = mui->cursor.size;
draw.coords = &coords;
draw.matrix_data = NULL;
draw.texture = mui->textures.list[MUI_TEXTURE_POINTER];
@ -1113,6 +1118,7 @@ static void *mui_init(void **userdata)
mui_layout(mui);
menu_display_allocate_white_texture();
mui->cursor.size = 64.0;
return menu;
error:

View File

@ -2254,7 +2254,7 @@ static void xmb_layout(xmb_handle_t *xmb)
new_header_height = 128.0 * scale_factor;
xmb->margins.screen.top = (256+32) * scale_factor;
xmb->thumbnail_width = 460.0 * scale_factor;
xmb->thumbnail_width = 460.0 * scale_factor;
xmb->cursor.size = 64.0;
xmb->icon.spacing.horizontal = 200.0 * scale_factor;