Commit graph

16794 commits

Author SHA1 Message Date
William Wilgus
e75e07e1b6 plugin sliding puzzle fix unneeded check
Change-Id: Iab345d2ec490311fc8a5482c52dbed14f5e11070
2022-06-21 22:22:50 -04:00
Aidan MacDonald
7e0492444c usb: remove "Ask" USB Mode (FS#13317)
USB ask mode is basically a footgun: it can't work on native targets
and doesn't work reliably on hosted ones, and it continually produces
a slow trickle of problems. FS#13317 gives a rundown of the issues.
Removing the setting seems like the best solution for now, since a fix
would be pretty involved.

This partially reverts 60f581e8f5. The USB Mode setting is left in
place so the option can be added back later in a non-buggy way.

Change-Id: Ie01b28dd2ed95a31b509a7834d85bac8eb866098
2022-06-21 18:11:53 -04:00
William Wilgus
6cdd142d5c Setting reset fix red
Change-Id: I9174d7695b117fa10d10cda8ff9cccc50ebeb7f2
2022-06-20 20:16:55 -04:00
William Wilgus
ed37c2e894 FS#13193 - Add option to disable settings reset on startup
Updated version of the patch originally by user cockroach

UNTESTED
Ipods?, Iriver H10,
I do not own these players so YMMV

https://www.rockbox.org/tracker/task/13193

Change-Id: I7924837f582cc5c49ee68c186d6822f577f65147
2022-06-20 18:57:25 -04:00
Solomon Peachy
58bf7c7e6f Update english-us "translation"
Change-Id: I5b59e75d6c5ba06a3917fa7046bb769d873d6bfd
2022-06-13 09:16:34 -04:00
Solomon Peachy
7d5aeeecf1 FS13343: Updated Serbian translation (Ivan Pesic)
Change-Id: Ic4ba206b981dd03e7dcdd5a1fd3bc5f48ecc3584
2022-06-12 17:12:44 -04:00
Solomon Peachy
6a707cd913 FS13346: Updated Slovak translation (Matej Golian)
Change-Id: Icb2e7084c60fe091ea00928d84fe036b4341b762
2022-06-12 17:12:07 -04:00
Solomon Peachy
595a34640b FS13345: Updated Polish Translation (Adam Rak)
Change-Id: I9292f2dfcdbc65e9020ff2f1ef4569a371f780bc
2022-06-12 17:10:54 -04:00
William Wilgus
1d39261338 lastfm_scrobbler Add settings WIP
add settings to the scrobbler plugin
Start Playback -- resume playback at plugin start
  (while enabled if nothing to resume will bring you back to scrobbler menu)
Save Threshold 0-100% -- when this much time has passed the track will be
  saved and marked (L)istened

Verbose -- Supress messages such as 'Scrobbler Started' and 'Scrobbler Flushed'

run the plugin a second time to bring up the menu
if you have resume playback enabled and there is nothing to resume
it brings you back to the scrobbler menu as well

Change-Id: I48d96ea3dc8f37d76a723136004af149429e0b2e
2022-05-28 06:23:37 -04:00
Aidan MacDonald
7345666d9c plugins: use menu for lastfm scrobbler TSR exit callback
Use standard menus and yes/no screen for the TSR exit callback,
similar to the recently added test_usb plugin. This removes the
need to define key bindings and it provides a more consistent
user experience.

It also allows the "flush cache" message to be popped up in the
main thread - doing it from the worker thread is unreliable and
the message often disappeared because the main thread did a UI
update immediately after leaving the plugin.

One issue is that quitting the plugin by selecting the scrobbler
plugin itself immediately restarts the scrobbler. This is because
there is currently no way for TSR plugins to terminate themselves
either through the exit_tsr callback or otherwise.

Change-Id: I9690239d5bd58ad2fbb36fd15a10683757aff0ff
2022-05-28 06:23:08 -04:00
Christian Soffke
cade488b08 pictureflow: Fix 'Update Cache' function and update manual
The artwork cache was previously always rebuilt,
even if you had selected the option to update.

"Preparing artwork" should be much quicker now
after a database update.

Change-Id: Ie81486e29d596b52afd21b01ba54c73f1b402be2
2022-05-22 06:55:58 -04:00
Christian Soffke
b357585852 pictureflow: Fix slide_index bound
Parameters for fbound were in the wrong order
and slide_frame wasn't assigned the bounded value

Change-Id: I9b466e8b45e4318cadf59298f8c1145fa4d30ede
2022-05-22 06:55:58 -04:00
Christian Soffke
5146c3043f pictureflow: Fix concurrency issues building art cache
Guards against possible image corruption

Change-Id: Id7e1e3a09cb13c255eea0ffdd2e4c4d558086997
2022-05-22 06:55:58 -04:00
Aidan MacDonald
c116db6065 plugins: add USB TSR test plugin
This is intended for testing USB event delivery to TSR plugins.
Usage:

1. enter plugin -> select Start
2. plug and unplug USB
3. reenter plugin -> select Status
   it should display "State: disconnected" then "Prev: connected"
4. when done -> select Stop Plugin

Change-Id: I6c70f452db642f3fcbfbcb4f06c57f93e60f4cfd
2022-05-21 14:58:55 +01:00
Aidan MacDonald
2f71571c0a Fix faulty Play Shuffled behavior (FS#13347)
When replacing a dynamic playlist with Play Shuffled, the current
track could incorrectly be left at the end of the new playlist.
Fix this - the current track should always be at the beginning,
so it can be skipped past regardless of the repeat/shuffle mode.

Change-Id: Ia86539bc23ad8ebd714b8dc50b5720671b4ad0a9
2022-05-15 15:23:36 +01:00
Aidan MacDonald
d20071def0 apps: Add "keep current track when replacing playlist" setting
Add a setting that makes Play and Play Shuffled in the playlist
context menu leave the current song (if any) playing when they
replace the playlist. Default to on, since this was the behavior
of the old "Clear List & Play Next" option.

Change-Id: I1340aed5c28bb3244e36d0953b3308ae59681c97
2022-05-14 16:05:46 +01:00
Aidan MacDonald
70087fb9f3 apps: Change playlist context menu behavior, fix FS#13336
Rename the "Clear List & Play" options to simply Play and Play
Shuffled, and change their behavior slightly. Previously they
would leave the current song playing, but now they will start
playing the first song of the new playlist immediately.

Shuffle options are now consistently hidden whenever a single
file is selected.

Fixes FS#13336 -- Play Shuffled is now always displayed where
applicable, regardless of playback state.

Change-Id: Idd454b4f9ab2c98cda3ce0389add747a3273fb42
2022-05-14 16:05:45 +01:00
Christian Soffke
f3358eb20a Properties plugin: Eliminate redundant Track Info code
When opening an audio file from the file
browser or database using the Properties
plugin, it will now use existing code from
the Show Track Info screen for displaying
metadata. The menu option has been
renamed accordingly.

Change-Id: I5a824865b9f980151b91aff3c3c18ec45830a12c
2022-05-09 09:44:23 -04:00
Aidan MacDonald
4b293285ea pictureflow: fix album index alignment in load_album_index
Change-Id: I7c3c86ffdab62859ce88faeeb84160ea52a4626a
2022-05-07 16:28:27 +01:00
Aidan MacDonald
f661dc596e pictureflow: fix bug in calculation of album art buf size
I intended to check for enough space in buffer but this isn't
really doing it and it is making aa_bufsz slightly too big so
it's a possible buffer overflow.

Restore the old ALIGN_DOWN(..., 4) rounding in case it's important,
if not, then no harm done.

Change-Id: I904f255ac79a77d5328b44667502ceae8308e659
2022-05-07 15:52:26 +01:00
William Wilgus
2c4480979f tdspeed.c remove buffer name strings
get rid of the magic buffer size and the whole name buffer
naming the buffers individually doesn't serve any real purpose
instead add a static string for all td buffers

Change-Id: I962a966456453e1b84bab6fec6f4df7cb075ef4e
2022-05-05 00:31:07 -04:00
William Wilgus
09ef94ed8b add const to const * strings iriver Fix Red
the iriver devices overwrite the pointer

Change-Id: I20ae6db2aec0f957824b61db349c7c45a95e58d9
2022-05-03 23:58:00 -04:00
William Wilgus
79864c6ec2 add const to const * strings
I don't think this will amke any difference except maybe for hosted ports

Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
2022-05-03 23:00:58 -04:00
Aidan MacDonald
b79eefc858 apps: fix tagtree arithmetic on null pointers
It was possible for the tag tree's buflib move callback to turn a
null pointer non-null. The tagcache_search_clause->str can be null
for OR clauses. Also ensure that clauses are zeroed on allocation
to ensure garbage pointers don't creep in.

Change-Id: Ic823a8eecc501eeaa75798066521e427a9a89190
2022-05-02 16:48:19 +01:00
Aidan MacDonald
6e37b31851 apps: fix use of negative fd in open_plugin.c
Bug reported by UBSan.

Change-Id: I3223a496dfa5df4e3df97fb88a14ea0174d4b428
2022-05-02 16:42:32 +01:00
Aidan MacDonald
dadfbfc6a5 apps: fix close of negative fd in talk.c
Bug reported by UBSan.

Change-Id: I02276521510acac8696499895fec15993c55aaf6
2022-05-02 16:34:18 +01:00
Aidan MacDonald
e5e457b526 apps: fix int/long mismatch in playlist.c
A couple of places use sizeof(int) for allocations and copying but
the indices are longs, which causes bugs in the simulator on 64-bit.

Change-Id: Ie101ac57d44217c4b1657cf0152c97e276bd7043
2022-05-02 16:10:15 +01:00
Aidan MacDonald
6b8c94a6e3 Fix some non-portable alignment values
UBSan reports an avalanche of unaligned pointer bugs stemming from
hardcoded 4-byte alignments used in certain places. Use sizeof(long)
instead to align to the machine word size.

Change-Id: I28e505212462c5268afa24e95df3a103ac3e2213
2022-05-02 15:38:48 +01:00
Aidan MacDonald
366f00a3d3 plugins: fix out of bounds read in chopper
GCC complains about this when compiling with UBSan.

Change-Id: I4bd8ff2b47882ab95620dc7750a9a80f823cc2ea
2022-05-02 15:38:48 +01:00
William Wilgus
ab71b9e334 tree.c update settings when new theme selected
Change-Id: I376aba4258dd3c54c45d97317aa1e7bc8f2a3a17
2022-04-28 18:56:13 -04:00
William Wilgus
f0d3a62d91 keyboard.c change math for editline above picker
Change-Id: I59e7f7face07f3f97fc6e016ee333cd3139ad5fd
2022-04-27 21:40:49 -04:00
Aidan MacDonald
9e93796407 buffering: remove bufgettail/bufcuttail
These operations can only be used in limited circumstances and have
exactly one user. bufgettail especially seems of dubious value; how
often do you need to read N bytes from the end of a file without
changing the file position?

strip_tags() was the only function using them, to strip off ID3v1
and APE tags off the end of buffered tracks. This would save only
32-192 bytes per track -- if the container format uses APE/ID3v1.
It hardly seems worth the effort.

Change-Id: I8fc3c1408517eda6126e75e76d76daea904b50eb
2022-04-20 16:51:49 -04:00
William Wilgus
002575dbcf [BUGFIX] gui_synclist move global display settings to list struct
forgot to add the update function to the list_wraparound callback

Change-Id: I7ee7940f126726c727344d7d09371f1bf3295c81
2022-04-18 23:08:04 -04:00
Christian Soffke
1c3f6e063a fiiom3k Yes/No screen: Only accept Play button for YES
According to the on screen instructions, any other button
should mean No.

More importantly, in my experience at least, the Select
"button", since it is touch-activated, can sometimes be
pressed by accident, especially when a warning screen
is displayed as a result of pressing that same button.

Change-Id: Ieeadfa8018b5df99605297bc47948a181c22dab4
2022-04-18 22:28:13 -04:00
Christian Soffke
e71a441762 ImageViewer: Fix buffer overflow
np_file is a buffer of size MAX_PATH. After
removing only the file name component and
leaving the rest of the path, the
available space may not be sufficient
for appending another file name (possibly of
size MAX_PATH itself) to it.

This can occur after a file of acceptable
length is opened in ImageViewer, and you
then advance to another file whose path
(including the file name) is longer than
MAX_PATH.

Change-Id: Ideadd9451359bd5735bce92fca5d983e61f300e9
2022-04-18 10:58:40 -04:00
Christian Soffke
1c66e97522 Database: Remove File View menu
These options don't seem to
apply to the database...

Change-Id: I777073eeaed4099acf44996b95fa05b4c2b3abc4
2022-04-18 10:48:41 -04:00
Christian Soffke
4d7327b04d Album Art: Eliminate redundant check
When the 'Album Art' setting was set to
'Prefer Image File' and neither image file
nor embedded artwork were found,
playback would check for files twice.

Change-Id: Ibe392928d58ec04103e2572124841724509bd859
2022-04-18 09:13:31 -04:00
Aidan MacDonald
1af92e5ff8 Fix red from 6f5af8e53c
Change-Id: I02dbc3e91856eaef081446ca77919e6182a85e1d
2022-04-17 17:21:02 +01:00
Christian Soffke
6f5af8e53c Add Codec to Track Info screen
Change-Id: Ieec0e49d0b5e1ca14fa828a510edf30d548969b2
2022-04-17 11:32:13 -04:00
William Wilgus
c4156b1909 viewports, set flags to VP_DEFAULT_FLAGS
flags were getting un-initialized memory
it really didn't matter with the flags getting initialized
anyway
But once I added a new flag that didn't explicitly
set or clear the flag at init well here we are

set flags to VP_DEFAULT_FLAGS in viewport_set_defaults()

add the flags variable to the default vp's set to 0
(it was already initialized to 0 by bss, make it explicit)

Change-Id: I3a9a062455b4cf66d2b8c70fdf05402a5c0c091c
2022-04-17 10:59:56 -04:00
Christian Soffke
6703f43f5c Playlist Viewer: Always retrieve track Info from disk
Frequency, file size, and the codec are not stored
in the database and thus can’t be displayed in the
Playlist Viewer's Track Info screen when metadata
is only retrieved from the database.

Change-Id: I9e1d11c13ad8bf7b90b654ed78e4e7f763c30f8a
2022-04-17 10:58:42 -04:00
Aidan MacDonald
0e8f3669d0 Fix remaining red from 3fcdadce24
Change-Id: I619a637bdf1fb932c3618f1f40aaa1c9e7f98300
2022-04-16 16:06:13 +01:00
Aidan MacDonald
76035decc6 Fix red in 3fcdadce24
Change-Id: Idbee52505b3c109a0aad23e2edf7dd78519eb173
2022-04-16 10:41:19 -04:00
Christian Soffke
f989339664 Remove dead code
Change-Id: If31a99e6488dabab47d482637b2609ff829df1ca
2022-04-16 10:18:28 -04:00
Christian Soffke
68ac932585 PictureFlow: Disable 'Album Not Found' splash when stopped
...and go to last album, even if it hadn't
been selected for playback

Change-Id: I44013e930a1feb873f128c2885ecb8ddaf4ae3ff
2022-04-16 10:13:50 -04:00
Christian Soffke
e3bf6f08e3 PictureFlow: Delay LCD Update until center slide is loaded
Eliminates flashing of slide right after launch or
when changing sorting on the M3K using the
volume buttons

Change-Id: Icd317e0b0d5b939269dc8dafd30d0c0f9daa5fd9
2022-04-16 10:13:50 -04:00
Aidan MacDonald
3fcdadce24 plugins: Add multiboot select plugin
This plugin provides a menu for easily editing the root redirect file
on targets that support multiboot. You can select a new root from a
list of Rockbox installations detected on the filesystem or remove all
redirects to boot from the default location.

To avoid searching the whole filesystem, only subdirectories of the
volume roots are checked for valid installations. Only installations
that are compatible with the current player will be displayed.

Change-Id: I7dcbadfd97873b87817870e61d2ae37956d2da00
2022-04-16 14:36:39 +01:00
Aidan MacDonald
d55dceff37 apps: Add ability to do a clean reboot
Allow a clean shutdown to end in either power off or reboot. Add a
new event SYS_REBOOT to signal it and sys_reboot() to trigger the
event. SYS_REBOOT signals a reboot request and should be listened
for alongside SYS_POWEROFF events.

Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43
2022-04-16 14:36:39 +01:00
William Wilgus
b9ab75732a bitmap/list.c fix red
--typo

Change-Id: Iaa632e215d7d1e3758f62fedd72565fa633d925e
2022-04-10 23:59:33 -04:00
William Wilgus
ddcab156f7 gui_synclist move global display settings to list struct
its really painful needing to override global settings in order to change
some aspects of lists

this patch moves:

[scrollbar position, cursor type,
talk_menus, keyclick,
wrap around, scroll paginated]

to variables within the synclist, it also makes updating
after settings changes a necessity

I think I have the static synclists in core covered

(I think the one in gui/list-skinned can be left as is)

this patch allows easy modification these flags on the fly

Change-Id: Id0dcb8b05eb9ecd78929c0aff7678bf2ab4c70a7
2022-04-10 22:24:28 -04:00