Add 'Notification Visibility' menu

This commit is contained in:
jdgleaver 2020-07-16 16:30:38 +01:00
parent 324eb4f098
commit 75b3b5350c
19 changed files with 519 additions and 243 deletions

View file

@ -771,6 +771,28 @@ static const bool audio_enable_menu_bgm = false;
* > Currently implemented only as a widget */
#define DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION DEFAULT_MENU_ENABLE_WIDGETS
/* Display a notification when successfully
* connecting/disconnecting an autoconfigured
* controller
* > Disabled by default on the Switch */
#if defined(HAVE_LIBNX) && defined(HAVE_GFX_WIDGETS)
#define DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG false
#else
#define DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG true
#endif
/* Display a notification when loading an
* input remap file */
#define DEFAULT_NOTIFICATION_SHOW_REMAP_LOAD true
/* Display a notification when loading a
* configuration override file */
#define DEFAULT_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD true
/* Display a notification when fast forwarding
* content */
#define DEFAULT_NOTIFICATION_SHOW_FAST_FORWARD true
/* Output samplerate. */
#ifdef GEKKO
#define DEFAULT_OUTPUT_RATE 32000

View file

@ -1473,6 +1473,10 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, DEFAULT_AUDIO_ENABLE, false);
SETTING_BOOL("menu_enable_widgets", &settings->bools.menu_enable_widgets, true, DEFAULT_MENU_ENABLE_WIDGETS, false);
SETTING_BOOL("menu_show_load_content_animation", &settings->bools.menu_show_load_content_animation, true, DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION, false);
SETTING_BOOL("notification_show_autoconfig", &settings->bools.notification_show_autoconfig, true, DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG, false);
SETTING_BOOL("notification_show_remap_load", &settings->bools.notification_show_remap_load, true, DEFAULT_NOTIFICATION_SHOW_REMAP_LOAD, false);
SETTING_BOOL("notification_show_config_override_load", &settings->bools.notification_show_config_override_load, true, DEFAULT_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD, false);
SETTING_BOOL("notification_show_fast_forward", &settings->bools.notification_show_fast_forward, true, DEFAULT_NOTIFICATION_SHOW_FAST_FORWARD, false);
SETTING_BOOL("menu_widget_scale_auto", &settings->bools.menu_widget_scale_auto, true, DEFAULT_MENU_WIDGET_SCALE_AUTO, false);
SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, audio_enable_menu, false);
SETTING_BOOL("audio_enable_menu_ok", &settings->bools.audio_enable_menu_ok, true, audio_enable_menu_ok, false);
@ -3428,6 +3432,7 @@ bool config_load_override(void *data)
system->info.library_name : NULL;
const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME);
const char *game_name = path_basename(rarch_path_basename);
settings_t *settings = config_get_ptr();
char content_dir_name[PATH_MAX_LENGTH];
if (!string_is_empty(rarch_path_basename))
@ -3566,15 +3571,16 @@ bool config_load_override(void *data)
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL);
if (!config_load_file(global_get_ptr(),
path_get(RARCH_PATH_CONFIG), config_get_ptr()))
path_get(RARCH_PATH_CONFIG), settings))
goto error;
/* Restore the libretro_path we're using
* since it will be overwritten by the override when reloading. */
path_set(RARCH_PATH_CORE, buf);
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_OVERRIDE_LOADED),
1, 100, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
if (settings->bools.notification_show_config_override_load)
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_OVERRIDE_LOADED),
1, 100, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
/* Reset save paths. */
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
@ -3652,6 +3658,8 @@ bool config_load_remap(const char *directory_input_remapping,
const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME);
const char *game_name = path_basename(rarch_path_basename);
enum msg_hash_enums msg_remap_loaded = MSG_GAME_REMAP_FILE_LOADED;
settings_t *settings = config_get_ptr();
bool notification_show_remap_load = settings->bools.notification_show_remap_load;
char content_dir_name[PATH_MAX_LENGTH];
if (string_is_empty(core_name) || string_is_empty(game_name))
@ -3752,9 +3760,11 @@ bool config_load_remap(const char *directory_input_remapping,
return false;
success:
runloop_msg_queue_push(
msg_hash_to_str(msg_remap_loaded), 1, 100, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
if (notification_show_remap_load)
runloop_msg_queue_push(
msg_hash_to_str(msg_remap_loaded), 1, 100, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
free(content_path);
free(remap_directory);
free(core_path);

View file

@ -159,6 +159,10 @@ typedef struct settings
bool filter_by_current_core;
bool menu_enable_widgets;
bool menu_show_load_content_animation;
bool notification_show_autoconfig;
bool notification_show_remap_load;
bool notification_show_config_override_load;
bool notification_show_fast_forward;
bool menu_widget_scale_auto;
bool menu_show_start_screen;
bool menu_pause_libretro;

View file

@ -892,6 +892,10 @@ MSG_HASH(
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST,
"deferred_onscreen_notifications_settings_list"
)
MSG_HASH(
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST,
"deferred_onscreen_notifications_views_settings_list"
)
MSG_HASH(
MENU_ENUM_LABEL_DEFERRED_PLAYLIST_SETTINGS_LIST,
"deferred_playlist_settings"
@ -1928,6 +1932,10 @@ MSG_HASH(
MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS,
"onscreen_notifications_settings"
)
MSG_HASH(
MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS,
"onscreen_notifications_views_settings"
)
MSG_HASH(
MENU_ENUM_LABEL_OPEN_ARCHIVE,
"open_archive"
@ -4308,6 +4316,22 @@ MSG_HASH(
MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION,
"menu_show_load_content_animation"
)
MSG_HASH(
MENU_ENUM_LABEL_NOTIFICATION_SHOW_AUTOCONFIG,
"notification_show_autoconfig"
)
MSG_HASH(
MENU_ENUM_LABEL_NOTIFICATION_SHOW_REMAP_LOAD,
"notification_show_remap_load"
)
MSG_HASH(
MENU_ENUM_LABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD,
"notification_show_config_override_load"
)
MSG_HASH(
MENU_ENUM_LABEL_NOTIFICATION_SHOW_FAST_FORWARD,
"notification_show_fast_forward"
)
MSG_HASH(
MENU_ENUM_LABEL_VIDEO_SHADERS_ENABLE,
"video_shader_enable"

View file

@ -3169,6 +3169,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS,
"Adjust On-Screen Notifications"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS,
"Notification Visibility"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS,
"Toggle the visibility of specific types of notification."
)
/* Settings > On-Screen Display > On-Screen Overlay */
@ -3388,6 +3396,38 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION,
"Show a brief launch feedback animation when loading content."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_AUTOCONFIG,
"Input (Autoconfig) Connection Notifications"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_AUTOCONFIG,
"Display an on-screen message when connecting/disconnecting input devices."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_REMAP_LOAD,
"Input Remap Loaded Notifications"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_REMAP_LOAD,
"Display an on-screen message when loading input remap files."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD,
"Config Override Loaded Notifications"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD,
"Display an on-screen message when loading configuration override files."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_FAST_FORWARD,
"Fast-Forward Notifications"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_FAST_FORWARD,
"Display an on-screen indicator when fast-forwarding content."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH,
"Notification Font"
@ -3461,7 +3501,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS,
"Toggle the visibility menu items in RetroArch."
"Toggle the visibility of menu items in RetroArch."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,

View file

@ -185,6 +185,7 @@ GENERIC_DEFERRED_PUSH(deferred_push_cheat_details_settings_list, DISPLAYLIST_
GENERIC_DEFERRED_PUSH(deferred_push_cheat_search_settings_list, DISPLAYLIST_CHEAT_SEARCH_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_display_settings_list, DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_notifications_settings_list, DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_notifications_views_settings_list, DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_overlay_settings_list, DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST)
#ifdef HAVE_VIDEO_LAYOUT
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_video_layout_settings_list, DISPLAYLIST_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST)
@ -725,6 +726,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{MENU_ENUM_LABEL_DEFERRED_CHEAT_SEARCH_SETTINGS_LIST, deferred_push_cheat_search_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST, deferred_push_onscreen_display_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, deferred_push_onscreen_notifications_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST, deferred_push_onscreen_notifications_views_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST, deferred_push_onscreen_overlay_settings_list},
#ifdef HAVE_VIDEO_LAYOUT
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST, deferred_push_onscreen_video_layout_settings_list},

View file

@ -335,6 +335,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST;
case ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST;
case ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST;
case ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST;
#ifdef HAVE_VIDEO_LAYOUT
@ -1223,6 +1225,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_REWIND_SETTINGS_LIST:
case ACTION_OK_DL_ONSCREEN_DISPLAY_SETTINGS_LIST:
case ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
case ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST:
case ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST:
#ifdef HAVE_VIDEO_LAYOUT
case ACTION_OK_DL_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST:
@ -4898,6 +4901,7 @@ DEFAULT_ACTION_OK_FUNC(action_ok_cheat, ACTION_OK_DL_CHEAT_DETAILS_SETTINGS_LIST
DEFAULT_ACTION_OK_FUNC(action_ok_cheat_start_or_cont, ACTION_OK_DL_CHEAT_SEARCH_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_onscreen_display_list, ACTION_OK_DL_ONSCREEN_DISPLAY_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_onscreen_notifications_list, ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_onscreen_notifications_views_list, ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_onscreen_overlay_list, ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST)
#ifdef HAVE_VIDEO_LAYOUT
DEFAULT_ACTION_OK_FUNC(action_ok_onscreen_video_layout_list, ACTION_OK_DL_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST)
@ -6946,6 +6950,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_REWIND_SETTINGS, action_ok_rewind_list},
{MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS, action_ok_onscreen_display_list},
{MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, action_ok_onscreen_notifications_list},
{MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS, action_ok_onscreen_notifications_views_list},
{MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS, action_ok_onscreen_overlay_list},
{MENU_ENUM_LABEL_MENU_SETTINGS, action_ok_menu_list},
{MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS, action_ok_menu_views_list},

View file

@ -377,6 +377,10 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_retroarch, MENU_
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_restart_retroarch, MENU_ENUM_SUBLABEL_RESTART_RETROARCH)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_widgets, MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_show_load_content_animation, MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_notification_show_autoconfig, MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_AUTOCONFIG)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_notification_show_remap_load, MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_REMAP_LOAD)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_notification_show_config_override_load, MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_notification_show_fast_forward, MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_FAST_FORWARD)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_width, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
@ -779,6 +783,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_onscreen_overlay_settings_list,
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_onscreen_video_layout_settings_list, MENU_ENUM_SUBLABEL_ONSCREEN_VIDEO_LAYOUT_SETTINGS)
#endif
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_onscreen_notifications_settings_list, MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_onscreen_notifications_views_settings_list, MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS)
#ifdef HAVE_QT
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_show_wimp, MENU_ENUM_SUBLABEL_SHOW_WIMP)
#endif
@ -2976,6 +2981,18 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_load_content_animation);
break;
case MENU_ENUM_LABEL_NOTIFICATION_SHOW_AUTOCONFIG:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_notification_show_autoconfig);
break;
case MENU_ENUM_LABEL_NOTIFICATION_SHOW_REMAP_LOAD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_notification_show_remap_load);
break;
case MENU_ENUM_LABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_notification_show_config_override_load);
break;
case MENU_ENUM_LABEL_NOTIFICATION_SHOW_FAST_FORWARD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_notification_show_fast_forward);
break;
case MENU_ENUM_LABEL_RESTART_RETROARCH:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_restart_retroarch);
break;
@ -3627,6 +3644,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_onscreen_notifications_settings_list);
break;
case MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_onscreen_notifications_views_settings_list);
break;
#ifdef HAVE_QT
case MENU_ENUM_LABEL_SHOW_WIMP:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_show_wimp);

View file

@ -470,6 +470,7 @@ DEFAULT_TITLE_MACRO(action_get_cheat_details_settings_list, MENU_ENUM_LABEL_
DEFAULT_TITLE_MACRO(action_get_cheat_search_settings_list, MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_SETTINGS)
DEFAULT_TITLE_MACRO(action_get_onscreen_display_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS)
DEFAULT_TITLE_MACRO(action_get_onscreen_notifications_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS)
DEFAULT_TITLE_MACRO(action_get_onscreen_notifications_views_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS)
DEFAULT_TITLE_MACRO(action_get_onscreen_overlay_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS)
#ifdef HAVE_VIDEO_LAYOUT
DEFAULT_TITLE_MACRO(action_get_onscreen_video_layout_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_VIDEO_LAYOUT_SETTINGS)
@ -769,6 +770,7 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_DEFERRED_CHEAT_SEARCH_SETTINGS_LIST, action_get_cheat_search_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST, action_get_onscreen_display_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, action_get_onscreen_notifications_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST, action_get_onscreen_notifications_views_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST, action_get_onscreen_overlay_settings_list},
#ifdef HAVE_VIDEO_LAYOUT
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST, action_get_onscreen_video_layout_settings_list},

View file

@ -9576,6 +9576,7 @@ static void materialui_list_insert(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_VIDEO_LAYOUT_SETTINGS)) ||
#endif
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCOUNTS_LIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REWIND_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS)) ||

View file

@ -162,6 +162,7 @@ enum
ACTION_OK_DL_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST,
#endif
ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST,
ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST,
ACTION_OK_DL_MENU_VIEWS_SETTINGS_LIST,
ACTION_OK_DL_SETTINGS_VIEWS_SETTINGS_LIST,
ACTION_OK_DL_QUICK_MENU_VIEWS_SETTINGS_LIST,

View file

@ -1141,18 +1141,18 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
{
char tmp[PATH_MAX_LENGTH];
uint64_t memory_free = frontend_driver_get_free_memory();
uint64_t memory_total = frontend_driver_get_total_memory();
uint64_t memory_total = frontend_driver_get_total_memory();
uint64_t memory_used = memory_total - frontend_driver_get_free_memory();
tmp[0] = '\0';
if (memory_free != 0 && memory_total != 0)
if (memory_used != 0 && memory_total != 0)
{
snprintf(tmp, sizeof(tmp),
"%s %s: %" PRIu64 "/%" PRIu64 " MB",
msg_hash_to_str(MSG_MEMORY),
msg_hash_to_str(MSG_IN_MEGABYTES),
BYTES_TO_MB(memory_free),
BYTES_TO_MB(memory_used),
BYTES_TO_MB(memory_total)
);
@ -7437,40 +7437,132 @@ unsigned menu_displaylist_build_list(
break;
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
bool video_font_enable = settings->bools.video_font_enable;
bool video_fps_show = settings->bools.video_fps_show;
bool video_msg_bgcolor_enable = settings->bools.video_msg_bgcolor_enable;
#ifdef HAVE_GFX_WIDGETS
bool widgets_supported = video_driver_has_widgets();
bool menu_enable_widgets = settings->bools.menu_enable_widgets;
bool menu_widget_scale_auto = settings->bools.menu_widget_scale_auto;
#else
bool widgets_supported = false;
bool menu_enable_widgets = false;
#endif
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_FONT_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_WIDGET_SCALE_AUTO, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_FONT_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_MENU_WIDGET_SCALE_AUTO, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR, PARSE_ONLY_FLOAT, false },
#if !(defined(RARCH_CONSOLE) || defined(RARCH_MOBILE))
{MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, PARSE_ONLY_FLOAT, false },
#endif
{MENU_ENUM_LABEL_FPS_SHOW, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL, PARSE_ONLY_UINT, false },
{MENU_ENUM_LABEL_FRAMECOUNT_SHOW, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_STATISTICS_SHOW, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_MEMORY_SHOW, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_VIDEO_FONT_PATH, PARSE_ONLY_PATH, false },
{MENU_ENUM_LABEL_VIDEO_FONT_SIZE, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED, PARSE_ONLY_UINT, false},
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN, PARSE_ONLY_UINT, false},
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE, PARSE_ONLY_UINT, false},
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY,PARSE_ONLY_FLOAT, false},
{MENU_ENUM_LABEL_VIDEO_FONT_PATH, PARSE_ONLY_PATH, false },
{MENU_ENUM_LABEL_VIDEO_FONT_SIZE, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED, PARSE_ONLY_UINT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN, PARSE_ONLY_UINT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE, PARSE_ONLY_UINT, false },
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY, PARSE_ONLY_FLOAT, false },
{MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS, PARSE_ACTION, false },
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)
{
switch (build_list[i].enum_idx)
{
#ifdef HAVE_GFX_WIDGETS
case MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE:
if (widgets_supported)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_AUTO:
if (widgets_supported &&
menu_enable_widgets)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR:
if (widgets_supported &&
menu_enable_widgets &&
!menu_widget_scale_auto)
build_list[i].checked = true;
break;
#if !(defined(RARCH_CONSOLE) || defined(RARCH_MOBILE))
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED:
if (widgets_supported &&
menu_enable_widgets &&
!menu_widget_scale_auto)
build_list[i].checked = true;
break;
#endif
#endif
case MENU_ENUM_LABEL_VIDEO_FONT_PATH:
case MENU_ENUM_LABEL_VIDEO_FONT_SIZE:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE:
if ((!widgets_supported || !menu_enable_widgets) &&
video_font_enable)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY:
if ((!widgets_supported || !menu_enable_widgets) &&
video_font_enable &&
video_msg_bgcolor_enable)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS:
if (video_font_enable ||
(widgets_supported && menu_enable_widgets))
build_list[i].checked = true;
break;
default:
break;
}
}
for (i = 0; i < ARRAY_SIZE(build_list); i++)
{
if (!build_list[i].checked && !include_everything)
continue;
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
build_list[i].enum_idx, build_list[i].parse_type,
false) == 0)
count++;
}
}
break;
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST:
{
settings_t *settings = config_get_ptr();
bool video_font_enable = settings->bools.video_font_enable;
bool video_fps_show = settings->bools.video_fps_show;
#ifdef HAVE_GFX_WIDGETS
bool widgets_supported = video_driver_has_widgets();
bool menu_enable_widgets = settings->bools.menu_enable_widgets;
#endif
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_FPS_SHOW, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL, PARSE_ONLY_UINT, false },
{MENU_ENUM_LABEL_FRAMECOUNT_SHOW, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_STATISTICS_SHOW, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_MEMORY_SHOW, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, PARSE_ONLY_BOOL, false },
{MENU_ENUM_LABEL_NOTIFICATION_SHOW_AUTOCONFIG, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_NOTIFICATION_SHOW_REMAP_LOAD, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_NOTIFICATION_SHOW_FAST_FORWARD, PARSE_ONLY_BOOL, true },
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)
@ -7478,49 +7570,21 @@ unsigned menu_displaylist_build_list(
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL:
if (video_font_enable)
if (video_fps_show)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY:
if (video_font_enable)
if (video_msg_bgcolor_enable)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_AUTO:
#ifdef HAVE_GFX_WIDGETS
if (menu_enable_widgets)
if (video_fps_show)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_STATISTICS_SHOW:
if (video_font_enable)
build_list[i].checked = true;
#endif
break;
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR:
#ifdef HAVE_GFX_WIDGETS
if (menu_enable_widgets)
if (!menu_widget_scale_auto)
build_list[i].checked = true;
#endif
break;
#if !(defined(RARCH_CONSOLE) || defined(RARCH_MOBILE))
case MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED:
#ifdef HAVE_GFX_WIDGETS
if (menu_enable_widgets)
if (!menu_widget_scale_auto)
build_list[i].checked = true;
#endif
break;
#endif
case MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION:
#ifdef HAVE_GFX_WIDGETS
if (menu_enable_widgets)
if (widgets_supported &&
menu_enable_widgets)
build_list[i].checked = true;
#endif
break;
#endif
default:
if (video_font_enable)
build_list[i].checked = true;
break;
}
}
@ -10397,6 +10461,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_PRIVACY_SETTINGS_LIST:
case DISPLAYLIST_CONFIGURATIONS_LIST:
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST:
case DISPLAYLIST_LATENCY_SETTINGS_LIST:
case DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST:
#ifdef HAVE_VIDEO_LAYOUT

View file

@ -176,6 +176,7 @@ enum menu_displaylist_ctl_state
#endif
DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST,
DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST,
DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST,
DISPLAYLIST_MENU_FILE_BROWSER_SETTINGS_LIST,
DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST,
DISPLAYLIST_QUICK_MENU_VIEWS_SETTINGS_LIST,

View file

@ -261,7 +261,7 @@ enum settings_list_type
SETTINGS_LIST_RECORDING,
SETTINGS_LIST_FRAME_THROTTLING,
SETTINGS_LIST_FRAME_TIME_COUNTER,
SETTINGS_LIST_FONT,
SETTINGS_LIST_ONSCREEN_NOTIFICATIONS,
SETTINGS_LIST_OVERLAY,
#ifdef HAVE_VIDEO_LAYOUT
SETTINGS_LIST_VIDEO_LAYOUT,
@ -8332,6 +8332,14 @@ static bool setting_append_list(
parent_group);
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS,
MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_MENU_SETTINGS,
@ -9765,90 +9773,11 @@ static bool setting_append_list(
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
#endif
CONFIG_BOOL(
list, list_info,
&settings->bools.video_fps_show,
MENU_ENUM_LABEL_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_FPS_SHOW,
DEFAULT_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
CONFIG_UINT(
list, list_info,
&settings->uints.fps_update_interval,
MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL,
MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL,
DEFAULT_FPS_UPDATE_INTERVAL,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
menu_settings_list_current_add_range(list, list_info, 1, 512, 1, true, true);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_memory_show,
MENU_ENUM_LABEL_MEMORY_SHOW,
MENU_ENUM_LABEL_VALUE_MEMORY_SHOW,
DEFAULT_MEMORY_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_statistics_show,
MENU_ENUM_LABEL_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
DEFAULT_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_framecount_show,
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
DEFAULT_FRAMECOUNT_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Platform-specific", &group_info, &subgroup_info, parent_group);
video_driver_menu_settings((void**)list, (void*)list_info, (void*)&group_info, (void*)&subgroup_info, parent_group);
END_SUB_GROUP(list, list_info, parent_group);
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Monitor", &group_info, &subgroup_info, parent_group);
@ -12242,25 +12171,37 @@ static bool setting_append_list(
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_FONT:
case SETTINGS_LIST_ONSCREEN_NOTIFICATIONS:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS),
parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS);
START_SUB_GROUP(list, list_info, "Messages",
START_SUB_GROUP(list, list_info, "Notifications",
&group_info,
&subgroup_info,
parent_group);
/* This is the SETTINGS_LIST_FONT category, but the
* parent group is ONSCREEN_DISPLAY_SETTINGS.
* Menu widget settings don't belong in the SETTINGS_LIST_FONT
* category, but they *do* belong in the ONSCREEN_DISPLAY_SETTINGS
* group. I don't want to refactor these names, so we'll assume
* group trumps category, and just place the widget settings here */
#ifdef HAVE_GFX_WIDGETS
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_enable_widgets,
MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE,
MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE,
DEFAULT_MENU_ENABLE_WIDGETS,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_widget_scale_auto,
@ -12307,7 +12248,6 @@ static bool setting_append_list(
general_write_handler,
general_read_handler);
#endif
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
menu_settings_list_current_add_range(list, list_info, 0.2, 5.0, 0.01, true, true);
@ -12327,9 +12267,7 @@ static bool setting_append_list(
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
menu_settings_list_current_add_range(list, list_info, 0.2, 5.0, 0.01, true, true);
#endif
#endif
CONFIG_BOOL(
list, list_info,
&settings->bools.video_font_enable,
@ -12533,6 +12471,162 @@ static bool setting_append_list(
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Notification Views", &group_info, &subgroup_info, parent_group);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_fps_show,
MENU_ENUM_LABEL_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_FPS_SHOW,
DEFAULT_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
CONFIG_UINT(
list, list_info,
&settings->uints.fps_update_interval,
MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL,
MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL,
DEFAULT_FPS_UPDATE_INTERVAL,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
menu_settings_list_current_add_range(list, list_info, 1, 512, 1, true, true);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_memory_show,
MENU_ENUM_LABEL_MEMORY_SHOW,
MENU_ENUM_LABEL_VALUE_MEMORY_SHOW,
DEFAULT_MEMORY_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_statistics_show,
MENU_ENUM_LABEL_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
DEFAULT_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.video_framecount_show,
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
DEFAULT_FRAMECOUNT_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#ifdef HAVE_GFX_WIDGETS
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_show_load_content_animation,
MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION,
MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION,
DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
CONFIG_BOOL(
list, list_info,
&settings->bools.notification_show_autoconfig,
MENU_ENUM_LABEL_NOTIFICATION_SHOW_AUTOCONFIG,
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_AUTOCONFIG,
DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.notification_show_remap_load,
MENU_ENUM_LABEL_NOTIFICATION_SHOW_REMAP_LOAD,
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_REMAP_LOAD,
DEFAULT_NOTIFICATION_SHOW_REMAP_LOAD,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.notification_show_config_override_load,
MENU_ENUM_LABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD,
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD,
DEFAULT_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.notification_show_fast_forward,
MENU_ENUM_LABEL_NOTIFICATION_SHOW_FAST_FORWARD,
MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_FAST_FORWARD,
DEFAULT_NOTIFICATION_SHOW_FAST_FORWARD,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
@ -13376,41 +13470,6 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
#ifdef HAVE_GFX_WIDGETS
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_enable_widgets,
MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE,
MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE,
DEFAULT_MENU_ENABLE_WIDGETS,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_show_load_content_animation,
MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION,
MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION,
DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
if (string_is_equal(settings->arrays.menu_driver, "xmb") || string_is_equal(settings->arrays.menu_driver, "ozone"))
{
CONFIG_BOOL(
@ -17878,7 +17937,7 @@ static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_inf
SETTINGS_LIST_RECORDING,
SETTINGS_LIST_FRAME_THROTTLING,
SETTINGS_LIST_FRAME_TIME_COUNTER,
SETTINGS_LIST_FONT,
SETTINGS_LIST_ONSCREEN_NOTIFICATIONS,
SETTINGS_LIST_OVERLAY,
#ifdef HAVE_VIDEO_LAYOUT
SETTINGS_LIST_VIDEO_LAYOUT,

View file

@ -1422,6 +1422,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_MENU_VIEWS_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_SETTINGS_VIEWS_SETTINGS_LIST,
@ -2196,6 +2197,7 @@ enum msg_hash_enums
MENU_LABEL(ONSCREEN_OVERLAY_SETTINGS),
MENU_LABEL(ONSCREEN_VIDEO_LAYOUT_SETTINGS),
MENU_LABEL(ONSCREEN_NOTIFICATIONS_SETTINGS),
MENU_LABEL(ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS),
MENU_LABEL(CHEAT_APPLY_CHANGES),
MENU_LABEL(CHEAT_START_SEARCH),
MENU_LABEL(CHEAT_CONTINUE_SEARCH),
@ -2561,6 +2563,11 @@ enum msg_hash_enums
MENU_LABEL(MENU_WIDGETS_ENABLE),
MENU_LABEL(MENU_SHOW_LOAD_CONTENT_ANIMATION),
MENU_LABEL(NOTIFICATION_SHOW_AUTOCONFIG),
MENU_LABEL(NOTIFICATION_SHOW_REMAP_LOAD),
MENU_LABEL(NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD),
MENU_LABEL(NOTIFICATION_SHOW_FAST_FORWARD),
MENU_LABEL(SELECT_FILE),
MENU_LABEL(SELECT_FROM_PLAYLIST),

View file

@ -13027,9 +13027,9 @@ static void handle_translation_cb(
bool was_paused = p_rarch->runloop_paused;
const enum retro_pixel_format
video_driver_pix_fmt = p_rarch->video_driver_pix_fmt;
#ifdef HAVE_GFX_WIDGETS
bool gfx_widgets_paused = p_rarch->gfx_widgets_paused;
#ifdef GFX_MENU_WIDGETS
/* When auto mode is on, we turn off the overlay
* once we have the result for the next call.*/
if (p_rarch->dispwidget_st.ai_service_overlay_state != 0
@ -32358,8 +32358,8 @@ static void video_driver_frame(const void *data, unsigned width,
if (video_info.memory_show)
{
char mem[128];
uint64_t mem_bytes_used = frontend_driver_get_free_memory();
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
uint64_t mem_bytes_used = mem_bytes_total - frontend_driver_get_free_memory();
mem[0] = '\0';
snprintf(
@ -33467,12 +33467,13 @@ float video_driver_get_refresh_rate(void)
}
#if defined(HAVE_GFX_WIDGETS)
static bool video_driver_has_widgets(struct rarch_state *p_rarch)
bool video_driver_has_widgets(void)
{
struct rarch_state *p_rarch = &rarch_st;
return p_rarch->current_video
&& p_rarch->current_video->gfx_widgets_enabled
&& p_rarch->current_video->gfx_widgets_enabled(
p_rarch->video_driver_data);
&& p_rarch->current_video->gfx_widgets_enabled
&& p_rarch->current_video->gfx_widgets_enabled(
p_rarch->video_driver_data);
}
#endif
@ -34240,7 +34241,7 @@ static void drivers_init(struct rarch_state *p_rarch, int flags)
core_info_init_current_core();
#if defined(HAVE_GFX_WIDGETS)
if (menu_enable_widgets && video_driver_has_widgets(p_rarch))
if (menu_enable_widgets && video_driver_has_widgets())
{
bool rarch_force_fullscreen = p_rarch->rarch_force_fullscreen;
bool video_is_fullscreen = settings->bools.video_fullscreen ||
@ -38050,21 +38051,6 @@ static void update_savestate_slot(int state_slot)
RARCH_LOG("%s\n", msg);
}
#if defined(HAVE_GFX_WIDGETS)
/* Display the fast forward state to the user, if needed. */
static void update_fastforwarding_state(
struct rarch_state *p_rarch,
bool runloop_fastmotion,
bool frame_time_counter_reset_after_fastforwarding)
{
p_rarch->gfx_widgets_fast_forward = runloop_fastmotion;
if (!runloop_fastmotion)
if (frame_time_counter_reset_after_fastforwarding)
p_rarch->video_driver_frame_time_count = 0;
}
#endif
static enum runloop_state runloop_check_state(
struct rarch_state *p_rarch,
settings_t *settings,
@ -38817,7 +38803,7 @@ static enum runloop_state runloop_check_state(
}
/* Check if we have pressed the fast forward button */
/* To avoid continous switching if we hold the button down, we require
/* To avoid continuous switching if we hold the button down, we require
* that the button must go from pressed to unpressed back to pressed
* to be able to toggle between then.
*/
@ -38850,27 +38836,32 @@ static enum runloop_state runloop_check_state(
p_rarch->runloop_fastmotion = true;
}
driver_set_nonblock_state();
#if defined(HAVE_GFX_WIDGETS)
if (widgets_active)
update_fastforwarding_state(p_rarch,
p_rarch->runloop_fastmotion,
settings->bools.frame_time_counter_reset_after_fastforwarding);
#endif
/* Reset frame time counter when toggling
* fast-forward off, if required */
if (!p_rarch->runloop_fastmotion &&
settings->bools.frame_time_counter_reset_after_fastforwarding)
p_rarch->video_driver_frame_time_count = 0;
}
old_button_state = new_button_state;
old_hold_button_state = new_hold_button_state;
/* Show the fast-forward OSD for 1 frame every frame if
* display widgets are disabled */
if (
/* Display fast-forward notification
* > Use widgets, if enabled */
#if defined(HAVE_GFX_WIDGETS)
!widgets_active &&
if (widgets_active)
p_rarch->gfx_widgets_fast_forward =
settings->bools.notification_show_fast_forward ?
p_rarch->runloop_fastmotion : false;
else
#endif
p_rarch->runloop_fastmotion
)
{
runloop_msg_queue_push(
/* > If widgets are disabled, display fast-forward
* status via OSD text for 1 frame every frame */
if (p_rarch->runloop_fastmotion &&
settings->bools.notification_show_fast_forward)
runloop_msg_queue_push(
msg_hash_to_str(MSG_FAST_FORWARD), 1, 1, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}

View file

@ -1803,6 +1803,10 @@ bool video_shader_driver_get_current_shader(video_shader_ctx_t *shader);
float video_driver_get_refresh_rate(void);
#if defined(HAVE_GFX_WIDGETS)
bool video_driver_has_widgets(void);
#endif
bool video_driver_started_fullscreen(void);
bool video_driver_is_threaded(void);

View file

@ -513,7 +513,10 @@ static void input_autoconfigure_connect_handler(retro_task_t *task)
if (string_is_empty(device_display_name))
device_display_name = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE);
/* Generate task status message */
/* Generate task status message
* > Note that 'connection successful' messages
* may be suppressed, but error messages are
* always shown */
if (autoconfig_handle->device_info.autoconfigured)
{
if (match_found)
@ -587,6 +590,8 @@ void input_autoconfigure_connect(
settings->bools.input_autodetect_enable : false;
const char *dir_autoconfig = settings ?
settings->paths.directory_autoconfig : NULL;
bool notification_show_autoconfig = settings ?
settings->bools.notification_show_autoconfig : true;
task_finder_data_t find_data;
char dir_driver_autoconfig[PATH_MAX_LENGTH];
@ -619,7 +624,7 @@ void input_autoconfigure_connect(
autoconfig_handle->device_info.autoconfigured = false;
autoconfig_handle->device_info.name_index = 0;
autoconfig_handle->autoconfig_enabled = autoconfig_enabled;
autoconfig_handle->suppress_notifcations = false;
autoconfig_handle->suppress_notifcations = !notification_show_autoconfig;
autoconfig_handle->dir_autoconfig = NULL;
autoconfig_handle->dir_driver_autoconfig = NULL;
autoconfig_handle->autoconfig_file = NULL;
@ -663,10 +668,13 @@ void input_autoconfigure_connect(
#endif
/* If we are reconnecting a device that is already
* connect and autoconfigured, then there is no need
* connected and autoconfigured, then there is no need
* to generate additional 'connection successful'
* task status messages */
if (!string_is_empty(autoconfig_handle->device_info.name))
* task status messages
* > Can skip this check if autoconfig notifications
* have been disabled by the user */
if (!autoconfig_handle->suppress_notifcations &&
!string_is_empty(autoconfig_handle->device_info.name))
{
const char *last_device_name = input_config_get_device_name(port);
uint16_t last_vid = input_config_get_device_vid(port);
@ -774,7 +782,8 @@ static void input_autoconfigure_disconnect_handler(retro_task_t *task)
autoconfig_handle->port + 1);
task_free_title(task);
task_set_title(task, strdup(task_title));
if (!autoconfig_handle->suppress_notifcations)
task_set_title(task, strdup(task_title));
task_finished:
@ -815,6 +824,9 @@ bool input_autoconfigure_disconnect(unsigned port, const char *name)
retro_task_t *task = NULL;
autoconfig_handle_t *autoconfig_handle = NULL;
task_finder_data_t find_data;
settings_t *settings = config_get_ptr();
bool notification_show_autoconfig = settings ?
settings->bools.notification_show_autoconfig : true;
if (port >= MAX_INPUT_DEVICES)
goto error;
@ -833,7 +845,9 @@ bool input_autoconfigure_disconnect(unsigned port, const char *name)
if (!autoconfig_handle)
goto error;
autoconfig_handle->port = port;
autoconfig_handle->port = port;
autoconfig_handle->suppress_notifcations = !notification_show_autoconfig;
if (!string_is_empty(name))
strlcpy(autoconfig_handle->device_info.name,
name, sizeof(autoconfig_handle->device_info.name));

View file

@ -59,6 +59,10 @@ QWidget *NotificationsPage::widget()
notificationsGroup->add(MENU_ENUM_LABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED);
#endif
notificationsGroup->add(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION);
notificationsGroup->add(MENU_ENUM_LABEL_NOTIFICATION_SHOW_AUTOCONFIG);
notificationsGroup->add(MENU_ENUM_LABEL_NOTIFICATION_SHOW_REMAP_LOAD);
notificationsGroup->add(MENU_ENUM_LABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD);
notificationsGroup->add(MENU_ENUM_LABEL_NOTIFICATION_SHOW_FAST_FORWARD);
layout->addWidget(notificationsGroup);