Commit graph

17142 commits

Author SHA1 Message Date
William Wilgus
3bb75e0039 tagtree.c optimize get_tag()
store tag length to shortcut strcmp

this is nearly as fast as making a hash table using gperf

its not the hottest path but its
even slightly faster to shortcut
based on string length

    if (tagstr_len > match->len)
        continue;
    else if (tagstr_len < match->len)
        break;

but I found no measurable difference
I don't think its worth the extra constraint of keeping tags sorted

Change-Id: I4bb47cc6c5b8266d5f13c4ac78ae11d55ecb2d67
2023-02-09 06:56:58 -05:00
William Wilgus
1c26f565bf tagnavi make track submenu
add some faster options to the track menu
add a shortcut for basename formatting
sort basename results

filename - by sorted filename
title - just title no formatting untagged items are unsorted as well
title mm:ss - title and duration

Change-Id: I90aea95051f6231580ef7f1fc08cd2d0d69601fb
2023-02-07 08:44:57 -05:00
William Wilgus
b5d93a6605 Revert "tagtree remove unneeded strlen"
This reverts commit 8379c6eb07.

Reason for revert:
tcs.result_len is not the same as strlen(dptr->name) + 1
since it gets filled with filename

Change-Id: I1264afc0a43ffe75adf1de00d27ab98e3adbca19
2023-02-05 06:47:38 -05:00
William Wilgus
d5a84d42b0 [BugFix] tagcache.c fix off by one error in find_entry_disk()
the tagcache counts the null terminator strlen however, does not
no matching entries makes for a terrible amount of disk searching
and a hang on devices without dircache to save them

Change-Id: Id3460037199ee9853de0f11e4763a7ff11130e45
2023-02-04 11:39:43 -05:00
Aidan MacDonald
78718aa7eb playlist: Annotate locks as read/write
Distinguish read locks from write locks to aid converting the
mutex to an MRSW lock at some point in the future. Everything
is a write lock for now and a mutex is still used, so there's
no change in behavior.

Change-Id: I25aeed580580bdb0c3048fc7e1eaad1c32c30159
2023-01-29 08:24:48 -05:00
Aidan MacDonald
25bd3bc971 playlist: Optimize playlist_remove_all_tracks()
This was insanely slow for large playlists. Implement it as a
constant-time operation to avoid the O(N!) blowup, and add a
new "clear" command to the control file to avoid flooding it
with individual delete commands.

Change-Id: Ied82d1cba015591edd583f2a2ff6772108f4e176
2023-01-29 07:55:10 -05:00
Aidan MacDonald
2c4546ba99 playlist: Remove unused PLAYLIST_DELETE_CURRENT
Change-Id: I4d1a8798aca249d343ca27a9973213d427b73963
2023-01-29 07:32:26 -05:00
Aidan MacDonald
d85f4b5e1c pdbox: Move core thread off COP
This is all but guaranteed to be broken since pdbox doesn't use
SHAREDBSS_ATTR or SHAREDDATA_ATTR, needed to share memory safely
with COP threads.

Judging by the codec performance comparison on the wiki, if the
iRiver H100 and H300 can run PDbox on one core, PP targets should
have no problem doing it - they are 2-4x faster even on codecs
that don't have multi-core optimizations.

Change-Id: I8f556013146cb670f69cc42e80b1c768ba0f74cd
2023-01-29 07:15:40 -05:00
William Wilgus
4e5fcbe898 fix red #2 d6fb80d4
Change-Id: I147e9b8f7c8e64234f55d39f9ac7c7253b065f9a
2023-01-27 01:12:42 -05:00
William Wilgus
1d6ce5193f fix red d6fb80d4
Change-Id: I805490f660626f48220b41de3ee1026c260d0067
2023-01-27 00:40:20 -05:00
William Wilgus
00e5c81ecb debug_menu database delay redraw
only redraw every 100 entries

Change-Id: Ie0bb54812c1b8341aa4d8303341904d17baa2890
2023-01-27 00:10:47 -05:00
William Wilgus
d6fb80d4ff Tagcache - Ramcache Move ref checks, speed up disk searches
move loading file reference to a separate function

some optimization of the disk search function check tag length before
reading the actual entry & reduce number of lseek calls
this affects startup resume as well before tagcache is done loading

Change-Id: I2bd2fc53c4870416ecd1a4034b34cb6984d8ad51
2023-01-27 00:03:51 -05:00
Aidan MacDonald
c0c1a6e5f0 Fix yellow 65b3ff81c5
Change-Id: Ibf99e4e6f98021b35d420520219287336bf25f0e
2023-01-23 14:46:02 +00:00
Aidan MacDonald
65b3ff81c5 playlist: Fix dircache scan thread deadlocks
Fix deadlocks in the dircache scan thread caused by incorrect
lock ordering. Mutating operations need to stop the thread to
prevent it from accessing invalid data; this must always be
done before taking the playlist lock to avoid deadlocking the
scan thread.

Change-Id: If719a8b28ed0b0b3eac068073581e606c4a5f58a
2023-01-23 12:24:12 +00:00
Aidan MacDonald
ce52d0c870 playlist: Fix mutex initialization
This is a one-time thing; make sure it doesn't happen more than once.

Change-Id: Ic42f48e5714dff2906c252ecd091989d2d6e5a86
2023-01-23 12:24:12 +00:00
Aidan MacDonald
2a40d42012 playlist: Refactor control cache flush
Make background control file flushing work on non-dircache targets.
It has nothing to do with dircache and doesn't belong in the dircache
scan thread.

Change-Id: I3f39261ccaebb5dce69e7db3d2e0c0c0c54f640b
2023-01-23 12:24:12 +00:00
Aidan MacDonald
551e6aac50 playlist: Remove volatile from indices
This is not necessary. Volatile doesn't create a memory barrier
wrt. non-volatile accesses and there are no interrupts involved,
so there's no reason to use it here.

Change-Id: I78299e2f318e68735364601b3bc2aa036e71130e
2023-01-23 12:24:12 +00:00
Aidan MacDonald
fcb6239aba playlist: Remove current flag
Only current_playlist will have it set, so compare pointers instead.

Change-Id: I46dc7baef9699990962176db7c8796bba1e4809d
2023-01-23 12:24:12 +00:00
Aidan MacDonald
dd2a0aeab0 Use perceptual volume scale for volume bars
Display volume bars using a perceptual scale instead of the
linear dB scale. This makes adjusting volume with the bar a
lot more usable on touchscreen targets.

Change-Id: I2db010486e6ba17f9d08202ee74a0b509f2cb434
2023-01-22 22:10:46 +00:00
Aidan MacDonald
5b27e2255a Add perceptual volume adjustment
The perceived loudness change of a change in volume depends
on the listening volume: at high volumes a 1 dB increment is
noticeable, but at low volumes a larger increment is needed
to get a comparable change in loudness.

Perceptual volume adjustment accounts for this fact, and
divides the hardware volume range into a number of steps.
Each step changes the dB volume by a variable amount, with
most of the steps concentrated at higher volumes. This
makes it possible to sweep over the entire hardware volume
range quickly, without losing the ability to finely adjust
the volume at normal listening levels.

Use "Volume Adjustment Mode" in the system settings menu
to select perceptual volume mode. The number of steps used
is controlled by "Number of Volume Steps". (Number of steps
has no effect in direct adjustment mode.)

It's still possible to set a specific dB volume level from
the sound settings menu when perceptual volume is enabled,
and perceptual volume does not affect the volume displayed
by themes.

Change-Id: I6f91fd3f7c5e2d323a914e47b5653033e92b4b3b
2023-01-22 21:19:57 +00:00
Aidan MacDonald
15c4447b66 Fix red dc83963962
Change-Id: I196268c6f6bc4f6e2d8f2cb7dcc3a12218c5d9d4
2023-01-22 21:19:34 +00:00
Aidan MacDonald
dc83963962 Add helpers for converting to/from normalized (perceptual) volume
These routines were taken from alsamixer and converted to fixed
point for Rockbox.

Change-Id: I64e8bf08da02b1e6e3ef10fdc78254bf8e87ff20
2023-01-22 15:43:00 -05:00
Aidan MacDonald
c307d98e3f playlist: pin dircache fileref buffer during background scanning
dircache_search() can yield, which would lead to memory corruption
if the playlist dcfrefs buffer is moved at that point. Prevent this
from happening by storing the buflib handle and pinning the buffer
while scanning the dircache.

Change-Id: I28b122de283953dd6d54c1d00598759f5bdcbe93
2023-01-22 13:47:50 +00:00
Christian Soffke
32f365bf3c database: make parent tables work with plugin
Enables the use of PictureFlow and the Properties plugin
with parent tables of ALLSUBENTRIES, such as an album
or album artist, instead of individual tracks.

Change-Id: I18c4779ed116a48c732ae32b9629e7e0d93ce7c8
2023-01-19 15:56:35 -05:00
Christian Soffke
4d53d1b52b PictureFlow: fix_path_part checked too many chars
Shouldn't have any effect if album_name
is null-terminated, but still....

Change-Id: I51acb6c7858347d3bd922758ac4f0fcde349c9e1
2023-01-19 15:36:18 -05:00
Christian Soffke
f441d6bf05 plugins: lrcplayer: eliminate redundant function
Change-Id: I93fff9eb616f08bdad021180f83fea1fdb758870
2023-01-19 15:34:20 -05:00
Christian Soffke
36cef88d47 PictureFlow: id3 functions refactoring
- Move multiple-id3 functionality into lib
- Extract retrieve_id3 function

In preparation for using these functions
from the Properties plugin.

Change-Id: I7252581340680e32df763f1f4b41646a055fe19e
2023-01-19 15:12:57 -05:00
Christian Soffke
6129bfbb95 PictureFlow: Eliminate 'prompt' launch parameter
This was added in commit d553bb1 and
doesn’t seem to be used anymore.

Return PLUGIN_OK since an error message
is already produced.

Change-Id: I5eaf7e7eb7c850a6fa9c3d2717c440e335f5efd1
2023-01-19 14:52:49 -05:00
William Wilgus
1b383ef480 chunk alloc add buflib_get_pinned and chunk caching
Change-Id: Ia581656793b8ce9b80545705cfbba0fb225bb616
2023-01-19 00:04:25 -05:00
Aidan MacDonald
aae34b2e7f playlist: enable queue send
Apparently queue_send() silently falls back to queue_post()
if sending isn't enabled. Doesn't seem like a good idea, as
post and send are definitely *not* interchangeable!

The playlist code relies on queue_send()'s blocking behavior
to prevent the dircache thread from using potentially stale
pointers.

Change-Id: Ibf4b0def3bf9c96cb2fe80cd75043b7ce1dcf250
2023-01-16 16:57:23 +00:00
William Wilgus
d521020d21 [Feature] Add total entries to database info
show total database entries in debug>Database Info

Change-Id: Ic22b6a032ae0ee23e0f38c0da6a9cf1433ba29e2
2023-01-15 22:57:00 -05:00
Solomon Peachy
d39fcf5c89 Update english-us "translation"
Change-Id: I479e1fd337d3384241959782f3f2720e0cac6578
2023-01-15 20:32:14 -05:00
Solomon Peachy
0d8b3fe0b9 FS#13385: Updated Polish Translation (Adam Rak)
I applied the wrong diff, which missed a bunch of stuff.

Change-Id: I3c4da707243c5c0d579ad3130194bfb70fcb4d45
2023-01-15 20:32:14 -05:00
Solomon Peachy
2cb9c7ac29 FS#13385: Updated Polish Translation (Adam Rak)
Change-Id: I346440642c6de0ad5fe73a9cf384dafe266c1e03
2023-01-15 16:41:48 -05:00
Aidan MacDonald
67cb2e3cdc Add core_get_data_pinned(), use it where possible
Change-Id: I1b2f62f27780f99423085d2fffc972ea2701f998
2023-01-15 08:57:45 -05:00
Aidan MacDonald
f995c26de9 buflib: Add CONFIG_BUFLIB_BACKEND for selecting a buflib backend
Defaults to the normal "mempool" backend, which is currently the
only implementation.

Change-Id: I56d034a6e0f5edc90c39526d1551945eec6ca336
2023-01-15 10:04:13 +00:00
Aidan MacDonald
680261fbb7 buflib: Prep for multiple backend support, rename to buflib_mempool
Rename the current buflib implementation to buflib_mempool.

Change-Id: Iefdf74be1f7d8fcd19e6ce2289c3d1459b54d013
2023-01-15 10:04:13 +00:00
Christian Soffke
e61a5c957c PictureFlow: Add ability to insert into playlists
Songs or albums can now be added to new or
existing playlists directly from PictureFlow.

Change-Id: I6ea27e393fee0d5688385f9e91cf835be1756a7a
2023-01-14 19:44:11 +01:00
Christian Soffke
1e4ee1917c Fix red in 7f265ee
Change-Id: Ib2496af0ed6176ea537e1f61804c1ba514374fb6
2023-01-14 19:40:29 +01:00
Christian Soffke
7f265ee8dd Database: Add ability to insert multiple files into playlists
You could only add single files to playlists
from the database browser before. This
enables adding any database selection to
a new or existing playlist.

Change-Id: I811c7167641c589944bb2afc18dcc1d299a7b979
2023-01-14 12:14:28 -05:00
William Wilgus
cc79f1b543 on_play.c clean up playing_time
move seconds and sizes to arrays indiexed by enums
use a loop for the display and talk of each
stop exiting on SYS_EVENTs

Change-Id: I49d5b9827df4e711b38326e5fef3c54292000370
2023-01-14 10:31:56 -05:00
William Wilgus
6e08731835 [Feature] onplay.c Playlist Playing Time more fault tolerant
bad tracks now get skipped with a message at the end of scanning
rather than an error killing the count

Change-Id: I6d8c14ce00e78416b772bc5e9093a889351bc3de
2023-01-14 00:46:08 -05:00
William Wilgus
202d8939c8 [Feature] xduoo X3 add pitchscreen hotkey to wps
Back(home) + option in that order will bring up the pitchscreen

Change-Id: Iee1f7faf9415033ec8dbd0832e8550e86cd0a844
2023-01-13 23:56:10 -05:00
William Wilgus
958daa925e [BUGFix] ClipPlus move picker below yellow screen split
Sansa Clip and Clip+ have a split monochrome screen
 some versions have a dead line of pixels
having text split at this line makes it hard to read
move text picker below this split on these devices

Change-Id: I1ebcb4c4c7b1ea950f38e35fed06ed85437a657f
2023-01-13 23:12:28 -05:00
William Wilgus
91c7e333d7 Revert "keyboard.c make editline respect current UI font"
This reverts commit ebebef5566.

Reason for revert: I don't want to get too deep into this till I come back to the keyboard rewrite (hopefully)

Change-Id: Ia273f1a19a042be2dd0f1ee46690c03f2865cd95
2023-01-13 22:46:25 -05:00
William Wilgus
40355caefd buflib_shrink use NULL to signal start isn't changing
Change-Id: Id3e86d3860b8ed860dc6dcbc394b1b8f9f3274b5
2023-01-13 09:50:29 -05:00
Aidan MacDonald
719d48afc4 buflib: Refactor various debugging features
Gate buflib_get_data() checking, debug printing, and buflib
integrity checks behind individual defines in buflib.h, and
turn them all off by default. If needed, they can be turned
on manually when compiling.

The buflib debug menu is only available if debug printing is
enabled, so after this commit it will no longer be included
in normal builds -- it isn't very useful to end users.

Change-Id: Iab25b7852bc7c5592ce04c9c45762046a87d5bc3
2023-01-13 10:32:57 +00:00
Aidan MacDonald
1e9ad3ca0d Remove buflib allocation names, part two
Remove allocation names from the buflib API and fix up all callers.

Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a
2023-01-13 10:32:54 +00:00
William Wilgus
ebebef5566 keyboard.c make editline respect current UI font
Change-Id: I4dc95d42544a10df8086cc58c4a305d45b56bb1b
2023-01-13 01:36:45 -05:00
William Wilgus
2d9cb673e5 add chunk_alloc to playlist.c #2
dc_thread_playlist was asking for invalid indices
since previously the name buffer would have been valid
it just got whatever junk data was left over

add dc_discard_playlist_pointers for HAVE_DIRCACHE targets
this allows the dc_playlist_thread to stop its current lookup loop

Change-Id: I6f25b97b8c4e314d27c5e1e6ff0925b5a3e93f26
2023-01-12 19:36:38 -05:00
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