mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Cleanups/style nits
This commit is contained in:
parent
bac0d22ce9
commit
5370c59201
@ -641,7 +641,7 @@ static void materialui_compute_entries_box(materialui_handle_t* mui, int width)
|
||||
}
|
||||
|
||||
/* Called on each frame. We use this callback to implement the touch scroll
|
||||
with acceleration */
|
||||
with acceleration */
|
||||
static void materialui_render(void *data, bool is_idle)
|
||||
{
|
||||
menu_animation_ctx_delta_t delta;
|
||||
@ -1075,7 +1075,7 @@ static void materialui_draw_bg(menu_display_ctx_draw_t *draw,
|
||||
}
|
||||
|
||||
/* Main function of the menu driver. Takes care of drawing the header, the tabs,
|
||||
and the menu list */
|
||||
and the menu list */
|
||||
static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
/* This controls the main background color */
|
||||
@ -1808,7 +1808,7 @@ static float materialui_get_scroll(materialui_handle_t *mui)
|
||||
}
|
||||
|
||||
/* The navigation pointer has been updated (for example by pressing up or down
|
||||
on the keyboard). We use this function to animate the scroll. */
|
||||
on the keyboard). We use this function to animate the scroll. */
|
||||
static void materialui_navigation_set(void *data, bool scroll)
|
||||
{
|
||||
menu_animation_ctx_entry_t entry;
|
||||
@ -1953,7 +1953,7 @@ static void materialui_preswitch_tabs(materialui_handle_t *mui, unsigned action)
|
||||
}
|
||||
|
||||
/* This callback is not caching anything. We use it to navigate the tabs
|
||||
with the keyboard */
|
||||
with the keyboard */
|
||||
static void materialui_list_cache(void *data,
|
||||
enum menu_list_type type, unsigned action)
|
||||
{
|
||||
@ -2003,7 +2003,7 @@ static void materialui_list_cache(void *data,
|
||||
}
|
||||
|
||||
/* A new list has been pushed. We use this callback to customize a few lists for
|
||||
this menu driver */
|
||||
this menu driver */
|
||||
static int materialui_list_push(void *data, void *userdata,
|
||||
menu_displaylist_info_t *info, unsigned type)
|
||||
{
|
||||
@ -2176,7 +2176,7 @@ static size_t materialui_list_get_selection(void *data)
|
||||
}
|
||||
|
||||
/* The pointer or the mouse is pressed down. We use this callback to
|
||||
highlight the entry that has been pressed */
|
||||
highlight the entry that has been pressed */
|
||||
static int materialui_pointer_down(void *userdata,
|
||||
unsigned x, unsigned y,
|
||||
unsigned ptr, menu_file_list_cbs_t *cbs,
|
||||
@ -2224,9 +2224,9 @@ static int materialui_pointer_down(void *userdata,
|
||||
}
|
||||
|
||||
/* The pointer or the left mouse button has been released.
|
||||
If we clicked on the header, we perform a cancel action.
|
||||
If we clicked on the tabs, we switch to a new list.
|
||||
If we clicked on a menu entry, we call the entry action callback. */
|
||||
If we clicked on the header, we perform a cancel action.
|
||||
If we clicked on the tabs, we switch to a new list.
|
||||
If we clicked on a menu entry, we call the entry action callback. */
|
||||
static int materialui_pointer_up(void *userdata,
|
||||
unsigned x, unsigned y,
|
||||
unsigned ptr, menu_file_list_cbs_t *cbs,
|
||||
|
@ -105,9 +105,11 @@ enum
|
||||
#ifdef HAVE_NETWORKING
|
||||
XMB_TEXTURE_NETPLAY,
|
||||
XMB_TEXTURE_ROOM,
|
||||
/* stub these out until we have the icons
|
||||
#if 0
|
||||
/* stub these out until we have the icons */
|
||||
XMB_TEXTURE_ROOM_LAN,
|
||||
XMB_TEXTURE_ROOM_MITM,*/
|
||||
XMB_TEXTURE_ROOM_MITM,
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
XMB_TEXTURE_IMAGES,
|
||||
@ -3080,11 +3082,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
- (xmb->margins_screen_left * scale_mod[5]) -
|
||||
xmb->icon_spacing_horizontal - pseudo_font_length;
|
||||
|
||||
#ifdef XMB_DEBUG
|
||||
#ifdef XMB_DEBUG
|
||||
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
|
||||
xmb->thumbnail_width, xmb->thumbnail_height);
|
||||
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (xmb->thumbnail_width * scale_mod[4] > thumb_max_width)
|
||||
{
|
||||
@ -3144,11 +3146,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
float left_thumb_height = 0.0f;
|
||||
float thumb_max_width = xmb->icon_size * 3.4;
|
||||
|
||||
#ifdef XMB_DEBUG
|
||||
#ifdef XMB_DEBUG
|
||||
RARCH_LOG("[XMB left thumbnail] width: %.2f, height: %.2f\n",
|
||||
xmb->left_thumbnail_width, xmb->left_thumbnail_height);
|
||||
RARCH_LOG("[XMB left thumbnail] w: %.2f, h: %.2f\n", width, height);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (xmb->left_thumbnail_width * scale_mod[4] > thumb_max_width)
|
||||
{
|
||||
@ -3216,11 +3218,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
- (xmb->margins_screen_left * scale_mod[5]) -
|
||||
xmb->icon_spacing_horizontal - pseudo_font_length;
|
||||
|
||||
#ifdef XMB_DEBUG
|
||||
#ifdef XMB_DEBUG
|
||||
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
|
||||
xmb->thumbnail_width, xmb->thumbnail_height);
|
||||
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (xmb->left_thumbnail_width * scale_mod[4] > thumb_max_width)
|
||||
{
|
||||
@ -3461,11 +3463,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
(xmb->margins_screen_left * scale_mod[5]) -
|
||||
xmb->icon_spacing_horizontal - pseudo_font_length;
|
||||
|
||||
#ifdef XMB_DEBUG
|
||||
#ifdef XMB_DEBUG
|
||||
RARCH_LOG("[XMB thumbnail] width: %.2f, height: %.2f\n",
|
||||
xmb->thumbnail_width, xmb->thumbnail_height);
|
||||
RARCH_LOG("[XMB thumbnail] w: %.2f, h: %.2f\n", width, height);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (xmb->thumbnail_width * scale_mod[4] > thumb_max_width)
|
||||
{
|
||||
@ -3525,11 +3527,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
(xmb->margins_screen_left * scale_mod[5]) -
|
||||
xmb->icon_spacing_horizontal - pseudo_font_length;
|
||||
|
||||
#ifdef XMB_DEBUG
|
||||
#ifdef XMB_DEBUG
|
||||
RARCH_LOG("[XMB left thumbnail] width: %.2f, height: %.2f\n",
|
||||
xmb->left_thumbnail_width, xmb->left_thumbnail_height);
|
||||
RARCH_LOG("[XMB left thumbnail] w: %.2f, h: %.2f\n", width, height);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (xmb->left_thumbnail_width * scale_mod[4] > thumb_max_width)
|
||||
{
|
||||
@ -3918,6 +3920,7 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
||||
/* scaling multiplier formulas made from these values: */
|
||||
/* xmb_scale 50 = {2.5, 2.5, 2, 1.7, 2.5, 4, 2.4, 2.5} */
|
||||
/* xmb_scale 75 = { 2, 1.6, 1.6, 1.4, 1.5, 2.3, 1.9, 1.3} */
|
||||
|
||||
if (scale_value < 100)
|
||||
{
|
||||
/* text length & word wrap (base 35 apply to file browser, 1st column) */
|
||||
@ -4249,12 +4252,13 @@ static const char *xmb_texture_path(unsigned id)
|
||||
return "netplay.png";
|
||||
case XMB_TEXTURE_ROOM:
|
||||
return "room.png";
|
||||
/* stub these out until we have the icons
|
||||
#if 0
|
||||
/* stub these out until we have the icons */
|
||||
case XMB_TEXTURE_ROOM_LAN:
|
||||
return "room_lan.png";
|
||||
case XMB_TEXTURE_ROOM_MITM:
|
||||
return "room_mitm.png";
|
||||
*/
|
||||
#endif
|
||||
#endif
|
||||
case XMB_TEXTURE_KEY:
|
||||
return "key.png";
|
||||
|
Loading…
x
Reference in New Issue
Block a user