Skip to content

Commit 5e988a9

Browse files
committed
Prevent playlist quick manager in kiosk mode
1 parent eda2ba8 commit 5e988a9

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

menu/cbs/menu_cbs_ok.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6694,7 +6694,6 @@ STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_push_savestate_list, ACTION_OK_DL_SAVEST
66946694
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_push_core_options_list, ACTION_OK_DL_CORE_OPTIONS_LIST)
66956695
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_push_add_to_playlist_list, ACTION_OK_DL_ADD_TO_PLAYLIST)
66966696
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_push_add_to_playlist_quickmenu, ACTION_OK_DL_ADD_TO_PLAYLIST_QUICKMENU)
6697-
DEFAULT_ACTION_OK_FUNC(action_ok_push_playlist_manager_settings, ACTION_OK_DL_PLAYLIST_MANAGER_SETTINGS)
66986697
#ifdef HAVE_CHEEVOS
66996698
DEFAULT_ACTION_OK_FUNC(action_ok_push_achievements_hardcore_pause_list, ACTION_OK_DL_ACHIEVEMENTS_HARDCORE_PAUSE_LIST)
67006699
#endif
@@ -6703,6 +6702,21 @@ DEFAULT_ACTION_OK_FUNC(action_ok_push_core_information_list, ACTION_OK_DL_CORE_I
67036702
DEFAULT_ACTION_OK_FUNC(action_ok_push_core_information_steam_list, ACTION_OK_DL_CORE_INFORMATION_STEAM_LIST)
67046703
#endif
67056704

6705+
int action_ok_push_playlist_manager_settings(const char *path,
6706+
const char *label, unsigned type, size_t idx, size_t entry_idx)
6707+
{
6708+
settings_t *settings = config_get_ptr();
6709+
6710+
if (settings->bools.kiosk_mode_enable)
6711+
return 0;
6712+
6713+
return generic_action_ok_displaylist_push(
6714+
path, NULL,
6715+
label, type,
6716+
idx, entry_idx,
6717+
ACTION_OK_DL_PLAYLIST_MANAGER_SETTINGS);
6718+
}
6719+
67066720
static int action_ok_open_uwp_permission_settings(const char *path,
67076721
const char *label, unsigned type, size_t idx, size_t entry_idx)
67086722
{

menu/drivers/ozone.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8109,8 +8109,12 @@ static bool ozone_scan_available(ozone_handle_t *ozone, size_t current_selection
81098109

81108110
static bool ozone_manage_available(ozone_handle_t *ozone, size_t current_selection)
81118111
{
8112+
settings_t *settings = config_get_ptr();
81128113
menu_entry_t last_entry;
81138114

8115+
if (settings->bools.kiosk_mode_enable)
8116+
return false;
8117+
81148118
if ( (ozone->flags & OZONE_FLAG_CURSOR_IN_SIDEBAR)
81158119
&& (ozone->flags & OZONE_FLAG_IS_PLAYLIST)
81168120
&& ozone->categories_selection_ptr > ozone->system_tab_end)
@@ -8411,9 +8415,7 @@ static enum menu_action ozone_parse_menu_entry_action(
84118415
ozone->flags2 |= OZONE_FLAG2_PENDING_CURSOR_IN_SIDEBAR;
84128416

84138417
ozone_refresh_sidebars(ozone, ozone_collapse_sidebar, ozone->last_height);
8414-
if (!(ozone->flags & OZONE_FLAG_EMPTY_PLAYLIST))
8415-
ozone_leave_sidebar(ozone, ozone_collapse_sidebar, tag,
8416-
settings->uints.menu_remember_selection);
8418+
ozone_leave_sidebar(ozone, ozone_collapse_sidebar, tag, settings->uints.menu_remember_selection);
84178419

84188420
menu_st->selection_ptr = 0;
84198421
ozone_selection_changed(ozone, false);

0 commit comments

Comments
 (0)