Commit graph

17142 commits

Author SHA1 Message Date
William Wilgus
00c7817c9c [BugFix] playlist.c DIRCACHE stop scanning when changing indices
dc_playlist_thread may continue loading pointers even while
underlying indices are changing instead stop the loop by marking
pointers as clean and rebuild later

Change-Id: If154f673b4af8d6e9c364499d58f1321834a76a4
2023-01-12 19:36:38 -05:00
William Wilgus
746fd7f2db Revert "add chunk_alloc to playlist.c"
This reverts commit 89c021fbfa.

Reason for revert: crash when playing on disk playlist then playing a directory as an in-ram playlist

Change-Id: Ia5cf5da9f46f8c10c5c0f3707e7978c05664b8a4
2023-01-11 01:14:22 -05:00
William Wilgus
89c021fbfa add chunk_alloc to playlist.c
Change-Id: Ia2e02a61f0b269dc0508717a56a2ca1a334d2378
2023-01-10 23:59:19 -05:00
Christian Soffke
a513cee822 PictureFlow: Add 'Track Info' for tracks or whole albums
Context menu gains new option to view
metadata for individual tracks or albums.

Will display an album's length and total file size.
Other fields are displayed only if they are identical
across all tracks (except for the album year, which
is determined by the highest value encountered).

Change-Id: Ibc14cfaf2cb3d91b8d1cfbee05c6261db4975355
2023-01-10 18:50:12 +01:00
Christian Soffke
d5e38062ea Fix hotkey strings
missed in 7d13c0c

Change-Id: I7299b6a646dc143943b2c8d1d89ecdc4a16667c7
2023-01-10 17:05:53 +01:00
William Wilgus
282a54b23c [Feature] filetree fallback to loading a playlist from disk
give user option to load playlist from disk when
namebuffer is too small -- max_playlist size still
limits the total entries but filename length
 won't stop them from playing the directory

Change-Id: I1787689417661ea670a211f575f2c52e84465869
2023-01-08 09:52:23 -05:00
Christian Soffke
7d13c0c4eb Rename "Playing Next..." menu items & hide Queue/Shuffle
"Play Next" instead of "Insert Next"
"Add" instead of "Insert"
"Play Last" instead of "Insert Last"
"Add Shuffled" instead of "Insert Shuffled"
"Play Last Shuffled" instead of "Insert Last Shuffled"

-"Queue" items hidden by default
- Shuffled options hidden by default
(Both can be enabled in options)

Resulting default menu:

Playing Next...
	Play Next
	Add
	Play Last
	Play

Change-Id: Ib0c07a8077ab4b10c2dbc7af33516adcd0d4b83a
2023-01-07 16:32:22 +01:00
Christian Soffke
ed95892a1f Rename “Current Playlist” and “Playlist Catalogue” context menus
Use action-oriented and more descriptive titles

"Add to Playlist..." instead of "Playlist Catalogue"
- "Add to Existing Playlist" instead of "Add to Playlist"
- "Add to New Playlist" (unchanged)

- "Playing Next..." instead of "Current Playlist"

In WPS context menu:

- "Current Playlist" instead of "Playlist"

Change-Id: I5cce9e317676537988682f46ac6b920598af3b9e
2023-01-07 14:53:36 +01:00
Christian Soffke
21ca64d7cd File Browser: Add “Set As..." context menu
Moves options for configuring:

- Playlist Directory
- Recording Directory
- Start Directory

into a single menu.

Necessary prerequisite for giving the
"Playlist Catalogue" context menu item a title that's a
little more action-oriented ("Add to Playlist…”).

Change-Id: I4ee08fc67d5350c38ae1a57cb345c4ed1082d0b5
2023-01-07 14:53:36 +01:00
Aidan MacDonald
5bb062391f playlist.c fix old out of bounds read
In case next_index == -1, this would read before the start of
the playlist->indices buffer.

Change-Id: I0a32a31c7c97c755a1217b8bea90a650f9e36a93
2023-01-06 14:19:28 -05:00
Christian Soffke
b444ecfca2 plugins: Properties: Add 'Last Modified' for audio files
In commit f3358eb, the Properties plugin started using the
Track Info screen for audio files, which didn't show when
the file was last modified. This adds it back.

Change-Id: I3ce519da234a4bcadab1d64b67de0298cada8f6e
2023-01-06 19:00:24 +01:00
Christian Soffke
5750eb3181 browse_id3: Only push activity when called from WPS
The Properties plugin and playlist viewer have each
started using the existing Track Info screen.

In both cases, it may not be necessary to push a new
activity. Which eliminates the need to perform an
additional skin refresh.

I've also noticed at least one theme in the wild that
assumes ACTIVITY_ID3SCREEN will only ever display
info for the currently playing track (as it did
previously) and adjusts the skin specifically for
that purpose.

Change-Id: Ic436d0d4e075a865225839a524387ff2b9058428
2023-01-06 12:50:18 -05:00
Christian Soffke
8366b8511d Fix red in 9bd5249
Change-Id: I4aa18b4afd68e35b1af5fe40dc02cc406ee31978
2023-01-06 06:38:57 +01:00
Christian Soffke
9bd5249445 plugins: Credits: Fix logo sizes
Commit 1930ca8 repurposed the 'Logo' plugin's
logos, whose dimensions are different from those
used by show_logo, which was previously called
to display the logo.

Change-Id: I4d0c5f597dadfdadae244d895518bbcfefebb581
2023-01-05 23:45:41 -05:00
William Wilgus
ea33e66021 [BugFix] Buffering.c NULL src for memcpy is UB -- ASAN
No clue if our implementation would suffer the same fate
but the C standard states:
Where an argument declared as size_t n specifies
the length of the array for a function, n can have
the value zero […] pointer arguments on such a call
shall still have valid values, as described in 7.1.4.

Change-Id: Iee0dd9c948c6ad4b0d96309053127ab11111f04c
2023-01-04 20:20:08 -05:00
Aidan MacDonald
a23ae63a31 Increase maximum files in directory limit
Increase the default limit to 5000 files for targets with at
least 8 MiB of RAM (the vast majority). The upper limit of the
setting is now 40,000 or 100,000 if you have at least 8 MiB or
16 MiB of RAM, respectively.

Update the manual to mention that this setting can also impact
the database browser. "Using the Database" already mentions it,
but it's useful to say so in the setting's description.

Change-Id: I6f204eec6cf2ccaea2af81d2fa287f92476eed4a
2023-01-02 20:55:48 +00:00
Aidan MacDonald
e8e781b006 lua: rocklib_events fix
Do not spawn threads on COP as PP lacks cache coherency between cores,
making it unsafe to access cacheable memory that might be accessed by
the other core.

Change-Id: Idf910e9cc9dad3f0bf5bdb63800ed4abaa97558a
2023-01-02 13:38:08 -05:00
William Wilgus
84fe501f53 Add locked actions to all soft lock targets
fiio m3k native is currently the only player with
defined buttons different from the standard
mapping.

This allows the user to use the keyremap plugin
to specify differing keymaps for their device in the locked state

Change-Id: Ie0b447bba0d5978e8d23fed423df30c794afc6f9
2023-01-02 13:19:43 -05:00
William Wilgus
3def8fee8c [FixRed] ClipV2 has a hold button -- news to me
HAVE_LOCKED_ACTIIONS requires !defined(HAVE_HOLD_BUTTON)

Change-Id: I1e98c282f17d11f08ea80cd5963b331a3ae19387
2022-12-31 17:12:36 -05:00
William Wilgus
6ebec601f9 [Feature/Bugfix] keyremap add Context flags
Add context flags to keyremap
CONTEXT_LOCKED
CONTEXT_REMOTE
CONTEXT_REMOTE_LOCKED

--CONTEXT_PLUGIN-- Removed -- Plugins need a custom action list
supplied and a method of supplying them

Change-Id: I5201d275ad0ab6130c2d05d5afb0c450f5c1746c
2022-12-31 16:12:18 -05:00
William Wilgus
0330aa8eb2 [BugFix] printcell_helper selection out of bounds
on load printcell.selcol is -1 whioch is out of bounds as an index into an array

Change-Id: I1e823712d268537d5d444458993ec2aa2cd253ff
2022-12-31 16:12:18 -05:00
William Wilgus
85410589d1 Revert "keyremap allow remaps to work when player is locked"
This reverts commit ea7b80dab0.

Reason for revert: Adding Context flags to the keyremap plugin

Change-Id: I056ca2c0ee27e6cc7946166cf52461efda0ee1fb
2022-12-31 11:01:46 -05:00
William Wilgus
ea7b80dab0 keyremap allow remaps to work when player is locked
keyremap doesn't have a notion of locked contexts
add CONTEXT_LOCKED after keyremap so users don't have to specify
multiple context flags to get Advanced keylock working with keyremaps

Change-Id: I17b3f5b2ac9bf23277543fb04d66d6d90d16557f
2022-12-31 07:21:53 -05:00
William Wilgus
855540e1f5 [BugFix] keyremap browse missing root, entry count off by 1
browse_context was missing its root causing a NULL deref

Export User Keys was looking for at least 4 entries when it only needed 3

Change-Id: If92ecccb36bd54e1b850ac2a969fe262b5d7fd14
2022-12-31 07:04:18 -05:00
Christian Soffke
1773e56447 tagtree: Discard item history when selection changes in both directions
A changed selection only caused the item
history for deeper levels to be discarded
in tagtree_enter, when you were descending,
but not in tagtree_exit when you were ascending
the menu hierarchy again.

Change-Id: Ia40fa47980a05c2569e8af04e928b06130aa1f33
2022-12-30 21:57:55 -05:00
roman.artiukhin
178560f495 Treat cue file as folder for next/prev folder action
Do not get stuck if it's the only cue file in folder

Change-Id: Ibb1a406ff030f945e4234fbd1ece747d1e5a0c44
2022-12-30 19:56:44 -05:00
Christian Soffke
b321a719d3 option_select & time_menu : Fix unbalanced push/pop activity
Change-Id: Icabbabb16b2f173168a441af474ee8403b908dd4
2022-12-30 10:35:50 -05:00
Christian Soffke
d59e135b04 plugins: Xobox: Fix highscore table on 2bit grayscale displays
After finishing a game of Xobox, background and
foreground were both the same color, making the
high score table invisible..

Change-Id: Iab4bad0e7d3f247a4b600ff9ec8e57207bc3832f
2022-12-29 11:26:57 +01:00
Christian Soffke
66bed14f17 plugins: SpaceRocks: iPod keymap, use Menu button for Menu
Missing from faa2cb9

- Thrust is now Right instead of Menu
- Teleport is Left instead of Play/Pause
- Pause is Play/Pause

Change-Id: Idd9758a68250bcfb2adec14589dffbe1a091511c
2022-12-29 08:10:01 +01:00
Christian Soffke
faa2cb9942 plugins: Improve usability of iPod keymaps
- Reduce need to press multiple buttons at
the same time to quit a plugin

- Have "Menu" be default way to quit plugins or
to access plugin menu

- Fall back to (Long) "Select" or Long "Menu"
in cases where Menu button isn't available
(e.g. in ImageViewer and many games)

out of scope:
boomshine, lua_scripts, Rockpaint,
Doom, Duke3D, Pacbox, Quake,
Sgt-Puzzles, Wolf3D, XWorld,
Minesweeper, Pixel Painter, Spacerocks

Change-Id: I6d4dc7174695fe4b8ee9cbaccb21bdbfe6af5c48
2022-12-29 04:39:22 +01:00
Christian Soffke
52f59f637d plugins: VU Meter: Ignore backlight timeout
Change-Id: Ic61cbd61dab18afe951b00a84b9ebeb15a8ee5f0
2022-12-27 09:43:34 -05:00
Aidan MacDonald
34a092a997 rbcodec dsp: Replace enum dsp_ids arguments with unsigned int
Because casting to and from "enum dsp_id" just adds noise,
change everything to unsigned int.

Change-Id: I52a7ae55f406e673d5b811b29657fcdc4b62ab10
2022-12-22 18:00:37 -05:00
William Wilgus
1387d6480e [Fix Red] consolidate bmp_read function between icons and skin_parser
Change-Id: I642ec2272ac94233127d8670f6adee938e53bce0
2022-12-20 19:32:32 -05:00
William Wilgus
88f6628423 consolidate bmp_read function between icons and skin_parser
uses fd now rather than opening file twice

Change-Id: If35418cbc77adacf5e96fb6aa0fc8ffef2fffcbd
2022-12-20 19:07:46 -05:00
William Wilgus
18ec1a2aa6 [Bug Fix] Credits Plugin don't set the back/foreground on greyscale displays
Change-Id: I2e5a37111dd055932b84962b70ff6c3eace945c7
2022-12-20 02:40:14 -05:00
William Wilgus
1930ca8d66 remove rockboxlogo after boot INIT_ATTR
nets about 5k on clipzip  (less on mono, more on others)
to move rockboxlogo to .initdata section

Remove show_logo completely and move to main.c
remove plugin stub
give credits plugin its own copy
credit fallback is now show_info()

Change-Id: Id9ed787e605ed29e7ab1e7a74d3821cd0f840ed4
2022-12-19 18:59:59 -05:00
Aidan MacDonald
6c52fa139c Remove browse_context_init()
Prefer to use designated initializers to avoid having to specify
unneeded parameters. Non-initialized members are zero-initialized
by the compiler.

Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
2022-12-17 13:36:38 +00:00
Aidan MacDonald
701e262d3d settings: Remove setting ID return from find_setting()
Now that all users have replaced setting IDs with direct pointers,
find_setting() and friends don't need to return an ID value.

Change-Id: I8c5c31bb68d3bca5350d43538335265a55fd5517
2022-12-17 13:36:38 +00:00
Aidan MacDonald
767ddef550 quickscreen: Settings ID to pointer conversion
Saves a good deal of code...

Change-Id: Ibaf4138ddffd5d8f7cca560cc52645dbce44149c
2022-12-17 13:36:38 +00:00
William Wilgus
c85a4f1fa4 menus remove reserved 'param' parameter
-- missed the plugin menu --

Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17 04:24:37 -05:00
William Wilgus
ccf1aaa5be menus move functions with parameters to their own type
left the union with function(void) and function_w_param(param)
as a few areas might still need to use both (onplay.c)

there might be a few I missed yet..

Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
2022-12-17 02:51:43 -05:00
William Wilgus
6f54bb63fc open_plugin.c access open_plugin_entry through a function
just a few updates to open_plugin save a bit of space by granting access through a getter function

Change-Id: I2c0eaa1ade867510798b213006064ee1c00aa016
2022-12-16 09:05:06 -05:00
William Wilgus
5903cd4bc8 [Bug Fix] setting.c fail to check F_TABLE_SETTING w/o arbitrary values
table settings have a list of valid values when
they do not have F_ALLOW_ARBITRARY_VALS flag

they were not being treated as such

Change-Id: Ib02643a65ee4fc2abb1be8563a1849076de2f708
2022-12-16 08:30:54 -05:00
Christian Soffke
222ff0cb14 Plugin return: only skip SBS refresh if WPS was previous activity
1) the plugin return value isn't necessarily respected.
2) the screen will be updated regardless, before
the WPS is displayed, which means the skin may
appear in an "incorrect" state for a moment.

It is therefore better to simplify this to a single
condition.

Change-Id: I723e6fe4862172075b9a4814080f612c2b2fb490
2022-12-16 13:04:56 +01:00
Christian Soffke
a6bafe51a6 WPS hotkeys: Don't enable SBS for pitch screen or bookmarking
Change-Id: I5d5f4f1c402500abd15fcbb8b62013c97f4f931c
2022-12-16 08:25:20 +01:00
Christian Soffke
79e6139f56 Playlist Viewer: Fix delayed appearance of backdrop on return from plugin
Change-Id: I84ff9b581d185fecbe3c7405d3e1887715d55d17
2022-12-16 02:05:33 -05:00
William Wilgus
28f768cb84 onplay hotkey add flags
idea here as discussed with chris_s is to allow flags
in the hotkey_assignment struct to change how items are displayed

Change-Id: Id4cf1d79fbe3ff8f5590b9a863fccf00ddd457f9
2022-12-16 01:44:05 -05:00
William Wilgus
31759c9e53 [Bug Fix] quickscreen clashed with WPS Hotkey browser
chris_s noted:
When you set the WPS hotkey as a QuickScreen item and shuffle through the options,
it eventually gets to the "Open Plugin" option and will show the File Browser,
clashing with the Viewports of the QuickScreen

Change-Id: I3addbbbac5842f89c000c155484d7cb934dc500e
2022-12-14 23:45:58 -05:00
William Wilgus
99839960a2 abrepeat add dummy functions and remove some of the ifdefs
Change-Id: Icae7e334e87bb1974712a7a76296cf69bbdbffba
2022-12-14 23:37:14 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
William Wilgus
eaf717744d [Bug Fix] open_plugin.c update checksum check for spinning disks
Lang_id keys take LANG_LAST_INDEX_IN_ARRAY for the checksum
spinning disks did not have the code to do so

Change-Id: I617e1a5462d8d6c4830a9b59171bdd7167d5e7a1
2022-12-13 23:37:26 -05:00
William Wilgus
c6c1d62489 [Bug Fix] filetypes.c move voice data out of INIT_ATTR
tree_get_filetype_voiceclip is called after init it shouldn't be marked as INIT_ATTR

add _init to the functions & data that are used at init only to be a bit more clear

Change-Id: I8eb1914560b782c2c0fdd7649e761f94e382d5cb
2022-12-13 22:35:24 -05:00
Christian Soffke
8ff2c81bde Improve transition between plugin and WPS
Eliminate flashing when plugins are launched
from WPS, by not enabling the SBS, and by
deferring other lcd updates.

Also prevents flashing root menu activity when
returning from plugins.

Change-Id: I7d761867027f2275c4ab8e16ada3107c7ba0be6e
2022-12-13 21:10:16 -05:00
Christian Soffke
0e2e9df991 Plugins: Eliminate 'Loading' splash unless disk is inactive
My impression is that the waiting time for plugins
is only ever significant if a disk needs to spin up.

In other cases, the experience seems nicer
without a 'Loading' splash, especially for
often-used plugins, such as 'Properties',
when it is launched from the Database or
from the File Browser.

Change-Id: I018ccb13466fa618ef089b6dc7714db38cffd9b6
2022-12-13 20:52:09 -05:00
roman.artiukhin
d520dcbfbb Exit Pitchscreen on BUTTON_HOME for Sansa Clip
ToggleMode is remapped to BUTTON_SELECT
Reset is remapped to Long BUTTON_HOME or Long BUTTON_SELECT (avoids accidental reset by pressing BUTTON_SELECT)

Change-Id: I6fc4050c66db2d7db7ec899f9c83b70754fef9df
2022-12-13 20:24:37 -05:00
William Wilgus
0747415277 Settings.c add logf debugging to verify settings
decodes saved settings and available settings & flags

Change-Id: I46bea15e7cef23fe9e41778455564f38bf00eeb1
2022-12-12 23:12:31 -05:00
William Wilgus
2b79ad43bd Haas Surround add flag so the settings can be read back from the config file
not sure how long this has been broken

Change-Id: Ifdbfff1e43f3cd6b5ef1c66d45b6b6f38f60cb95
2022-12-12 03:15:38 -05:00
Christian Soffke
ac9066dd44 Setttings: Eliminate gui_synclist_init_display_settings callbacks
Since synclists are now re-initialized after leaving
Settings menus where the callback was used, it
shouldn't be needed anymore.

gui_synclist_init_display_settings can also be made
local to list.c now.

Change-Id: I674e4da49153440b48298fed7c4d98b421b7beaa
2022-12-11 11:50:33 +01:00
Christian Soffke
dfd9c10589 Eliminate skin updates in between activities
1) Adds way to pop activity without refreshing the skin at
the same time.

Activities are sometimes popped in immediate succession,
or one activity is popped before another one is pushed right
away. This can lead to the UI appearing glitchy, due to an
activity only appearing for a split-second, which is especially
noticeable with complex skins that change the dimensions
of the UI viewport depending on the current activity

To fix this, prevent superfluous skin updates

* when switching between:
- WPS and browser
- WPS and Playlist Catalogue
- WPS and playlist
- WPS and Settings/System/Plugins

* when accessing Track Info or when displaying
bookmarks using the context menu on the WPS

* when switching from QuickScreen to Shortcuts Menu

2) The playlist viewer activity was pushed & popped
redundantly by playlist_view.

----
NB:
Behavior has remained unchanged in all instances of the
code where pop_current_activity() has been replaced by
pop_current_activity(ACTIVITY_REFRESH_NOW).

Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-12-11 11:50:33 +01:00
Aidan MacDonald
90d1ac0448 settings: Rewrite cfg_int_to_string() and cfg_string_to_int()
It's easier to do the parsing manually.

Change-Id: Ief8b71942d3ab9313dd6927bd7f4bb254d0c12db
2022-12-10 14:21:42 +00:00
William Wilgus
fc18235323 Selective backlight add CONTEXT_MAINMENU
I think its better to just limit this to the mainmenu rather than all contexts

Change-Id: If734a9516b14ec96d9e32beceba22419c47c0720
2022-12-09 17:54:02 -05:00
roman.artiukhin
b63f4c5884 Exit option select on ACTION_STD_MENU
Similar to 59f3f43d. It makes it behave consistently with tree/playlists other menus. So it's possible to exit option select using Back button on Clip Zip or Power button on Rocker

Change-Id: I93fe71ba2222ae16d59f3ba4cfbbedad3fb2568b
2022-12-09 11:02:50 -05:00
William Wilgus
7a00ad72e4 [Bug Fix] bookmark.c failure to compare existing tracks and playlist
the underlying global buffer fo bookmark is overwritten by the read function so
instead make a hash of the playlist and track names

might needa better hash but hopefully CRC32 is sufficient

Change-Id: Ie25dbb62e664b804e4f858d9e0cc248fdc8c9895
2022-12-08 17:55:36 -05:00
Dana Conrad
3555e84a7a Bugfix: some settings can have spaces in them
90bc769 strips spaces from the settings value, but it
goes to the first space rather than just stripping off
the last one. Break out of the loop when we find the
first non-space character.

Also change 0 to '\0' for readability.

Change-Id: I915b82a6d1603740998a67c575d08005456ffbd8
2022-12-08 15:38:12 -05:00
Christian Soffke
66a411a1ba Tree / Playlist Viewer / Menu: Fix redraw issues
1) Tree_lists was only initialized when booting the player.

In cases where a skin used custom UI viewports of
different sizes, when switching between screens, such as
between root menu, QuickScreen, and tree browser, this
caused list titles to appear with a significant delay,
unless a GUI_EVENT_ACTIONUPDATE was sent.

Tree_lists is now initialized when entering dirbrowse
or when restoring/reloading the list.

This eliminates multiple redundant UI refreshes when
entering the tree browser, due to gui_synclist_draw not
being called twice anymore and by being able to omit
GUI_EVENT_ACTIONUPDATE.

Separate calls to gui_synclist_init_display_settings
have become unnecessary since it is already called
by gui_synclist_init.

2) The synclist is also re-initialized when returning
from the QuickScreen in the Playlist Viewer or
regular menus, or when returning from Settings
menus

Change-Id: I2884249eda55f782e97abad9dc19b3d9d1267fc9
2022-12-08 00:38:59 -05:00
Solomon Peachy
a9a284c1a0 lang: Correct a "mistranslation" in english-us
Introduced in 9a8ec7e0d from March 2021

Change-Id: Ica0767531bfd09d57cda2093d0e2764234b79526
2022-12-07 13:17:56 -05:00
Aidan MacDonald
90bc76956c Ignore trailing whitespace in settings .cfg files
Have settings_parseline() strip trailing whitespace from
the setting value.

Fixes a regression introduced by 5b1dd64f5, which caused
filename settings to be parsed incorrectly when there is
trailing whitespace in the .cfg file.

Change-Id: I6c54428f6467ea2d169d2a7449705b40627e1a40
2022-12-07 08:44:18 -05:00
William Wilgus
fceb4f6292 misc.c format_time_auto() make several const tables static
Change-Id: I597eee8f2d531d4cc2ec69dd8bc78f8cd7950162
2022-12-07 01:40:49 -05:00
William Wilgus
152a238947 playlist add mutex to public functions
mutexes are in just trying to refactor the rest and make it a smaller
and more robust system

--Done

Change-Id: If64807c3e0ee1966f7593795f26f1f538caf831b
2022-12-06 23:40:02 -05:00
Aidan MacDonald
a89f279fd4 settings: Clean up NVRAM code
Code style fixes, tighten error checking, replace a static buffer
with a stack allocated one.

Change-Id: I48392fa187057cc4a07847d45147f0db9f43f509
2022-12-05 14:18:06 -05:00
Christian Soffke
961e73b3a1 Addendum to d3d2045
Forgot to remove this...

Change-Id: Ifc97e47bb3923554030296097ef46352dad6eff1
2022-12-05 07:53:25 +01:00
Christian Soffke
d3d2045cab Bookmarks: Fix redraw issue in Select Bookmarks screen
Parts of the skin weren't redrawn after deleting a bookmark.

Change-Id: Id06fb95a6d3740340df989bcb9827fe3a87bb296
2022-12-05 07:28:21 +01:00
Aidan MacDonald
1e6c8d2ea6 skin engine: Settings ID to pointer conversions
Convert %St tag to operate on settings pointers instead of IDs.

Change-Id: Iabf4c280be82b495a64b560b59620fb477e0c738
2022-12-04 11:19:57 -05:00
Aidan MacDonald
4ff97ae07c settings: More settings ID to pointer conversions
Convert cfg_int_to_string(), cfg_to_string(), settings_write_config().

Change-Id: Icb72d2ff874cf90ffe5fe14878aece0a53f6bd18
2022-12-04 10:46:02 -05:00
Aidan MacDonald
bbe3942039 settings: Settings ID to pointer for cfg_string_to_int()
Accept a pointer to struct settings_list instead of an index in the
settings array. Refactor the skin engine's touchregion_setup_setting()
to avoid the use of indices.

Change-Id: I784a5e49205da6874b8b419dd5413f722ad45b67
2022-12-04 05:25:50 -05:00
Christian Soffke
0550c64226 Bookmarks: Fix autoload return from bookmark selection
- Fix placement of parentheses from commit 780990
- Return cancel when play_bookmark fails or user declines
to erase dynamic playlist after warning
- Go back to Playlist Catalogue when user cancels out of
screen

Change-Id: Ibe8c315bdf8c6c9e696f68541b5d4d97dc0e778a
2022-12-04 05:38:50 +01:00
Aidan MacDonald
879b5dae39 Fix red 8f582c90de
global_settings is not defined when building the database tool.
Add a path buffer in tc_stat to fix this. This also avoids race
conditions that may occur if changing the path setting at runtime.

Change-Id: Ib2ca92c2e34929c79b19ef145fd7ccdcd62c8d04
2022-12-03 13:13:16 +00:00
William Wilgus
3957aa8720 RFC BugFix tagtree.c reload data abort
TagNav.lua adds Reload to the Custom View menu of tagnav to allow users to make new search queries on the fly
previously you had to reboot the device to do this

I was getting a data abort prior to calling tagnav_init now but it worked fine if I copy pasted
the contents of the init function

I'm not sure how this fixed it but making a static init function makes it work as intended
is it a race some weird thing with the compiler??

Ideas??

Change-Id: I7fd6c50f929d3ac2d9ecec5336942288e9213ad5
2022-12-03 07:41:33 -05:00
Aidan MacDonald
8f582c90de tagcache: add a setting for customizing the database path
Add a new setting,

    database path: /path/to/folder

to change where the database files are stored, which allows it to
be shared by multiple builds when using multiboot. This avoids the
need to maintain a separate copy of the database for each build.
This setting can only be set from the config file; it has no menu
option yet (due to lack of a GUI to pick the directory).

Change-Id: Ide7b3ccdd84abb62b52f900421bd3d101773e093
2022-12-03 07:29:42 -05:00
William Wilgus
f033fd390e Fix Red playlist update a few functions
Change-Id: I0d9b4c8f7e4b128dd7378c6b7515f8195534fce7
2022-12-03 06:49:07 -05:00
Aidan MacDonald
98c7505c60 tagcache: move TAGCACHE_STATEFILE define to .c file
Provide a function to remove the statefile so that external
users of this define can call that instead.

Change-Id: Id3e1e0564b25fe28bbc68c2e9365d8bf51e6e4f8
2022-12-03 06:34:47 -05:00
William Wilgus
03c225fe54 playlist.c clean-up and organize
No functional changes

Change-Id: I5c7a4a63c54bc867b7d6c2ca6cbc8ef135e01a90
2022-12-03 06:28:48 -05:00
Aidan MacDonald
90dc64da32 tagcache: remove TAGCACHE_STRICT_ALIGN flag
This has been defined to 1 since forever, so the last remaining
check presumably isn't catching anything.

Change-Id: I0b60f831a6e5e8fc45788e7581fccb0cb62bce73
2022-12-03 11:00:35 +00:00
Aidan MacDonald
b6c2b54e01 tagcache: move most defines to .c file
Most of the defines in the header file are internal to the tagcache
and therefore should not be exposed in the header, to make it clear
that outside code does not depend on the values.

Change-Id: I83b0c83c61c755231e03719a6845a555f983194a
2022-12-03 11:00:27 +00:00
William Wilgus
177a15b2ed playlist_catalog remove static playlist_dir in favor of generation at runtime
this needs tested by the heavy playlist users

with the addition of initialize_catalog_buf there shouldn't be any stack overflow concerns
since we are no longer creating another max_path sized buffer when one is already available
this also simplifies the code a bit

rather than carrying around the playlist directory just generate it on the fly
copies the directory to the supplied buffer

add catbroswe_status to keep track of what browse context(s) are currently in use

Change-Id: I145ec501f601c84bb52f2241ed28c6aefab6897b
2022-12-01 22:29:35 -05:00
William Wilgus
773fa7874d RFC playlist.c add_indices_to_playlist() seek back to start of file
get_filename() changes the seek pos with out restoring it
seek back to the beginning or after the BOM if utf8
--
the other option is to open our own file descriptor this will
remove the need for the mutex but it would no longer block get_filename
from getting potential stale / bad data

Change-Id: I0d2b8a1a297c7aaf453b3bc558b2b5b53dbe591b
2022-12-01 17:56:31 -05:00
Aidan MacDonald
d7557e8da8 settings: Update doc comment for struct settings_list::cfg_vals
cfg_vals has not been used in conjunction with F_T_UCHARPTR for
quite a while.

Change-Id: I7f710201484ca25aab112897123afd07abdfd4c2
2022-12-01 14:24:51 -05:00
Aidan MacDonald
528dd0b03d settings: Remove redundant lang_id check for F_PADTITLE settings
All the F_PADTITLE settings use a lang string so it's safe to
assume the title (which is usually from the setting's lang_id)
is ok. Not like it's very useful or safe to show the cfg_vals,
anyway...

Change-Id: I0bf710e1b2a5a7bcdfe9e4370f48a2f25e8dddf0
2022-12-01 14:24:51 -05:00
Aidan MacDonald
fb0757b913 settings: Remove F_ALLOW_ARBITRARY_VALS from hotkey settings
The hotkey settings come from a fixed enum, arbitrary values are
not supported. It's not possible to use choice settings for them
because some enum values are only used in the WPS, and some are
only used in the tree.

Change-Id: I4647a8c02d960234323a7f2bbf31fee9f8c5b91a
2022-12-01 14:00:01 -05:00
Aidan MacDonald
8aa3b22160 settings: Update int fallback check for settings with cfg_vals
This atoi() was added long ago in commit d490f441, and it looks
like it's intended to allow arbitrary values in table settings.
These table settings have some symbolic values (eg. off, on) but
are otherwise int-valued.

As far as I can see the only settings that can take this branch
are all table settings with F_ALLOW_ARBITRARY_VALS. It doesn't
make a lot of sense to accept random integers without that flag,
so make the atoi() conversion dependent on it.

Change-Id: I7bb1bc4997601b73ad8dcbf2f3ddf434d16adf23
2022-12-01 13:59:49 -05:00
Aidan MacDonald
6346be51a3 settings: Clean up and simplify settings_load_config()
Use find_setting_by_cfgname() instead of doing it manually.
Reduce the excessive level of indentation.

Change-Id: I410fd7e0c26d065bc479dad3b6facfb5368cd091
2022-12-01 13:36:54 -05:00
Aidan MacDonald
5b1dd64f50 settings: Add helper function for handling filename settings
The old inline implementation was buggy -- it didn't check the
suffix was actually at the end of the string before stripping
it, and didn't check for truncation. This version also avoids
using an extra buffer.

Change-Id: I33abfefc508675d3079cc64a9ad2b11d646baa0d
2022-12-01 13:07:24 -05:00
Aidan MacDonald
afa58ef277 settings: Remove unused INT_SETTING_W_CFGVALS
This hasn't been used for quite some time; it appears to have been
obsoleted by table settings.

Change-Id: I8818e3f639d9783aaa2554dd098128ceda686527
2022-12-01 13:07:24 -05:00
William Wilgus
c9c340704f playlist_create fix race condition
I'm pretty sure this is a very old bug I traced it down to the
current_playlist getting changed out from under add_indices_to_playlist
causing myriad of issues from buffer full to invalid control file to shifting indices

this only appears to happen with the dircache on

I still get an incorrect resume state with the wrong song very rarely -- turns out get_filename seeks the file FIXED

Some debugging left in for now till we can verify there are no other instances

Change-Id: I289a775462eddfe93da4a326dc9e38605af06816
2022-11-30 23:15:49 -05:00
William Wilgus
0ba3392b9f Bug Fix bookmark.c fix resume_info overwritten
fix a bug where when 'most recent bookmarks'
was enabled the next bookmark file written
would get the info from the last 'most recent'
bookmark instead of the current bookmark

also removed the global resume_info struct in favor of local variables

added verification of the resumed track

Change-Id: I10176a2e4a18da6d5c4bb5fc0ed5d7e81d803ed5
2022-11-30 00:01:47 -05:00
William Wilgus
3f4e55a872 bookmark.c fix bookmark.c fix filename generator #2
strlcpy returns the size of the string it tried to create so we still need strlen

since we know what the sizes are of the strings just check for overflow first and use strmemccpy

fix bufsz on playlist_get_name()

Change-Id: Iaa52f869994ca94487c19b0cf2958330db4fc786
2022-11-27 02:05:34 -05:00
William Wilgus
b11777b06c bookmark.c fix off by one error in filename generator
strlcpy expects the buffer size so the name gets truncated by one character

Change-Id: I05ca0fed0a65a8b200f75b9647f7bf11407777a6
2022-11-26 20:51:33 -05:00
Christian Soffke
4ecf3970a6 Playlist Catalogue: Return to opened playlists
The playlist catalogue now remembers when you left
a playlist open and will return to it automatically.

Change-Id: I5b725a776b0a524139588c86e38150e5e25cb7d7
2022-11-26 17:20:06 +01:00
Christian Soffke
098a8fd334 Playlist Catalogue: Restore selection in playlist
Saves and restores the selected item in your
most-recently accessed playlist, similar to Database
and File Browser.

Change-Id: I00afca41e33470cb458c4b87baccd6fd4016887a
2022-11-26 17:20:06 +01:00
William Wilgus
88ecaf2b8c bookmark.c remove static bookmark buffer
Change-Id: Ie23760890e76177acf3700fb8eb73ca7f81f112e
2022-11-25 23:39:47 -05:00
William Wilgus
853d70e938 Fix Red confirm_delete, CHECKWPS & DBTOOL
Change-Id: I2f375def92e4c3c4b6be9d0494de682e6d3ebd2d
2022-11-24 23:44:35 -05:00
William Wilgus
71934d4c16 move confirm delete prompt to misc.c
Change-Id: Iadb1c7199caa5070f555eb4d329efb02e3193289
2022-11-24 23:09:26 -05:00
William Wilgus
3a22322ab7 bookmark.c parse_bookmark remove redundant conditional
we can just use the buffer not being NULL to decide

Change-Id: I233191ce16db4c18ed418794c18b8c51bb05399d
2022-11-24 23:30:37 -04:00
William Wilgus
780990fe5d bookmark.c remove some global buffers
refactor to allow removing some of the static buffers

Change-Id: Ia3ff6ea28f35634fd8c31b023431ad53bd542085
2022-11-24 22:00:14 -05:00
William Wilgus
8b522b8973 bookmark.c clean-up
No functional changes

Change-Id: If82f3e58ca848ade2a49f31357d39de9c5ba9ece
2022-11-24 20:08:00 -05:00
William Wilgus
1e6d643cfb Fix Red lib/helper.h
missing brightness defines

Change-Id: I7f6d67e2eb1be9c156a02ad3ff1ba4141e7cd08c
2022-11-23 23:55:45 -05:00
William Wilgus
97a82ee3ec plugins HAVE_BACKLIGHT helper remove ifdefs in favor of dummy functions
lessen the ifdef hell

Change-Id: I52f830284e4599f3fc3a75c27dda27058b8de1a3
2022-11-23 23:00:29 -05:00
William Wilgus
3745c813f9 misc.c open_pathfmt caller supplied buffer
Amachronic raised concern about open() blocking causing a static buf
to get overwritten in multiple calls its prudent to just have the caller
supply the buffer to minimize stack issues later

Change-Id: Iae27c7d063adb1a65688f920f6aa5c395fa5694a
2022-11-23 22:09:46 -05:00
William Wilgus
80b8b13544 BUG FIX settings_list fix un-macro'd int_settings for backlight & contrast
missed these

Change-Id: Ifdc682cc36a9192c8e0bbd2e2fee1f32946362e7
2022-11-23 21:14:09 -05:00
William Wilgus
8379c6eb07 tagtree remove unneeded strlen
unfortunately most of the overhead in searching for <Untagged> occurs in
reading of entries so changing searching the resulting string faster doesn't
do much good but any we don't need this strlen call since its already been
computed

Change-Id: Ia2815a6e7d75237366977632f9b0bc7999254096
2022-11-23 11:01:19 -05:00
Aidan MacDonald
ec1611dfa6 Add a comment about the ordering of 'enum playmode'
Change-Id: I1f259afaa2d0212c5bedba41380e51b9a911aaaf
2022-11-23 10:08:49 -05:00
Aidan MacDonald
9f09cdc9b8 skin engine: Streamline handling of the %mp tag a little
current_playmode() returns a value from 'enum playmode' and we
can take advantage of the enum values to simplify the code.

Change-Id: I368ec38ba5061f6cc6d3382e536db2312b27d643
2022-11-23 10:08:49 -05:00
Aidan MacDonald
3815ef8050 skin engine: Remove albumart viewport field
The viewport field in albumart is unnecessary, but for a different
reason than eg. the progressbar was. The skin engine draws images
by going over a global list of images shared between all viewports.
Prior to drawing a viewport, every image is marked "not displayed."
When an image display tag is encountered during rendering this mark
is set to the index of the subimage to be displayed.

The albumart is handled similarily, by setting a handle to -1 and
then updating it when the %Cd tag is encountered. The albumart is
not drawn unless the handle is set to >= 0 by the %Cd tag. So we
don't need to track or check viewports at all, because only the
viewport that contains the %Cd tag will ever draw the albumart.

Change-Id: Ibc0233d168012759325d3c16dc317de9ad3dcf6c
2022-11-23 10:07:29 -05:00
Aidan MacDonald
830436a282 skin engine: Remove viewport_colour viewport field
Yet again, no need to store the viewport because we already know
it -- and this time the render code is obviously relying on that
assumption.

Change-Id: Id5eb7cd9999fbe1efccd54bd8f0fd3c8a3011c8e
2022-11-23 10:06:16 -05:00
Aidan MacDonald
9368844ad1 skin engine: Remove progressbar viewport field
Again, we don't need to store the viewport in the progressbar
struct because it's known at render time.

Change-Id: I12514ceaace7c897194b18929364340871ef4635
2022-11-23 09:44:23 -05:00
Christian Soffke
f242b0ec6c Settings/System/Plugins: Go to WPS when ACTION_TREEE_WPS is pressed
Used to go to root menu before.

Change-Id: I5c0e0cb204cb3979917dde0f243185c32ef4177a
2022-11-23 01:24:59 -05:00
Christian Soffke
17cae50497 PictureFlow: Add hotkeys for changing sorting on iPods / Update manual
Adjust current sorting by pressing both
the Select button and Menu (or Play)
at the same time.

Change-Id: I474b79a16e278d34e3983384125015bdfb6f484a
2022-11-23 01:24:59 -05:00
Christian Soffke
0c7f66ab5f Playlist Viewer: Display playlist name in title
Change-Id: I7b258a566f55d026710d3441d1b4188f7614c5ee
2022-11-23 01:22:14 -05:00
Christian Soffke
6bc443f474 Hotkeys: Add placeholder for function return value
Seems a bit clearer to me than redefining the meaning
of ONPLAY_OK in this context, which was easy to miss.

Fixes the return value for the bookmark_create_menu
hotkey, too. It was previously mapped to ONPLAY_OK
in case the function failed, and to ONPLAY_RELOAD_DIR
if it succeeded. This had no ill effect - or any effect –
since either of the values were disregarded by the WPS
when executing a hotkey.

Return values of playlist_insert_shuffled also had no
effect (by design, apparently, see commit 482b45b).
Use ONPLAY_FUNC_RETURN in hotkey_assignment.

Behavior hasn't changed, it's only been made more
explicit.

Change-Id: Iefc60c9f42c1063af78d368dc382916848064d38
2022-11-23 01:22:14 -05:00
William Wilgus
0d355a9c47 filetree.c add back SORT_ALPHA_REVERSED
this is used for the playlist folder advance

Change-Id: I9da826d39c1a5880f6b97c33389afd601ce07834
2022-11-23 00:51:54 -05:00
William Wilgus
263cc13985 tagtree.c move sort_inverse out of compare function
Change-Id: I9c91a96a45fe98d51d27974bc2d6d79eaa5039d3
2022-11-22 19:14:26 -05:00
William Wilgus
2a9482ad7c filetree.c move sort functions out of cmp function for SORT_ALPHA
move sort function decision out of the compare function

Change-Id: Ibc26ebeaf409048efa92cb611edc223ed73c9e39
2022-11-22 18:38:58 -05:00
William Wilgus
1561b4ec9a filetypes.c clean-up
make icon a voice struct one

Change-Id: I44df788d03e38fe1bca7ea50f32c8dc5941405ab
2022-11-22 15:19:45 -05:00
William Wilgus
dc47bf8ae2 BUG FIX settings_list.c
fix dumb mistake reordered mavro args instead of just struct args

Change-Id: I0067d6c9fb9e00a927d2936629981fd5a15f705b
2022-11-22 02:19:06 -05:00
William Wilgus
5240202226 filetypes.c put attr mask back
not totally sure of the implications but this mask should be here

Change-Id: I605841a4ec41a2ffbf7b0f6eeaf142068577b919
2022-11-21 23:28:23 -05:00
William Wilgus
b40dff510a cuesheet.c guard against invalid digits causing underflow on field ASAN
is digit checks for invalid fields but could possibly check field = -1

Change-Id: I5f6bc5047b1ec0bf122d360f8eb86e64a2784bef
2022-11-21 23:24:30 -05:00
William Wilgus
19aa4ca276 tree.c spell names AFTER voicing filetype
Change-Id: Iff2102c2993593f7b3c24f131c0f67f45c870bc7
2022-11-21 23:05:01 -05:00
William Wilgus
d077fec5f1 tree.c move voice filetypes to its own conditional
Change-Id: I3a5171378355e64192de1e29f62d52e03771afe4
2022-11-21 22:54:54 -05:00
William Wilgus
efdc6feddb move inbuilt_filetypes.voiceclip to a separate struct
there are a lot of duplicated voiceclips in the inbuilt_filetypes struct
its already looked up so deduplicate

Change-Id: I7846277d2da308f605d5564e9081d6077e697239
2022-11-21 23:52:59 -04:00
William Wilgus
2056878e46 move inbuilt_filetypes.icon to a separate struct
there are a lot of duplicated icons in the inbuilt_filetypes struct
its only used at load so deduplicate and look-up by attr

Change-Id: I5eb34e5243d88688984f689e0add08f92d953a6f
2022-11-21 21:27:10 -05:00
William Wilgus
658cc95885 remove some sprintf putsxy calls in favor of putsxyf
we now have putsxyf in screens[] so no need for a separate
buffer in these cases

Change-Id: Ife0738e731f03d255f512bab3d5bb07b8be8693d
2022-11-21 00:25:12 -05:00
William Wilgus
0661784469 make int_setting step & unit int16_t
since int_setting is the largest struct in the union of settings
saving 32 bytes adds up over every setting

frees ~200 bytes

Change-Id: Id4722262e40db3021c740e138fe7352be10e2c70
2022-11-20 13:57:09 -05:00
Christian Soffke
b7603adc64 Properties: Refactoring & Minor fix
- Extract functions for
* determining whether it's a file or dir
* showing stats for dir or file without id3

- Remove typedef for struct
- Fix unit string not being displayed correctly during scanning
(use %s instead of %cB)

Change-Id: I31440ebd96bca791a96c66511c3de9727608218a
2022-11-20 00:41:10 -05:00
William Wilgus
da2eaf3bf7 misc.c open_pathfmt fix yellow
Change-Id: Id844825726654a3a5b19a1672cb66af9aadaed32
2022-11-20 00:00:40 -05:00
William Wilgus
e7e20fab1b create function open_pathfmt() to allow printf formatting on open()
save some space by allowing printf formatting directly rather than
having a buffer and using sprintf

Change-Id: I049c8f898fb4a68a26ad0f0646250c242647ba12
2022-11-19 23:13:42 -05:00
Christian Soffke
8fe42c43c6 WPS plugin hotkey: Fix UB
HOTKEY_PLUGIN action resulted in return value
of void function being assigned and then returned
by execute_hotkey.

Change-Id: I8b141e878fc2c0b09070186fc3520314c18a83b0
2022-11-19 22:19:15 +01:00
Christian Soffke
dcde5aa89d Database & Playlist Viewer: Fix return to WPS from plugin
After calling up PictureFlow from the database or from the
Playlist Viewer, you would not be returned to the WPS as
would be expected when picking a new song, selecting
"Go to WPS" or pressing the WPS action button.

Change-Id: I902ac9185ebe092d0c4c08804db0a813a32cc39c
2022-11-19 17:08:39 +01:00
Christian Soffke
b3a464c9d1 Playlist Viewer & Catalogue: Go to WPS when ACTION_TREE_WPS is pressed
Change-Id: Id69253beadcc203ea0e2d16e5acc353aee0f6ad4
2022-11-19 13:39:58 +01:00
Christian Soffke
3d34140cfb Fix return to root after selecting items from playlist viewer
When selecting an item, Rockbox only checked that
playback was stopped before entering the viewer and
went to the WPS if music had started playing afterwards,
but returned to the root menu otherwise

The WPS will now be displayed whenever a new item has been
selected, even if audio was paused or playing before.

boomark_autoload required slight adjustments to its return values,
so that the WPS would not be opened after a user cancels out of
the bookmark selection screen for a playlist, since it  previously
returned true in that case, too.

Change-Id: I231ea788e2f80fdda5fe4ad4d2420450931f686f
2022-11-19 10:01:23 +01:00
William Wilgus
3b1230b365 talk.c add busy loop to talk_spell
talk spell can lose the remainder of the words on longer sequences

Change-Id: I5f8f0f42d780ea9d1f00d99ff32746be34c27745
2022-11-19 02:13:51 -05:00
William Wilgus
b0ccb1b95f talk.c clean up
Change-Id: Ie06859c80e9ca14bf3e4a23b82d3d1c76263b2b8
2022-11-19 02:12:09 -05:00
Aidan MacDonald
38687821b2 skin engine: Remove playlistviewer viewport field
We already know the viewport at render time (I think... at least
this seems to be the case for themes I tested) so there's no need
to store a pointer to the viewport.

Change-Id: I75fa2262e96c6f735e6b5da33cd4ca9ac68cd2ee
2022-11-17 16:12:19 +00:00
Aidan MacDonald
7de16eee26 viewportmanager: Fix missing void in function definition
Change-Id: Ibc56e3ce92b4559fd310843a0761e7bfb6511e1d
2022-11-17 16:12:19 +00:00
Aidan MacDonald
15b36a02b1 Remove get_viewport_default_colour()
The function isn't used except for the skin engine's %Vf/%Vb tags,
so inline it there and remove the separate function.

Change-Id: Ia207321877234bc3679457c820a4292ae53f3520
2022-11-17 16:12:19 +00:00
William Wilgus
7b3e2f6f85 fix yellow iap-core.c
Change-Id: Idebedd10962e358002ea1a3dd6ae491e59c44ecb
2022-11-17 04:43:38 -05:00
William Wilgus
972810f6cf strlcpy finish cleanup
remove strlcpy & strlcat from string.h

document suspicious strlcpy call

convert strlcat.h users to string-extra

Change-Id: I313e75db86385c0e6d1aee75d252093be4935f60
2022-11-17 01:54:46 -05:00
William Wilgus
0b7a387671 open_plugins add name when plugin can't open & check LANG_LAST_INDEX_IN_ARRAY
can't open '' was confusing for users so pass the key to open plugin
in theory you could have a plugin that defaulted to these lang_ids
run but its good enough to tell the user what failed to open IMO

lang_id changes mess with open_plugin since it uses them as look-up keys
so add checks for LANG_LAST_INDEX_IN_ARRAY to the checksum

the plugin now removes entries with an invalid checksum

devices with harddrives only append their .dat file so have them skip entries
with invalid checksums and only notify user if a valid entry wasn't found
(these users can run the open_plugins plugin to remove invalid entries)

Change-Id: Icf157675beaccda785643d5a9ed032a7cde30f12
2022-11-17 01:43:16 -05:00
William Wilgus
4c3937591c lua Fix potential event stack OVFL
you could return values in the event callbacks that would never be processed
this would eventually cause a lua stack overflow

settop(0) eats all return values (if any)

Change-Id: Icac6b27e592b385421275d4bd899ed3fe1065669
2022-11-16 20:54:30 -05:00
Aidan MacDonald
5fdd491ceb playlist: reduce memory usage for loading playlists
There's probably little benefit to using core_alloc_maximum() for
loading playlists since they are parsed incrementally. I/O speed
does not increase with increased read sizes beyond a certain point.
Read by 32 KiB chunks since that is what the buffering thread does.
Fall back to core_alloc_maximum() if a small allocation fails so
that buflib will try harder to free up space.

Change-Id: I08b94317d12b98af09ef2bd84aa1195c4c51d1b1
2022-11-16 06:47:38 -05:00
William Wilgus
dfa1539b13 Bug Fix test_viewports.c call scroll_stop before changing viewports
Change-Id: I0dd0374dfff7fef7e4f431e7231345ee1ae6cb2b
2022-11-16 01:49:41 -05:00