Skip to content

Commit

Permalink
(GLUI) Add initial thumbnail support
Browse files Browse the repository at this point in the history
  • Loading branch information
jdgleaver committed Oct 31, 2019
1 parent d4b7be4 commit c356969
Show file tree
Hide file tree
Showing 25 changed files with 1,655 additions and 165 deletions.
1 change: 1 addition & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/drivers/menu_generic.o \
menu/drivers/null.o \
menu/menu_thumbnail_path.o \
menu/menu_thumbnail.o \
menu/drivers_display/menu_display_null.o

ifeq ($(HAVE_MENU_WIDGETS), 1)
Expand Down
5 changes: 5 additions & 0 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
* of screen space when using landscape layouts */
#define DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR true

/* Default portrait/landscape playlist view modes
* (when thumbnails are enabled) */
#define DEFAULT_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_DISABLED
#define DEFAULT_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DISABLED

#define DEFAULT_CRT_SWITCH_RESOLUTION CRT_SWITCH_NONE

#define DEFAULT_CRT_SWITCH_RESOLUTION_SUPER 2560
Expand Down
2 changes: 2 additions & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,8 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
#endif
SETTING_UINT("materialui_menu_color_theme", &settings->uints.menu_materialui_color_theme, true, DEFAULT_MATERIALUI_THEME, false);
SETTING_UINT("materialui_menu_transition_animation", &settings->uints.menu_materialui_transition_animation, true, DEFAULT_MATERIALUI_TRANSITION_ANIM, false);
SETTING_UINT("materialui_thumbnail_view_portrait", &settings->uints.menu_materialui_thumbnail_view_portrait, true, DEFAULT_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT, false);
SETTING_UINT("materialui_thumbnail_view_landscape", &settings->uints.menu_materialui_thumbnail_view_landscape, true, DEFAULT_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE, false);
SETTING_UINT("menu_shader_pipeline", &settings->uints.menu_xmb_shader_pipeline, true, DEFAULT_MENU_SHADER_PIPELINE, false);
#ifdef HAVE_OZONE
SETTING_UINT("ozone_menu_color_theme", &settings->uints.menu_ozone_color_theme, true, 1, false);
Expand Down
2 changes: 2 additions & 0 deletions configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ typedef struct settings
unsigned menu_xmb_thumbnail_scale_factor;
unsigned menu_materialui_color_theme;
unsigned menu_materialui_transition_animation;
unsigned menu_materialui_thumbnail_view_portrait;
unsigned menu_materialui_thumbnail_view_landscape;
unsigned menu_ozone_color_theme;
unsigned menu_font_color_red;
unsigned menu_font_color_green;
Expand Down
1 change: 1 addition & 0 deletions griffin/griffin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@ MENU
#include "../menu/menu_displaylist.c"
#include "../menu/menu_animation.c"
#include "../menu/menu_thumbnail_path.c"
#include "../menu/menu_thumbnail.c"

#include "../menu/drivers/null.c"
#include "../menu/drivers/menu_generic.c"
Expand Down
4 changes: 4 additions & 0 deletions intl/msg_hash_lbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,10 @@ MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
"materialui_menu_color_theme")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION,
"materialui_menu_transition_animation")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT,
"materialui_thumbnail_view_portrait")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE,
"materialui_thumbnail_view_landscape")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY,
"materialui_menu_footer_opacity")
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY,
Expand Down
48 changes: 48 additions & 0 deletions intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY,
"Load Recent"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_LOAD_CONTENT_HISTORY,
"Select content from recent history playlist."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST,
"Load Content"
Expand Down Expand Up @@ -1819,6 +1823,50 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_NONE,
"OFF"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT,
"Portrait Thumbnail View"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT,
"Specify playlist thumbnail view mode when using portrait display orientations."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE,
"Landscape Thumbnail View"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE,
"Specify playlist thumbnail view mode when using landscape display orientations."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_DISABLED,
"OFF"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_SMALL,
"List (Small)"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_MEDIUM,
"List (Medium)"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DISABLED,
"OFF"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_SMALL,
"List (Small)"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_MEDIUM,
"List (Medium)"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_LARGE,
"List (Large)"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_FOOTER_OPACITY,
"Footer Opacity"
Expand Down
20 changes: 14 additions & 6 deletions menu/cbs/menu_cbs_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,13 @@ int action_switch_thumbnail(const char *path,
if (settings->uints.menu_thumbnails == 0)
{
/* RGUI is a special case where thumbnail 'switch' corresponds to
* toggling thumbnail view on/off. For other menu drivers, we
* cycle through available thumbnail types. */
if(!string_is_equal(settings->arrays.menu_driver, "rgui"))
* toggling thumbnail view on/off.
* GLUI is a special case where thumbnail 'switch' corresponds to
* changing thumbnail view mode.
* For other menu drivers, we cycle through available thumbnail
* types. */
if(!string_is_equal(settings->arrays.menu_driver, "rgui") &&
!string_is_equal(settings->arrays.menu_driver, "glui"))
{
settings->uints.menu_left_thumbnails++;
if (settings->uints.menu_left_thumbnails > 3)
Expand All @@ -122,9 +126,13 @@ int action_switch_thumbnail(const char *path,
else
{
/* RGUI is a special case where thumbnail 'switch' corresponds to
* toggling thumbnail view on/off. For other menu drivers, we
* cycle through available thumbnail types. */
if(!string_is_equal(settings->arrays.menu_driver, "rgui"))
* toggling thumbnail view on/off.
* GLUI is a special case where thumbnail 'switch' corresponds to
* changing thumbnail view mode.
* For other menu drivers, we cycle through available thumbnail
* types. */
if(!string_is_equal(settings->arrays.menu_driver, "rgui") &&
!string_is_equal(settings->arrays.menu_driver, "glui"))
{
settings->uints.menu_thumbnails++;
if (settings->uints.menu_thumbnails > 3)
Expand Down
12 changes: 12 additions & 0 deletions menu/cbs/menu_cbs_sublabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ default_sublabel_macro(action_bind_sublabel_load_disc, MENU_ENU
default_sublabel_macro(action_bind_sublabel_dump_disc, MENU_ENUM_SUBLABEL_DUMP_DISC)
default_sublabel_macro(action_bind_sublabel_content_list, MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST)
default_sublabel_macro(action_bind_sublabel_content_special, MENU_ENUM_SUBLABEL_LOAD_CONTENT_SPECIAL)
default_sublabel_macro(action_bind_sublabel_load_content_history, MENU_ENUM_SUBLABEL_LOAD_CONTENT_HISTORY)
default_sublabel_macro(action_bind_sublabel_network_information, MENU_ENUM_SUBLABEL_NETWORK_INFORMATION)
default_sublabel_macro(action_bind_sublabel_system_information, MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION)
default_sublabel_macro(action_bind_sublabel_quit_retroarch, MENU_ENUM_SUBLABEL_QUIT_RETROARCH)
Expand Down Expand Up @@ -489,6 +490,8 @@ default_sublabel_macro(action_bind_sublabel_xmb_vertical_thumbnails,
default_sublabel_macro(action_bind_sublabel_menu_xmb_thumbnail_scale_factor, MENU_ENUM_SUBLABEL_MENU_XMB_THUMBNAIL_SCALE_FACTOR)
default_sublabel_macro(action_bind_sublabel_menu_color_theme, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME)
default_sublabel_macro(action_bind_sublabel_materialui_menu_transition_animation, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_TRANSITION_ANIMATION)
default_sublabel_macro(action_bind_sublabel_materialui_menu_thumbnail_view_portrait, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT)
default_sublabel_macro(action_bind_sublabel_materialui_menu_thumbnail_view_landscape, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE)
default_sublabel_macro(action_bind_sublabel_ozone_menu_color_theme, MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME)
default_sublabel_macro(action_bind_sublabel_ozone_collapse_sidebar, MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR)
default_sublabel_macro(action_bind_sublabel_ozone_truncate_playlist_name, MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME)
Expand Down Expand Up @@ -1721,6 +1724,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MATERIALUI_MENU_TRANSITION_ANIMATION:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_menu_transition_animation);
break;
case MENU_ENUM_LABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_menu_thumbnail_view_portrait);
break;
case MENU_ENUM_LABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_materialui_menu_thumbnail_view_landscape);
break;
case MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_xmb_shadows_enable);
break;
Expand Down Expand Up @@ -2352,6 +2361,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_special);
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_load_content_history);
break;
case MENU_ENUM_LABEL_START_CORE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_start_core);
break;
Expand Down
Loading

0 comments on commit c356969

Please sign in to comment.