Commit 60c7e39
committed
menu_displaylist: Hide History/Images/Music/Videos entries when history is disabled
When 'Settings -> Playlists -> History' (history_list_enable) is OFF,
CMD_EVENT_HISTORY_INIT early-returns and leaves g_defaults.content_history,
image_history, music_history, and video_history all NULL. The Playlists
tab generator was still appending entries for these with paths obtained
via playlist_get_conf_path(NULL), which returns NULL and renders as a
blank title. The icons and localized sublabels remained, producing four
"empty" rows in Main Menu -> Playlists.
Gate the four append calls additionally on the corresponding
g_defaults.*_history pointer being non-NULL. This also covers the
secondary early-return path in CMD_EVENT_HISTORY_INIT when
content_history_size is 0.
Mirror the same guard for the History entry in the rgui/glui (no nav
bar) branch.
Favorites is unaffected: g_defaults.content_favorites is initialized
independently of history_list_enable.1 parent b9777c8 commit 60c7e39
1 file changed
Lines changed: 7 additions & 7 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4229 | 4229 | | |
4230 | 4230 | | |
4231 | 4231 | | |
4232 | | - | |
| 4232 | + | |
4233 | 4233 | | |
4234 | 4234 | | |
4235 | 4235 | | |
| |||
4239 | 4239 | | |
4240 | 4240 | | |
4241 | 4241 | | |
4242 | | - | |
| 4242 | + | |
4243 | 4243 | | |
4244 | 4244 | | |
4245 | 4245 | | |
| |||
4258 | 4258 | | |
4259 | 4259 | | |
4260 | 4260 | | |
4261 | | - | |
| 4261 | + | |
4262 | 4262 | | |
4263 | 4263 | | |
4264 | 4264 | | |
| |||
4267 | 4267 | | |
4268 | 4268 | | |
4269 | 4269 | | |
4270 | | - | |
| 4270 | + | |
4271 | 4271 | | |
4272 | 4272 | | |
4273 | 4273 | | |
| |||
4276 | 4276 | | |
4277 | 4277 | | |
4278 | 4278 | | |
4279 | | - | |
| 4279 | + | |
4280 | 4280 | | |
4281 | 4281 | | |
4282 | 4282 | | |
| |||
15368 | 15368 | | |
15369 | 15369 | | |
15370 | 15370 | | |
15371 | | - | |
| 15371 | + | |
15372 | 15372 | | |
15373 | 15373 | | |
15374 | 15374 | | |
| |||
15378 | 15378 | | |
15379 | 15379 | | |
15380 | 15380 | | |
15381 | | - | |
| 15381 | + | |
15382 | 15382 | | |
15383 | 15383 | | |
15384 | 15384 | | |
| |||
0 commit comments