Commit graph

36720 commits

Author SHA1 Message Date
Christian Soffke
528b6a9a15 manual: Update screenshots
Change-Id: I264210ee0a759fc3a7e89578f7d9d32d58dfd609
2023-01-07 19:48:26 +01: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
Aidan MacDonald
5d0c382a59 lcd: Rewrite 16bit alpha bitmap blit
Avoids a harmless out of bounds reads in ASAN that occurs with
malloc buflib. Code size and performance is similar.

Change-Id: I1c674d046b069e64ad8cb6941356f7c568a81e88
2023-01-06 13:54:09 -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
9367ef1ed6 [BugFix] Fix some Shif related UB -- ASAN
these are the low hanging fruit identified by ASAN

cast the byte values before shift

Change-Id: Ifc5645354a10c15ccd09d1343e1705857a51e011
2023-01-04 22:00:25 -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
9d6f9441ae manuals: Update warning on max entries in file browser / playlist
These settings have a warning that increasing them will shorten the
audio buffer. This is not very useful, because users might not know
what "shortening the music buffer" implies.

Since the size of the audio buffer is probably irrelevant for flash
based storage, display the warning only for HDD-based targets, and
explain what the drawbacks may be if the settings are set too high.

Change-Id: Ie9eb4907c67e20695bfa083e1c2a29385e66afcf
2023-01-02 20:55:02 +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
a00bd421ac clean up button.c optimize !filter_first_keypress
do a bit of cleanup in button_tick move filter_first_keypress to a function pointer

Change-Id: Iefb05c1a182c1e15cfb5bca8e2ef31a710d15eba
2023-01-02 11:04:47 -05:00
William Wilgus
6cbf2160e5 tlsf fix corruption checks
Turns out (~PTR_MASK) != (0xFFFFFFFF - PTR_MASK) in 64 bit land

tmp_b = (bhdr_t*) ( (intptr_t)b->prev_hdr & BLOCK_SIZE );

using ~STATE_MASK or even #define BLOCK_SIZE (~PTR_MASK) resolves the issue

switching  BLOCK_SIZE TO  ~STATE_MASK appears to fix it

Also define BLOCK_SIZE (~PTR_MASK)

Fix a few signed / unsigned errors

Change-Id: Ica59db0faa2df408831c23312243ae19259dba6b
2023-01-02 10:09:46 -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
Solomon Peachy
485e96d6be tlsf: Update to upstream 2.4.6 release
Seems to resolve FS#13383 and FS#13384

Change-Id: I43b2f166b78e61c16723a944729aa117260320fc
2022-12-31 15:21:55 -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
Aidan MacDonald
484a79fcc0 x1000: Add INIT_ATTR to various target specific functions
Add INIT_ATTR to some low-hanging fruit in the X1000 code:
GPIO init, GPIO initial state tables, clock init, and DMA init.

Change-Id: Ia02b20945da1bbed103e2e01eaf60553eb5f72d4
2022-12-31 08:10:41 -05:00
Aidan MacDonald
a980d5f869 x1000: Enable support for INIT_ATTR
Enable INIT_ATTR support in config.h. Load init code to the
codec buffer, following the convention used by other targets
that support INIT_ATTR.

Change-Id: I8935fbaa100f0013bb328d71c4a49ec2ffafd003
2022-12-31 08:10:41 -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
William Wilgus
e180e45e01 events.c clean-up
check for invalid userdata by assigning the address of 'invalid_userdata'
this cleans up the functions a bit and removes some extra conditionals

Change-Id: Ic5e13147796e629010a1436eb60042f6550a959c
2022-12-30 07:23:29 -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
5f2ca6718d Revert "buflib.c strip path from alloc name"
The font code expects the full path to be stored in the
buflib alloc so this breaks eg. saving the glyph cache.

This reverts commit 2b4a4070c9.

Change-Id: I53844c39b34b14f7c8e5999825c1d012fa3f74dc
2022-12-23 19:59:06 +00:00
Aidan MacDonald
ba010851fa Remove lib/x1000-installer
Carrying this library is somewhat of a maintenance burden because
some Rockbox APIs are mocked or duplicated in the test suite and
thus need to be fixed up when refactoring.

It's also unused & incomplete, so there's no good reason to keep
it in tree any more.

Change-Id: If39c62744b4edc0d81b1b6608ee5df69430e6581
2022-12-23 19:54:18 +00:00
Aidan MacDonald
6e794c9a2d rbcodec dsp: Refactor DSP init routines, restore INIT_ATTR
Refactor DSP init routines so there is a dedicated init function
for the stages that need it. Remove the DSP_INIT configure message.
This allows the init code to be safely marked INIT_ATTR, saving a
bit of code size, and allowing the linker to verify that there are
no unsafe references to the init routines.

Change-Id: I1702f0f579bbb300a6fe7d0e67b13aa2e9dd7f8a
2022-12-23 12:47:10 -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
Aidan MacDonald
b96b7640de rbcodec dsp: Move dsp_sample_io_configure() to its own file
Makes dsp_sample_input.c a bit less messy, and dependencies
are more explicit. There's possibly a minor loss of inlining
but it isn't a big deal.

Change-Id: I30f923a0ca758f2b113d32852d1f65586dff0cd1
2022-12-22 17:20:14 -05:00
Solomon Peachy
646d5f92ef ata: Prevent powering-off ATA hardwre if it reports as mSATA or m.2
As those form factors are typically not runtime removable and as such
expect to always being powered up.

This is an experimental change, and we might revert it if it doens't help

Change-Id: I61187f297866f64589a546352828a0ff8169fa30
2022-12-20 20:38:43 -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
2b4a4070c9 buflib.c strip path from alloc name
Change-Id: I6a0f1cc9037fcbe0245d94b4c77ba4ec08378434
2022-12-20 18:10:44 -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
Solomon Peachy
83bb89d0b8 jx47xx: Rename crt0 'init' sections to 'startup'
Mirrors the change made to the x1000 target

Change-Id: I69663245b1d05c001500240af33164f222e70e90
2022-12-19 23:09:54 -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
William Wilgus
f37ebe5ed2 [BugFix] root redirect failed to match the peoper drive when internal drive is missing
HAVE_MULTIVOLUME is a subset of HAVE_MULTIDRIVE
in normal circumstances they are interchangable
but when the internal drive is not found the assumption falls apart

at the moment most of the bootloader are less selective about what drives/volumes
they will mount therefore the volume might not match between what the bootloader
returns for multiboot and what the firmware sees

updating bootloaders will fix this but it should probably be made more robust
at the same time

Change-Id: I93acd4a539894f093211b74b030df3b2c6a0aa11
2022-12-18 23:32:13 -05:00
Aidan MacDonald
992455dc58 Fix red in 8165a6c245
Change-Id: I939b40492902525c911c063c66b28529b7d0842f
2022-12-18 23:55:36 +00:00
Aidan MacDonald
8165a6c245 rbcodec dsp: Remove INIT_ATTR from the DSP library
All of these are technically unsafe cross-section references but
most aren't reported by the linker, probably due to inlining. In
practice there was no problem because the affected code was only
run at init time anyway.

For now, remove INIT_ATTR until the init code can be refactored
to avoid the problematic references. This should also save code
size by moving more code to the init section.

dsp_init() gets to keep its attribute because it's already OK.

Change-Id: Idc9ac0e02cb07f31d186686e0382275c02a85dbb
2022-12-18 22:23:52 +00:00