parent
f8043f847e
commit
8ed246be86
|
@ -640,7 +640,7 @@ static void resampler_sinc_process_c_kaiser(void *re_, struct resampler_data *da
|
||||||
float delta = (float)
|
float delta = (float)
|
||||||
(resamp->time & resamp->subphase_mask) * resamp->subphase_mod;
|
(resamp->time & resamp->subphase_mask) * resamp->subphase_mod;
|
||||||
|
|
||||||
for (i = 0; i < taps; i++)
|
for (i = 0; i < (int)taps; i++)
|
||||||
{
|
{
|
||||||
float sinc_val = phase_table[i] + delta_table[i] * delta;
|
float sinc_val = phase_table[i] + delta_table[i] * delta;
|
||||||
|
|
||||||
|
|
|
@ -7432,18 +7432,14 @@ static void materialui_set_landscape_optimisations_enable(
|
||||||
|
|
||||||
if (landscape_margin > 1.0f)
|
if (landscape_margin > 1.0f)
|
||||||
{
|
{
|
||||||
float entry_margin = 0.0f;
|
|
||||||
float border_width = 0.0f;
|
|
||||||
|
|
||||||
/* When landscape optimisations are active,
|
/* When landscape optimisations are active,
|
||||||
* we increase the effective width of the list
|
* we increase the effective width of the list
|
||||||
* view by up to 'mui->margin', and any remaining
|
* view by up to 'mui->margin', and any remaining
|
||||||
* 'landscape_margin' space is filled with a
|
* 'landscape_margin' space is filled with a
|
||||||
* (shadow gradient) border */
|
* (shadow gradient) border */
|
||||||
entry_margin = (landscape_margin >= (float)mui->margin) ?
|
float entry_margin = (landscape_margin >= (float)mui->margin)
|
||||||
(float)mui->margin : landscape_margin;
|
? (float)mui->margin : landscape_margin;
|
||||||
border_width = landscape_margin - entry_margin;
|
float border_width = landscape_margin - entry_margin;
|
||||||
|
|
||||||
/* Note: In all cases, we want to round down
|
/* Note: In all cases, we want to round down
|
||||||
* when converting these to integers */
|
* when converting these to integers */
|
||||||
mui->landscape_optimization.entry_margin = (unsigned)entry_margin;
|
mui->landscape_optimization.entry_margin = (unsigned)entry_margin;
|
||||||
|
@ -7465,8 +7461,8 @@ static void materialui_status_bar_init(
|
||||||
uintptr_t alpha_tag = (uintptr_t)&mui->status_bar.alpha;
|
uintptr_t alpha_tag = (uintptr_t)&mui->status_bar.alpha;
|
||||||
|
|
||||||
/* Kill any existing fade in animation */
|
/* Kill any existing fade in animation */
|
||||||
if (mui->status_bar.enabled ||
|
if ( (mui->status_bar.enabled)
|
||||||
(mui->status_bar.alpha > 0.0f))
|
|| (mui->status_bar.alpha > 0.0f))
|
||||||
gfx_animation_kill_by_tag(&alpha_tag);
|
gfx_animation_kill_by_tag(&alpha_tag);
|
||||||
|
|
||||||
/* Reset base parameters */
|
/* Reset base parameters */
|
||||||
|
@ -7947,8 +7943,8 @@ static void materialui_layout(
|
||||||
mui->sys_bar_margin = mui->dip_base_unit_size / 12;
|
mui->sys_bar_margin = mui->dip_base_unit_size / 12;
|
||||||
mui->sys_bar_icon_size = mui->dip_base_unit_size / 7;
|
mui->sys_bar_icon_size = mui->dip_base_unit_size / 7;
|
||||||
|
|
||||||
mui->entry_divider_width = (mui->last_scale_factor > 1.0f) ?
|
mui->entry_divider_width = (mui->last_scale_factor > 1.0f)
|
||||||
(unsigned)(mui->last_scale_factor + 0.5f) : 1;
|
? (unsigned)(mui->last_scale_factor + 0.5f) : 1;
|
||||||
|
|
||||||
/* Additional vertical spacing between label and
|
/* Additional vertical spacing between label and
|
||||||
* sublabel text */
|
* sublabel text */
|
||||||
|
@ -8611,7 +8607,7 @@ static void materialui_populate_entries(
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST)))
|
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST)))
|
||||||
mui->flags |= MUI_FLAG_IS_CORE_UPDATER_LIST;
|
mui->flags |= MUI_FLAG_IS_CORE_UPDATER_LIST;
|
||||||
else
|
else
|
||||||
mui->flags &= ~MUI_FLAG_IS_CORE_UPDATER_LIST;
|
mui->flags &= ~(MUI_FLAG_IS_CORE_UPDATER_LIST);
|
||||||
|
|
||||||
/* Check whether we are currently viewing a playlist,
|
/* Check whether we are currently viewing a playlist,
|
||||||
* file-browser-type list or dropdown list
|
* file-browser-type list or dropdown list
|
||||||
|
@ -8684,9 +8680,9 @@ msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_INPUT_DESCRIPTION_KBD
|
||||||
file_list_t *list = menu_entries_get_selection_buf_ptr(0);
|
file_list_t *list = menu_entries_get_selection_buf_ptr(0);
|
||||||
size_t list_size = menu_entries_get_size();
|
size_t list_size = menu_entries_get_size();
|
||||||
|
|
||||||
if (list &&
|
if ( (list)
|
||||||
(list_size > 0) &&
|
&& (list_size > 0)
|
||||||
(list->list[0].type == FILE_TYPE_RPL_ENTRY))
|
&& (list->list[0].type == FILE_TYPE_RPL_ENTRY))
|
||||||
mui->playlist = playlist_get_cached();
|
mui->playlist = playlist_get_cached();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9319,8 +9315,8 @@ static enum menu_action materialui_parse_menu_entry_action(
|
||||||
* user instigates a cancel action from any top
|
* user instigates a cancel action from any top
|
||||||
* level menu other than main *if* the navigation
|
* level menu other than main *if* the navigation
|
||||||
* bar is hidden */
|
* bar is hidden */
|
||||||
if ((mui->nav_bar.location == MUI_NAV_BAR_LOCATION_HIDDEN) &&
|
if ( (mui->nav_bar.location == MUI_NAV_BAR_LOCATION_HIDDEN)
|
||||||
(materialui_list_get_size(mui, MENU_LIST_PLAIN) == 1))
|
&& (materialui_list_get_size(mui, MENU_LIST_PLAIN) == 1))
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
size_t main_menu_tab_index = 0;
|
size_t main_menu_tab_index = 0;
|
||||||
|
@ -9749,8 +9745,8 @@ static int materialui_pointer_down(void *userdata,
|
||||||
|
|
||||||
/* Check whether pointer X position is within
|
/* Check whether pointer X position is within
|
||||||
* scrollbar 'grab box' */
|
* scrollbar 'grab box' */
|
||||||
if (((int)x < mui->scrollbar.x - drag_margin_horz) ||
|
if ( ((int)x < mui->scrollbar.x - drag_margin_horz)
|
||||||
((int)x > mui->scrollbar.x + (int)mui->scrollbar.width))
|
|| ((int)x > mui->scrollbar.x + (int)mui->scrollbar.width))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Determine vertical height of scrollbar
|
/* Determine vertical height of scrollbar
|
||||||
|
@ -9763,8 +9759,8 @@ static int materialui_pointer_down(void *userdata,
|
||||||
|
|
||||||
/* Check whether pointer Y position is within
|
/* Check whether pointer Y position is within
|
||||||
* scrollbar 'grab box' */
|
* scrollbar 'grab box' */
|
||||||
if (((int)y < mui->scrollbar.y - drag_margin_vert) ||
|
if ( ((int)y < mui->scrollbar.y - drag_margin_vert)
|
||||||
((int)y > mui->scrollbar.y + (int)mui->scrollbar.height + drag_margin_vert))
|
|| ((int)y > mui->scrollbar.y + (int)mui->scrollbar.height + drag_margin_vert))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* User has 'selected' scrollbar */
|
/* User has 'selected' scrollbar */
|
||||||
|
@ -9796,10 +9792,10 @@ static int materialui_pointer_up_swipe_horz_plain_list(
|
||||||
return materialui_menu_entry_action(
|
return materialui_menu_entry_action(
|
||||||
mui, entry, selection,
|
mui, entry, selection,
|
||||||
scroll_up ? MENU_ACTION_SCROLL_UP : MENU_ACTION_SCROLL_DOWN);
|
scroll_up ? MENU_ACTION_SCROLL_UP : MENU_ACTION_SCROLL_DOWN);
|
||||||
|
|
||||||
/* A swipe in the bottom half of the screen scrolls
|
/* A swipe in the bottom half of the screen scrolls
|
||||||
* by 10% of the list size or one 'page', whichever
|
* by 10% of the list size or one 'page', whichever
|
||||||
* is largest */
|
* is largest */
|
||||||
else
|
|
||||||
{
|
{
|
||||||
float content_height_fraction = mui->content_height * 0.1f;
|
float content_height_fraction = mui->content_height * 0.1f;
|
||||||
float display_height = (int)height - (int)header_height -
|
float display_height = (int)height - (int)header_height -
|
||||||
|
@ -9820,12 +9816,10 @@ static int materialui_pointer_up_swipe_horz_default(
|
||||||
materialui_handle_t *mui, menu_entry_t *entry,
|
materialui_handle_t *mui, menu_entry_t *entry,
|
||||||
unsigned ptr, size_t selection, size_t entries_end, enum menu_action action)
|
unsigned ptr, size_t selection, size_t entries_end, enum menu_action action)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if ((ptr < entries_end) && (ptr == selection))
|
if ((ptr < entries_end) && (ptr == selection))
|
||||||
{
|
{
|
||||||
size_t new_selection = menu_navigation_get_selection();
|
size_t new_selection = menu_navigation_get_selection();
|
||||||
ret = materialui_menu_entry_action(
|
int ret = materialui_menu_entry_action(
|
||||||
mui, entry, selection, action);
|
mui, entry, selection, action);
|
||||||
|
|
||||||
/* If we are changing a settings value, want to scroll
|
/* If we are changing a settings value, want to scroll
|
||||||
|
@ -9840,11 +9834,11 @@ static int materialui_pointer_up_swipe_horz_default(
|
||||||
* will always have a blank value component */
|
* will always have a blank value component */
|
||||||
if (selection == new_selection)
|
if (selection == new_selection)
|
||||||
{
|
{
|
||||||
|
menu_entry_t last_entry;
|
||||||
const char *entry_value = NULL;
|
const char *entry_value = NULL;
|
||||||
unsigned entry_type = 0;
|
unsigned entry_type = 0;
|
||||||
enum msg_file_type entry_file_type = FILE_TYPE_NONE;
|
enum msg_file_type entry_file_type = FILE_TYPE_NONE;
|
||||||
enum materialui_entry_value_type entry_value_type = MUI_ENTRY_VALUE_NONE;
|
enum materialui_entry_value_type entry_value_type = MUI_ENTRY_VALUE_NONE;
|
||||||
menu_entry_t last_entry;
|
|
||||||
|
|
||||||
/* Get entry */
|
/* Get entry */
|
||||||
MENU_ENTRY_INITIALIZE(last_entry);
|
MENU_ENTRY_INITIALIZE(last_entry);
|
||||||
|
@ -9873,11 +9867,13 @@ static int materialui_pointer_up_swipe_horz_default(
|
||||||
mui->pointer_start_scroll_y,
|
mui->pointer_start_scroll_y,
|
||||||
MUI_ANIM_DURATION_SCROLL_RESET);
|
MUI_ANIM_DURATION_SCROLL_RESET);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int materialui_pointer_up_nav_bar(
|
static int materialui_pointer_up_nav_bar(
|
||||||
materialui_handle_t *mui,
|
materialui_handle_t *mui,
|
||||||
unsigned x, unsigned y, unsigned width, unsigned height, size_t selection,
|
unsigned x, unsigned y, unsigned width, unsigned height, size_t selection,
|
||||||
|
@ -10055,12 +10051,10 @@ static int materialui_pointer_up(void *userdata,
|
||||||
|
|
||||||
/* Get node (entry) associated with current
|
/* Get node (entry) associated with current
|
||||||
* pointer item */
|
* pointer item */
|
||||||
list = menu_entries_get_selection_buf_ptr(0);
|
if (!(list = menu_entries_get_selection_buf_ptr(0)))
|
||||||
if (!list)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
node = (materialui_node_t*)list->list[ptr].userdata;
|
if (!(node = (materialui_node_t*)list->list[ptr].userdata))
|
||||||
if (!node)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Get pointer item x/y position */
|
/* Get pointer item x/y position */
|
||||||
|
@ -10095,8 +10089,7 @@ static int materialui_pointer_up(void *userdata,
|
||||||
* on the correct target entry */
|
* on the correct target entry */
|
||||||
return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_SELECT);
|
return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_SELECT);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* A 'short' press is used only to activate (highlight)
|
/* A 'short' press is used only to activate (highlight)
|
||||||
* an item - it does not invoke a MENU_ACTION_SELECT
|
* an item - it does not invoke a MENU_ACTION_SELECT
|
||||||
* action (this is intended for use in activating a
|
* action (this is intended for use in activating a
|
||||||
|
@ -10110,7 +10103,6 @@ static int materialui_pointer_up(void *userdata,
|
||||||
menu_input_set_pointer_y_accel(0.0f);
|
menu_input_set_pointer_y_accel(0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_INPUT_GESTURE_LONG_PRESS:
|
case MENU_INPUT_GESTURE_LONG_PRESS:
|
||||||
if ((ptr < entries_end) && (ptr == selection))
|
if ((ptr < entries_end) && (ptr == selection))
|
||||||
|
@ -10121,7 +10113,6 @@ static int materialui_pointer_up(void *userdata,
|
||||||
* action */
|
* action */
|
||||||
if (mui->flags & MUI_FLAG_IS_CORE_UPDATER_LIST)
|
if (mui->flags & MUI_FLAG_IS_CORE_UPDATER_LIST)
|
||||||
return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_INFO);
|
return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_INFO);
|
||||||
else
|
|
||||||
return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_START);
|
return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_START);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -10912,8 +10903,7 @@ static void materialui_list_clear(file_list_t *list)
|
||||||
static void materialui_set_thumbnail_system(void *userdata, char *s, size_t len)
|
static void materialui_set_thumbnail_system(void *userdata, char *s, size_t len)
|
||||||
{
|
{
|
||||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||||
if (!mui)
|
if (mui)
|
||||||
return;
|
|
||||||
gfx_thumbnail_set_system(
|
gfx_thumbnail_set_system(
|
||||||
mui->thumbnail_path_data, s, playlist_get_cached());
|
mui->thumbnail_path_data, s, playlist_get_cached());
|
||||||
}
|
}
|
||||||
|
@ -10922,8 +10912,7 @@ static void materialui_get_thumbnail_system(void *userdata, char *s, size_t len)
|
||||||
{
|
{
|
||||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||||
const char *system = NULL;
|
const char *system = NULL;
|
||||||
if (!mui)
|
if (mui)
|
||||||
return;
|
|
||||||
if (gfx_thumbnail_get_system(mui->thumbnail_path_data, &system))
|
if (gfx_thumbnail_get_system(mui->thumbnail_path_data, &system))
|
||||||
strlcpy(s, system, len);
|
strlcpy(s, system, len);
|
||||||
}
|
}
|
||||||
|
@ -10939,8 +10928,8 @@ static void materialui_refresh_thumbnail_image(void *userdata, unsigned i)
|
||||||
|
|
||||||
/* Only refresh thumbnails if we are currently viewing
|
/* Only refresh thumbnails if we are currently viewing
|
||||||
* a playlist with thumbnails enabled */
|
* a playlist with thumbnails enabled */
|
||||||
if ((mui->list_view_type == MUI_LIST_VIEW_DEFAULT) ||
|
if ( (mui->list_view_type == MUI_LIST_VIEW_DEFAULT)
|
||||||
(mui->list_view_type == MUI_LIST_VIEW_PLAYLIST))
|
|| (mui->list_view_type == MUI_LIST_VIEW_PLAYLIST))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Only refresh thumbnails if:
|
/* Only refresh thumbnails if:
|
||||||
|
@ -10961,10 +10950,7 @@ static void materialui_refresh_thumbnail_image(void *userdata, unsigned i)
|
||||||
if (!list)
|
if (!list)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
node = (materialui_node_t*)
|
if (!(node = (materialui_node_t*)list->list[(size_t)i].userdata))
|
||||||
list->list[(size_t)i].userdata;
|
|
||||||
|
|
||||||
if (!node)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Reset existing thumbnails */
|
/* Reset existing thumbnails */
|
||||||
|
|
Loading…
Reference in New Issue