1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17760 commits

Author SHA1 Message Date
Christian Soffke
ca459a9d09 misc: Eliminate redundant yes/no dialog functions
Change-Id: I28bc4531cdfe6e28a1677b1a0ebb461e48188fd8
2025-01-15 14:10:17 -05:00
Christian Soffke
ad4113a7e9 plugins: image viewer: respect album art setting
Displaying large embedded album art in the
image viewer requires playback to be stopped,
which is pretty disruptive, so respecting the
system setting here may make sense

Change-Id: I479466bf26d85c3305d6c81e2c1818b2c2b2cbdb
2025-01-15 14:09:26 -05:00
Christian Soffke
b83504635c playlist: eliminate error message disconnecting USB
With no control file present, the message
"Error accessing playlist control file"
was displayed, due to playlist_resume being
called from gui_usb_screen_run.

You were likely to only run into this after a clean
install, if you hadn't listened to any music yet.

It probably makes sense to move the check for the
existence of the control file into playlist_resume,
and not even have it show a separate access error
message when the file doesn't exist.

Change-Id: Ib3a643c43d3d4d499fa5a13c01955779d69cd357
2025-01-15 14:00:10 -05:00
Christian Soffke
2c4c1b9199 FS#12702: Fix illegal characters in suggested playlist filename
Issue had only been partially fixed in
3f3b738 by showing an error message

Change-Id: I91665ac826e0025fb80eadac31abffa03667cf62
2025-01-15 13:32:46 -05:00
Christian Soffke
24c9ccfac0 playlist: Set playlist index after resuming
fixes current track selection
in Playlist Viewer when stopped

Change-Id: I3d1fa28a4bf2d631918e159a3fd8025c17979833
2025-01-15 13:28:35 -05:00
Christian Soffke
fb26398622 playlist: Fix warning when erasing playlist after reboot
Unless you had manually resumed the playlist, you
didn't get any warning after Rockbox rebooted, when
replacing a modified current playlist.

Change-Id: Ibc83e3db4e6ee51e94204ac7732760894d2fb602
2025-01-15 13:10:07 -05:00
William Wilgus
9310b51841 [Bugfix] OpenPlugin on multivolume targets
to check for against /.rockbox/viewers (VIEWERS_DIR) on multivolume you
need to strip all the prefix junk of volume and potentially strip the
redirect directory

Change-Id: I8e24c43d84c3b90ffb4bbf62d4287620a5890ade
2025-01-15 12:27:39 -05:00
William Wilgus
a5663ab3c0 [Feature] Add parameters when viewer is selected for open plugin
ask th user if they want to add a parameter when a viewer is set to an
open plugin entry (wps hotkey, start screen, etc)

Change-Id: I403ac79af15162aeecabb3607923113e27496e4f
2025-01-15 11:43:47 -05:00
William Wilgus
1a17b5cb8e tree.c small cleanup
Change-Id: Ifd254f195f92833398b3f752a55d258cf7718183
2025-01-15 00:00:41 -05:00
Solomon Peachy
68f511984e FS#13545: Update Korean translation (Hoseok Seo)
(Accidently left this off the translation roundup commit)

Change-Id: I7050de57fc71afb5d5ef9d0f1a7ac7643098f595
2025-01-14 08:44:33 -05:00
Solomon Peachy
14e35fd164 Translation updates:
* FS#13543 - Polish (Adam Rak)
 * FS#13545 - Korean (Hoseok Seo)
 * FS#13544 - Turkish (Mustafa YILDIZ)

Plus resync the US English localization (myself)

Change-Id: Id98cbe4d6d2858183044b5cbbf48080c90ae9b05
2025-01-14 08:33:52 -05:00
William Wilgus
d8d6415505 [BugFix] do_menu skinlist_draw dangling reference
skinlist_draw stores a pointer to the list supplied
if this pointer goes out of scope we may try to access it

toggle_theme has a path to handle this but if you move to a a item with the
theme enabled it doesn't release the pointer
later the pointer will be referenced long after it has gone out of scope

limiting this to do_menu() if other areas are problematic the previous
version of this patch applies it system-wide

Change-Id: I57c73d789856cb1a660fb704f02ca55c8978a4d0
2025-01-13 22:41:24 -05:00
William Wilgus
7a281eca83 [BugFix] Tree doesn't stop scrolling on exit
https://forums.rockbox.org/index.php/topic,53862.msg248780.html#msg248780

add an intermediary function to stop tree_list scroll when changing screens

Change-Id: I7376ea28fb1e1bbc09fce83209e0147711af92b4
2025-01-13 19:39:04 -05:00
William Wilgus
0493ee19c3 lastfm_scrobbler speed up track culling, better duplicate logic
rather than going through the whole file each time we can just walk
through the remainder speeds up duplicate removal by quite a bit

check timestamp of tracks to not remove multiple plays of the same song
at different times, unless back to back (then its probably a resume after
shutdown)

devices without RTC use current_tick but thats in centiseconds
convert to milliseconds so we can use the timestamp in the above calculations

my fix to the scrobbler_viewer makes the include menus disappear as
soon as you hide columns so explicitly mark if we are
dealing with a scrobbler log at load

Change-Id: I11bbebe9af45945a7e1326a5e419290086b05aaa
2025-01-13 18:08:40 -05:00
William Wilgus
ab9b687607 [BugFix] lastfm_scrobbler_viewer block search for non scrobbler logs
the scrobbler viewer will view any .log file but search and include
column only works with defined headers

it ends up showing a blank result so block this menu for non scrobbler logs

Change-Id: Ifc04dcab52d4416271388bee7d0cb10a144636a4
2025-01-13 02:36:20 -05:00
William Wilgus
c8ba67fa7d [Bugfix] plugins printcell_helper crash on NULL pointer
printcell_set_columns() can take a NULL pointer for the *pcs
it then uses default settings but those were contained within
the scope of the if(NULL) check.

Change-Id: I3147d1f4e3954fdcdb3adb74713f4c8a9a2c08ec
2025-01-13 00:45:09 -05:00
William Wilgus
c3fd32bdf2 [Feature] playback logging from core
people don't like having to remember to run the TSR plugin so
lets meet them halfway

all tracks are added with timestamp, elapsed, length, trackname

added buffering for ATA devices

still needed:
-Done -- a plugin that parses for duplicates and reads the track info
to create the actual scrobbler log
(log can be truncated once dumped)
this should allow you to run the plugin at leisure

later I'd like to expand this logging to allow
track culling based on skipped songs..

remove the TSR plugin as hard disk no longer need to use it

Change-Id: Ib0b74b4c868fecb3e4941a8f4b9de7bd8728fe3e
2025-01-13 00:45:09 -05:00
Christian Soffke
e5c9846cb4 Playlist Catalogue: fix: "Save Current Playlist" may fail silently
- After rebooting, unless the current playlist
had been manually resumed already, the "Save
Current Playlist" option in the root menu's/
playlist catalogue's context menu failed to work.

- Eliminate error message attempting to view current
playlist when no control file present.

Change-Id: I58f1d3dc6f256fcee106ff5a17f69fa46d67b2e4
2025-01-09 06:10:46 +01:00
Christian Soffke
897a96996b Playlist Viewer: fix: deleting track starts playback
When playback was stopped (not paused), deleting
the first track of the current playlist started
playback.

Change-Id: I0bd09e1254399d003109215e4e8363a0cd045ac0
2025-01-08 23:23:33 -05:00
Solomon Peachy
8b01f939d8 hitiet ma8/ma9: add in keymaps for all plugins
Largely guesswork.

Change-Id: I8ab8d36de4bbdcf25dcf7d3442266bfb0a370b6f
2025-01-07 14:22:53 -05:00
William Wilgus
0b5f1b68e6 [Bugfix] Copy current lcd contents into empty background buffers
the manual states the following:
%V(0,0,-,-,-) %VB
Use %x(filename, 0, 0) to draw a backdrop image (If you want one!)
Then add %V(0,0,-,-,-)

if you forget then it causes display corruption
due to the uninitialized background buffer

instead make a copy of the current screen into the blank backdrop
so we won't be showing garbled data on the screen

Change-Id: I3f0df131d36537e91688e104c9445a604f657362
2025-01-06 02:26:11 -05:00
William Wilgus
907c91997e [FS#10686] Peakmeter on ipod 5g using too much CPU
I think this is probably a good idea in general

Change-Id: I124e8743a847aa12013ef3b93c8b318e42714b34
2025-01-05 16:57:18 -05:00
Christian Soffke
018ccf4e47 Playlist Viewer: Fix dir not updated after playlist removal
Missed this in 6a865f2430

If you entered the Playlist Viewer using the
context menu option "View", instead of from
the Playlist Catalogue, a playlist file that was
deleted due to the removal of all of its tracks
would still be displayed in the directory when
returning

Change-Id: I54ca34f70344e289d9e2cb413ee2a38e5bd7a92b
2025-01-05 21:41:18 +01:00
Christian Soffke
00066a4927 Playlist Viewer: slight simplification
1) Don't re-initialize the Playlist Viewer before
closing it, after making an on-disk playlist the
current playlist. It's obviously wasteful and this
seems to have only historical reasons that don't
apply anymore.

2) Naming adjustments:
- change "onplay" prefix to "context" (e.g.
pv_context_result context_menu, instead of
pv_onplay_result onplay_menu), since onplay requires
being aware of the history for it to make any sense
- rename update_lists to update_gui, to differentiate
it from update_playlist
- change update_viewer_with_changes to update_viewer

3) gui_synclist_del_item(playlist_lists) is not
needed anymore after removing a track, because we
already  indiscriminately reset the synclist's
number of items and reselect within the list's
new bounds from update_viewer_with_changes.

As a result, MODIFIED is applicable to both
reshuffling and to removing a track, so
ITEM_REMOVED can be eliminated as its own
enum value.

Plus, SAVED does not require a special case and
can be renamed to PL_UPDATE, so it is usable
when track display is adjusted, in order to
force an update of the playlist buffer.

Change-Id: Ic5202e03223a1ddbb9ff87e388a16ecde39165ef
2025-01-05 14:39:24 -05:00
Christian Soffke
6a865f2430 Playlist Viewer: Delete playlist when emptied
When you removed all tracks from an on-disk playlist,
you were asked whether you wanted to save it, which
would fail, but did not show any accompanying message.

Instead of trying to save the playlist, after getting
the confirmation, delete the playlist file from disk.

Change-Id: Iad54f2f490b15dd9c8a8fdfb8f12e58fd17d5e36
2025-01-05 14:39:24 -05:00
Christian Soffke
0012411fc5 playlist: Simplify playlist_load
Reset fd for the on-disk playlist at the place where
ownership is transferred in playlist_set_current (which
already has a note, that the playlist will be effectively
closed, but did not reset the fd).

Also ensure, that calling playlist_load closes the fd for
the on-disk playlist (and its control file), if any were
left open - even though this is not supposed to happen.

Generate name of control file in playlist_init to be more
consistent with the behavior for the current playlist.
Only a single playlist can be loaded in the playlist viewer
at the same time, so generating random names shouldn't be
needed.

Change-Id: I65e0fc07ce608c1d333a90447e18482787a98b8c
2025-01-05 14:39:24 -05:00
William Wilgus
22d921c55c [Bugfix] Plugins run by START_IN_SCREEN won't open another plugin
PLUGIN_GOTO_PLUGIN was using old key instead

Change-Id: If354bd441db7c0b0a476624c8c1dcb3d79f5d366
2025-01-04 15:18:35 -05:00
Christian Soffke
384c35418a FS#13537: format_sound_value alignment issue in themes
Positive values included a leading space, which
meant they weren't displayed center-aligned in
themes anymore.

Change-Id: Ibe75e9b81a2989c87630dd3ea78e4b90c6c74502
2025-01-03 13:45:14 -05:00
Solomon Peachy
af7ed73f31 FS#13539: Resync mikmod plugin with upstream
Brings it up to libmikmod 3.3.12, relased 2024-12-31

Also fix a segfault that only happened on simulators when using
non-default samplerates.

Change-Id: I2ade2d72a00edab5395328fe76a88a88516aac72
2025-01-03 11:34:24 -05:00
Christian Soffke
08c32cee7c Playlist Viewer: fix: Don't invalidate resume info unless current playlist
It makes no sense to prevent the current playlist
from resuming when some other playlist becomes empty.

Change-Id: Ibfb7a15b0826ed3baeefbc5060b13d73894b81e6
2025-01-03 01:03:28 -05:00
William Wilgus
888f4dbe57 [Fix Yellow] skin_backdrops.c screen is unsigned
Change-Id: Ib9a669f547c86d610b22ca85e761920dd5875243
2025-01-02 11:38:46 -05:00
William Wilgus
e65543cdc2 skin_backdrops cleanup
no functional changes.

remove some checks for screen when SCREEN_REMOTE
is not present

pack the skin_backdrop struct and use the space to remove
the static bool first_go variable

Change-Id: I17a96749d4995dd8124f3be4dd95bba58ee54b6d
2025-01-02 11:22:32 -05:00
Franklin Wei
07036061fc puzzles: update README.
Change-Id: I4e3306bdaa391f7aa698c67f00285975e398ee02
2025-01-01 19:13:04 -05:00
Franklin Wei
334c725a45 puzzles: clean up resync.sh script.
This script has grown into a bit of a maintenance nightmare over the years.
I've cleaned up and better documented some of the nastier bits.

Change-Id: I2bb95a89b1edc9a294d9e1112f5be1b877567356
2025-01-01 19:12:49 -05:00
William Wilgus
44e36aba94 skin_render small cleanup
should be no functional changes
looking at the blame for this file shows the buffer was made
static originally due to stack overflow.

Removing static buffer in favor of using the skin buffer
directly shouldn't cause a regression.

Change-Id: I941ed675c5ba8799bea678af61c196eb453a4788
2024-12-31 20:17:56 -05:00
Christian Soffke
fe78b07db6 Playlist Viewer: Address problematic index buffer sharing
Borrowing the index buffer of the current playlist
can be problematic, since it is possible to start
playback of a different playlist from the playlist
viewer without leaving the viewer, thereby causing
a collision.

As long as we have a sufficiently large plugin
buffer, take advantage of it, regardless of
playback state.

When playback is stopped, always resume the playlist
from the control file before loading it, even if the
playlist has finished playing, to prevent running
into invalid indices.

Note:
dcfrefs_handle is initialized to 0 automatically for
the static on_disk_playlist struct.

Change-Id: I2a05a6a51a088ea9ba73858c353525db9e61c36e
2024-12-31 10:08:31 -05:00
Christian Soffke
3389a08d56 dynamic playlist erase warning: skip for finished playlists
Change-Id: I9d209a011024e658ffc4da0a723ae8f9ec407702
2024-12-31 14:59:18 +01:00
Solomon Peachy
a8540390c2 FS#13536: Updated German Translation (Karl Huber)
Change-Id: Ib2a6e03496f9a1a50e853ef4d2edc830af99310b
2024-12-31 07:15:43 -05:00
William Wilgus
727d2ab749 wps skin_parser free up skin ram with int16_t
change ints to int16_t especially image and rect sizes

ditto font_ids

frees ~250 bytes in cabbie

Change-Id: I271be05a26e2090f6e1b11d809afd1c4bee32803
2024-12-31 01:53:20 -05:00
William Wilgus
ea5ca58dc6 optimize language.c lang_english_to_id()
speed up comparisons by getting length of the supplied english string
and filter based on length finally use our length to do memcmp since
we know where the null is already

Change-Id: I595f03ae4b08ee0d59bb9adacbe3b69f08991a9e
2024-12-30 23:17:57 -05:00
Christian Soffke
bfef0a2d6c PictureFlow: fix colors for keyboard and full screen tags
Change-Id: I2dfaf1ff982c6b1c7b7387d673818de7428f85a5
2024-12-27 19:15:09 +01:00
William Wilgus
0c4b78c011 [Bugfix] RTC_TOKEN_PRESENT is less than SKIN_TOKENS_RTC_BEGIN
this blocks the check for RTC_TOKEN_PRESENT

thanks, chris_s

Change-Id: I53a7d83d7cd8e5e9b9d6ea6eed016dc35571bcd3
2024-12-26 08:56:14 -05:00
William Wilgus
0a88b818e9 lua make memcheck script eat all available ram (incld audiobuf)
Change-Id: Ia202c9097324985a3a9a9c96be8422c38e79cb3e
2024-12-26 01:49:01 -05:00
William Wilgus
962e1b2e69 [Bugfix, ASAN] test_mem plugin fix OOB read in read_test()
asan correctly identified an out of bound read in the test_mem plugin
This shouldn't cause any issue in normal use since the data isn't used

Change-Id: I52acabc4649397f9dd2ba7979f9210529ced2071
2024-12-26 01:49:01 -05:00
William Wilgus
b07d7d6af0 skin_token.c, playback.c, add get_temp_mp3entry()
add function get_temp_mp3entry() to return a valid mp3entry from scratch_mem
UNBUFFERED_ID3
or if playback hasn't been started used statically allocated mp3entry
NEXTTRACK_ID3

Change-Id: I3909fb585e0f5ad590f917ce827e991440f1fe75
2024-12-26 00:58:51 -05:00
William Wilgus
b44f8f3723 [FixYellow] skin_tokens.c add a preprocessor directive that actually works
Change-Id: I4345093be1d953e80f0043f6edd361517f74069b
2024-12-25 01:40:53 -05:00
William Wilgus
4fe6ce91ec skin_tokens.c use static mp3entry if over 2k
Change-Id: I5c1130673d2caf1198aa65c2b84bc7102f768c3d
2024-12-25 01:27:52 -05:00
William Wilgus
6bec4597bf get_mp3entry_from_offset remove static from struct mp3entry
I think with the recent refactoring we should be able to put mp3entry
on the stack

it should be moved up a level anyway

Change-Id: Idd2af598c48545e3dbc774279b5d2b264012805e
2024-12-25 00:56:49 -05:00
William Wilgus
8981311800 skin_tokens.c break quickscreen items out to a function
rather than a function call for each qs item along with the data
for those calls in the switch for get_token_value()

it makes more sense to just have the qs_token function
handle all of the logic

Change-Id: I3b3072496611fc2c536eec33c7cdf9fb2ec67ee0
2024-12-24 12:43:26 -05:00
William Wilgus
25ab00465e metadata.c don't store encoder filename for all the decoders
there are only 4 encoder capable codecs just make it a function
and add a macro to keep it sane

Change-Id: Iac8833226434f8436bc678f3e409f462764d8fdc
2024-12-24 01:47:18 -05:00