1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17281 commits

Author SHA1 Message Date
Christian Soffke
9af812c320 playlist viewer: fix track info for first track of a stopped current playlist
A playlist that hasn't finished and is resumed without starting
playback has its index set to 0 by empty_playlist_unlocked.
So ignore the index for stopped playlists.

Change-Id: I575ceacbcd2369eaa3ae4e47de7b2f7e999248f5
2024-04-16 22:56:43 +02:00
Christian Soffke
b06073f771 buffering: ensure sufficient buffer size loading bitmaps
Commits 5aa0fc3 and 32f1418 (g#4451, g#4452) changed the
amount of space that was allocated for loading bitmaps
used to display album art.

Testing revealed that the size of the JPEG decode buffer
can reach up to (38 * 1024)B in some cases.

When the limit is reached, additional space is required
by the resize_on_load function.

Change-Id: If93b45754a4f5948b6160f659182e4618e01912e
2024-04-13 16:19:48 +02:00
Christian Soffke
05b070b0b8 playlist viewer: get Info for playing track from RAM
No need to hit the disk to retrieve
metadata for the currently playing track

Change-Id: I944910adfb750d3f8fb52b8c057e98d58700cf17
2024-04-11 14:01:27 +02:00
William Wilgus
76a9a524c0 skin_tokens.c get_dir() improve path detection
get_dir grabs a component of a path
it now handles
multiple slashes, no leading slashes

Change-Id: I6c4a377796652808a02b44f6da0a63b201dd8f46
2024-04-04 14:40:17 -05:00
William Wilgus
3714288f7a add bootpath to bootdata debug menu
show the full path to the currently booted firmware

Change-Id: I9c0b4335ef410a0a5132f1097a29368306497206
2024-04-03 15:57:06 -04:00
William Wilgus
8c994db247 multiboot_select plugin check volume root for valid firmware -- Try 2
I'm not sure why but on my fuze v2 I don't get the '.' nd '..'
directories back from readdir

that make removing '.' to find /.rockbox inconsistent

Instead filter out files and strcmp the incoming dirs
to BOOTDIR (.rockbox) and clear it when they match

Change-Id: Id8f3312cb3ae624dff1be21f745034c08c4ae1a7
2024-04-02 21:04:44 -04:00
William Wilgus
4a91d37613 multiboot_select plugin check volume root for valid firmware
Change-Id: I5feb4b00ae385ff8967de27682d4e4a528dc2ae5
2024-04-02 19:58:12 -04:00
Aidan MacDonald
5641e8140a tagcache: Rename find_tag() -> tc_find_tag()
The overly-generic name "find_tag()" is part of the skin parser
library and this can cause problems depending on what's included
from headers. Unfortunately.

Change-Id: I0cb02b1203daa6ff36595ed6c6f40b5b56bd3e58
2024-04-01 18:21:37 +01:00
Aidan MacDonald
9d585cbc05 Fix red in f026cc4e17
Change-Id: I9ea1e18a8658a51bf0c917bec372f7509569ede2
2024-04-01 18:21:37 +01:00
Aidan MacDonald
f026cc4e17 tagcache: Add menu entry for customizing the DB path
Allow the database path to be set from the file browser's
"Set As" context menu, so it can be changed without editing
the .cfg file by hand.

Change-Id: Ie1a84bcb2084ee3b1a0a18cc51f564238515f164
2024-04-01 17:23:06 +01:00
Aidan MacDonald
ac1f92d9e8 tagcache: Fix missing void in tagcache_rebuild() definition
Change-Id: I04629547979a71f61693d87abb298b7c1d5efce4
2024-04-01 17:06:29 +01:00
William Wilgus
2570909e52 [Feature] Add root_realpath to Rockbox Info
Change-Id: I5a6bb78495a00960d0aa0f1a3fad227e4b8e17f3
2024-04-01 08:39:55 -05:00
William Wilgus
8e9a840d1d [Fix Yellow] 1dc22c7241 use path_append for setting directories is several settings
Change-Id: I30ee97f7f47d52c178de05bcabb62b65fcd9d784
2024-04-01 08:11:05 -04:00
William Wilgus
1dc22c7241 use path_append for setting directories is several settings
sprintf, strcpy, memccpy can all just go thru path_append
with the added benefit of some path sanitizing too

Change-Id: I33510b56a364b8b3a0b06f2ff14b76491f6e3870
2024-04-01 07:35:53 -04:00
Aidan MacDonald
e631fc4723 tree: handle trailing slashes in currdir when navigating up
Make ft_exit() ignore trailing slashes. Previously if these
ended up in "currdir" then pressing the back button would just
leave you in the same directory.

Change-Id: Ic539e02a9860fa13ca3235beaf99bb474c66e151
2024-03-31 18:45:40 +01:00
Aidan MacDonald
dc9d354ed2 multiboot: Add v1 boot protocol
v1 passes the drive and partition number of the boot volume
instead of using the volume number. The volume number isn't
reliable because the same filesystem might get a different
volume number once the firmware is loaded, which will cause
the firmware to use the wrong root volume and fail to locate
the correct .rockbox directory.

Using drive and partition numbers avoids this issue because
drive numbering is fixed and determined by the target.

Change-Id: I7e68b892d9424a1f686197a6122e139b438e5f7e
2024-03-31 16:57:19 +01:00
Aidan MacDonald
6ffd42548b multiboot: Refactor boot data validation, add version numbers
Instead of verifying the CRC before every access of the boot data,
verify the CRC once at startup and set a flag to indicate the boot
data is valid.

Also add a framework to support multiple boot protocol versions.
Firmware declares the maximum supported protocol version using a
version byte in the boot data header. The bootloader chooses the
highest version supported by it and the firmware when deciding
what boot protocol to use.

Change-Id: I810194625dc0833f026d2a23b8d64ed467fa6aca
2024-03-31 16:57:19 +01:00
William Wilgus
fe00906abb pathfuncs.c add path_strip_leading_separators()
added to path_append as well

Change-Id: Ieb6ec4f4c475ca5e60c8246c7f044bcc7651f6bf
2024-03-30 11:01:53 -04:00
William Wilgus
52e22b253d [Bugfix] ft_assemble_path extra slashes, Volume unmound double free
Change-Id: Ie2e7702d8e252ce29af0b9dbd2e8d9e892b9ca18
2024-03-29 10:27:03 -04:00
William Wilgus
34361c82f1 [BugFix] Database Track>Filename returned Directory Attribute
Navigating to track listing by Filename in the database
passed the whole directory to the playlist and track info plugin
insead of the track filename

this was due to 'tag_virt_basename' not being recognized as a valid
audio file

Change-Id: I3d1cd0b6998a2e55d4f7d70711af9ced46cf2c44
2024-03-24 11:19:41 -04:00
Solomon Peachy
57f76784c5 Fix build for hosted targets.
Basically the namespace code _never_ actually linked properly on hosted
targets, but nobody noticed as there were no users, causing the symbols
to be dropped with no fuss.

The tagcache namespace awareness stuff pulled in the namespace code,
which made things go kaboom due to it relying on native FAT parsing
code.

Change-Id: Idef5f44b026c875022436809ca1f5015eece714a
2024-03-23 19:59:31 -04:00
William Wilgus
fdc3668a6a [BugFix] Multiboot Database duplicate files
When the sd card is mounted into the root namespace the database
picks up files through both paths

previously we hid the mounted drive but this causes issues with users
databases when the drive letter changes

Adds a way to keep track of volumes mounted in the root namespace

Hides the enumerated volume in root

Database:
we can just parse the root directory ('/') and get to any mounted
volume but we can also enumerate a volume in the root directory
when this occurs it leads to multiple entries since the files can
be reached through multiple paths ex, /Foo could also be /SD1/Foo
Instead we will attempt to rewrite the root with any non-hidden volumes
failing that just leave the paths alone

Change-Id: I7bdba8cfaf63902d2a3852d28484bcf8ca317ebd
2024-03-23 01:03:33 -04:00
Solomon Peachy
ae01ea7fd9 FS#13404: Updated Polish translation (Adam Rak)
Change-Id: If23726baf2dd9549f89df5344f44ff29d55d8b5b
2024-02-23 16:05:34 -05:00
Roman Artiukhin
e122243bb0 plugins: playing time: fix possible crash on sys event
Change-Id: I7b3580c56e2b285f56b9e2195fbf3c14b6cd96e5
2024-02-03 16:01:22 +02:00
JJ Style
49910eca4b Implement dart scorer plugin application.
Edit:
    - Add name to credits
    - Add entry in manual

Change-Id: I0e0b062e001ae9134db3ee6e4fba21e93ddd04ee
2024-01-23 22:32:22 -05:00
Christian Soffke
fd12225861 plugins: alarmclock: fix input lag
Change-Id: I6e2e9723aea511eef32116c92105822cc8a16271
2024-01-12 13:15:49 -05:00
Christian Soffke
de16065265 plugins: disktidy: fix loading of filetypes to clean
regression introduced in 1648441

Change-Id: I7e7c07128bf47ca862b4d45b362e7723846163a7
2024-01-07 07:01:13 +01:00
Dana Conrad
8cc7476735 ErosQ Native ES9018K2M: Add digital filters capability
Setting not yet hidden for older hardware revision.

Change-Id: Iaaa5727e63c38de578a6bbc73498ae1073180e65
2024-01-02 08:19:23 -05:00
roman.artiukhin
4cd65b9d97 Codecs: mp4: Disable SBR decoding for PP5002 - PP5022 platforms
Includes ipod video (5G) and earlier models, sansa c200 and others players not capable to decode AAC-HE.

Allows to play backward compatible files as AAC-LC.

Change-Id: Ic9f5c0f255d9a4308c3414d402f8f27f4328ca94
2023-12-31 20:44:15 -05:00
Solomon Peachy
5cf8248442 plugins: Associate markdown (*.md) files with the text viewer/editor
Change-Id: Iac48469e6e9b30574ac8a3f73f21e5f195d44d22
2023-12-22 14:36:29 -05:00
William Wilgus
9e802be969 [BugFix] run filebrowser automatically for out of tree shortcuts
missed a case for out of tree shortcuts coming from the quickscreen in the main menu

Change-Id: I25714f9deaba5f0c88e50de03ead747733b7f568
2023-12-03 20:22:56 -05:00
William Wilgus
83566008a0 [Feature] run filebrowser automatically for out of tree shortcuts
supersedes g#5499 run .link shortcuts within menu shortcuts
and just extends it to the whole plugin stack which makes
sense as long as it doesn't cause any new bugs ;)

Change-Id: If152f53cf6894430c1173a2af1410e7d0857825e
2023-12-03 15:20:19 -05:00
William Wilgus
1e3e9c68c8 [FixRed] Touchscreens in the YesNO dialog
Change-Id: I69cb03d8ffe4a8ecc06517c9a455c3b38327c6be
2023-12-03 10:31:44 -05:00
William Wilgus
9dd1b0f46d [BugFix] YesNo screen scrolling
clearing the viewport stops the scroller
so instead clear the viewport ourselves
[this might cause some glitching but should be acceptable]
in testing this causes no discernible ill effect -- time will tell..

Change-Id: Ia73a459205e37c8aebdf1cd82cd742df3d803af8
2023-12-03 10:13:19 -05:00
William Wilgus
4e53ec80b5 [Fix Yellow] root_menu.c
Change-Id: Ib13b54e3d7818746edfd0d13c37328bd90d23b22
2023-11-25 03:21:09 -05:00
William Wilgus
40e685fb71 [Feature] run .link shortcuts within menu shortcuts
Change-Id: Ifbc2b95ab367ae18fa51074a3f8ea551ad2ab6a8
2023-11-25 02:48:49 -05:00
William Wilgus
b6ce98c55c [BugFix] yesno screen disappears
sending GUI_EVENT_NEED_UI_UPDATE ensured we got redrawn but it also
sometimes resulted in the yesno screen being overdrawn
depending on which event callback was called last

now increasing the update frequency,
clear the dirty bit on whatever vp we are replacing
and well as call our redraw function instead of sending UI_UPDATE

also found a potential bug in get_font()

Change-Id: I1da6defa6db799a4778590daa0c107aba00a9d34
2023-11-24 16:17:33 -05:00
William Wilgus
cb3b5397b3 Revert "Extend path_append_ex to truncate compname, remove some strmemdupa"
This reverts commit dbe20d453d.

Reason for revert: Crashes ipod Classic

Change-Id: I9ea329ce73383535353832d17c7c5e494e5ad516
2023-11-23 21:26:13 -05:00
William Wilgus
53a47970e3 [BUGFIX] some files wouldn't run as shortcut
make sure we have a chance to get the dirfilter otherwise
it may be rejected

adds some sanity checks and safeguards too

Change-Id: Ibdad288ace0c8bf6ac7b8f46722a43aebead829e
2023-11-23 12:26:08 -05:00
William Wilgus
5c60975d4f Revert "Revert "tree.c cleanup update_dir()""
This reverts commit b6ac9a9f39.

Reason for revert: RED Herring 

Change-Id: I96ea6cf15ba00b0faa8ce58dbbdde7d64973e119
2023-11-22 18:58:51 -05:00
William Wilgus
b6ac9a9f39 Revert "tree.c cleanup update_dir()"
This reverts commit 1d2dfb3a76.

Reason for revert: crash on ipod Classic boot

Change-Id: Ie0fe569515f73bb7853796e5e7df13fde42e8642
2023-11-22 13:43:53 -05:00
William Wilgus
1d2dfb3a76 tree.c cleanup update_dir()
Change-Id: I46a78a3df5ec76a5cd3ae1d6bb236fa40ae75533
2023-11-22 11:50:15 -05:00
William Wilgus
72c539d35e [Bug_Fix] shortcut to directory in .link files caused crash
since the plugin browser is now closed when running plugins
rb->set_current_file() had no valid browser context and used 'random' memory
instead

also adds a way to discard levels so we can load the desired directory
instead of returning to the previous

https://forums.rockbox.org/index.php/topic,54694.0.html

Change-Id: I624246e56d42972bf6a1ce566a209b745de6f30b
2023-11-22 00:52:58 -05:00
William Wilgus
dbe20d453d Extend path_append_ex to truncate compname, remove some strmemdupa
remove some duplicated strings previously allocd off the stack

just removing string duplications that are easily handled with truncation
now available with path_append_ex()

this also has an advantage of less stack used in worst case scenarios

Change-Id: I3a43e33ef8a8c36599e4c6c036a0ccdd8ed0c883
2023-11-19 12:00:02 -05:00
Christian Soffke
a7d0ff2000 Playlist Viewer: Reload indices after saving currently playing playlist
First index may have changed

Change-Id: If6c2fbb42014610aeae48918168c32ca82fb9b5b
2023-11-19 01:13:49 +01:00
Christian Soffke
35f9a5b415 Skin Engine: Fix loading images with same file name
Looks like this was a regression introduced in 01cbb79.
The duplicate img uses an existing buflib handle for
the data, but still didn't have access to the dimensions
from the bitmap struct.

Test case: DancePuffDuo theme for Sansa E200. Only one
dancepuff was displayed. Thank you to goatikins for
reporting the issue.

Change-Id: I32c3ebd1f00738f7db52e7a66f98c4ab3489ee4a
2023-11-18 10:29:47 -05:00
Christian Soffke
5114827937 Fix: Rotate indices after saving playlist w/ first_index > 0
When saving the current playlist, entries written out
to disk were rotated, but its indices were not, resulting
in first_index being out of sync between the two. Thus,
an incorrect index was used for any playlist commands,
from the moment you saved the playlist until the next
time you resumed, which didn't produce the right playlist.

Change-Id: Ie4b02ce9e07e565b1b15c938cc4b820db08e8f1f
2023-11-15 23:49:53 +01:00
Christian Soffke
bd93f9f96f Increase playlist control file's version number
This should have probably been included in e9b4275,
since a control file generated with that build will
potentially cause issues when used with older versions,
in case -8 appears as an insert position.

Change-Id: I4a7097a2bd33c0dbbdad481a341b49be505f34f7
2023-11-12 02:49:20 +01:00
Christian Soffke
a82b30735d Fix queued track when resuming after PLAYLIST_COMMAND_CLEAR
PLAYLIST_COMMAND_CLEAR needs to save the index of the
currently playing track, or a track with index 0 will
be left queued after resuming from control commands

Change-Id: If7449bff92acd556b03c46e82301e8fec5c997d7
2023-11-11 00:36:14 +01:00
Christian Soffke
ba14aecd5e Fix INSERT_LAST_SHUFFLED when playlist's first_index > 0
Tracks were inserted into the middle of the playlist

Change-Id: I2a665fd3e0fe9d8900d6555e6affc5cb3d7513f8
2023-11-11 00:36:14 +01:00