Commit graph

16667 commits

Author SHA1 Message Date
Aidan MacDonald
aafe2dd2d1 tagcache: don't allow temp commit buffer to be moved
The temporary buffer used during database commit did not
have any buflib callbacks set, which allows it to be moved
by buflib at any time. The code is not prepared to deal
with this, so things break horribly if anything tries to
allocate during the commit.

The solution is to pass dummy callbacks to prevent the
buffer from being moved. I expect this may create other
issues since the commit uses up all available RAM, but
at least things won't get silently corrupted anymore.

Change-Id: I3183aaee58c94bfbaf4e24424030b8be6e341d22
2022-01-18 19:45:55 +00:00
Aidan MacDonald
525eb15864 recording: fix mono mode mixdown functions
Rewrite copy_buffer_mono_* functions for correctness.

Bad pointer arithmetic in copy_buffer_mono_l produced
wrong results, or panics on archs which can't handle
the unaligned pointer.

None of the functions handled zero size copies properly
though this probably wasn't an issue in practice.

Change-Id: I81c894e1b8a3440cb409092bec07fe3778a78959
2022-01-17 00:37:12 +00:00
Aidan MacDonald
f68c6c14d9 recscreen: clean up menu building code
Remove the use of constants and ifdefs in favor of a
single enum and build the menu with a counter. This
simplifies the source and optimizes to the same code.

Change-Id: Ib07f0634ac8f663452c3e6e3c3d92fb6da1a1b4c
2022-01-17 00:37:12 +00:00
Aidan MacDonald
acc7d16e3b Fix some hardcoded assumptions in recording.c
There were some hardcoded branches handling left/right gain for line-in
or FM radio inputs. If the target only has a microphone, these bits are
useless and cause compile errors due to missing audiohw settings, etc.
This patch #ifdef's them out.

Change-Id: If6a6918b2fabb256261c84651803bbf44deacb1a
2022-01-17 00:37:12 +00:00
Aidan MacDonald
dac3175445 audiohw: avoid magic numbers for DAC power mode
Define proper symbolic constants for power mode. Also allow
targets to define the default power mode setting.

Change-Id: Ia07cf854dce47d0a6aa88e067471f1ff9fbc45fb
2022-01-16 19:35:40 -05:00
Aidan MacDonald
0fbaeed250 Remove ACTION_SETTINGS_RESET
This action has never been used since its introduction
in 2006. There's no real need for it, as it's possible
to reset settings from the context menu.

Change-Id: I6b357ad1a2e19a9b631ee3055e158492570479e3
2022-01-16 23:58:30 +00:00
Christian Soffke
8f063d49c2 ImageViewer: Fix FS#13329 (GIF File handle/memory leaks)
Change-Id: Ib3ef22716c8ba35c7bb78231ca4f5c7155f16018
2022-01-09 14:36:14 +00:00
Christian Soffke
f379e1dbb3 ImageViewer: Fix GIF Decoder progress bar
Change-Id: I9db9b27f9e12f08323534038bc6f0882329a2c00
2022-01-09 14:36:14 +00:00
Christian Soffke
18358ed541 ImageViewer: Fix gifs sporadically crashing on targets
ensure 32bit alignment

Change-Id: I11e0df599403a888fa63dab8f1c5a94a5f35d9ad
2022-01-09 14:36:14 +00:00
Christian Soffke
fbdcfca085 ImageViewer: Improve smoothness of animated gif playback
Don't disable grayscale overlay, don't show "resize" messages
between frames and  and don't clear display unless actually
necessary

Change-Id: I9f501d8280ce0c8f26f4345088d805d1b84cf143
2022-01-09 14:36:14 +00:00
Christian Soffke
3adeae2026 ImageViewer: Fix crash when zooming on grayscale devices
lcd_update was called while the grayscale overlay was running

regression, apparently introduced by 0ceaff2

(only reproducible on target, not in Simulator)

Change-Id: Ife0ef359e19a03a6dc033070a11ae5843ee555e6
2022-01-09 09:11:29 -05:00
Dana Conrad
f1ddd6f014 ErosQ Native: Fix Color Chooser keymap context
Was defaulting to standard, where we don't have increment or
decrement defined.

Change-Id: Ib897cb0cfada23ff390f79b6dfa8336c67f951bc
2022-01-08 17:06:49 -06:00
Christian Soffke
131497d786 PictureFlow: Don't sync playlist after every file
Since we manually do it later, syncing after every
file is unnecessary and can make the audio
queue overflow

Change-Id: Ia7ab6ee345b25a453c56f48ed0d330b04da6da94
2022-01-05 18:28:06 +01:00
William Wilgus
ea738e03d0 Printcell.c fix list item scrolling behavior
make every item in a selection scroll when no columns are selected
otherwise title & currently selected column will be the only scrolling lines

Change-Id: I3bab480f47997b89a01563a69dc68e6633152cf5
2022-01-05 10:43:55 -05:00
Christian Soffke
122ce0089a PictureFlow: Don't insert tracks if track list not available
Change-Id: Ic6d5083bfe7daf3a8639b1405b8be9dae73eb30c
2022-01-04 18:06:42 -05:00
Christian Soffke
de8ee6c9e9 PictureFlow: Switch between albums from track view
Prev/next buttons on iPods or Fiio M3k can now
be used to select another album without having to
return to the albums view first. Scroll wheel/strip
handles scrolling up and down in the track list
as before.

Other targets probably have the necessary
buttons for this, so the keymap can be extended
in the future (same goes for alphabetic browsing)

Also prevents queue overflow and handles
failure case for track list tagcache retrieval.

Change-Id: Ic8ff4471e1583d1ab1f7d16911b15705a7f60aca
2022-01-04 18:04:53 -05:00
Christian Soffke
d183959676 PictureFlow: Show track list loading message
When tagcache or storage are busy, it can
take a few seconds for the list to appear.
Meanwhile,  the screen used to be either blank
or the cover was  left suspended in mid-animation,
if the animation was skipped.

Change-Id: I655320c4f92ff496834e252cc77ece47723a8677
2022-01-04 18:04:02 -05:00
Christian Soffke
dded97be34 PictureFlow: Fix buffer overflow
create_track_index appears to have relied on
buflib_buffer_out returning a certain amount
of space without checking that it was actually
available. In at least one test case, as little as
16 bytes were returned, leading to a buffer
overflow and later a segfault.

Change-Id: Ic0783f3cd5bf015803b7ce90537ba38ab3434bea
2022-01-04 18:02:12 -05:00
Christian Soffke
e3b8b7fa80 PictureFlow: Utilize "Current Playlist" menu (+ GS fixes)
When appending tracks, they were always inserted last.
You can now choose from the usual options offered by
the "Current Playlst" context menu to queue or to insert
tracks at the requested position.
The splash after appending that forced you to wait for
2s has been eliminated.

Also fixes crashes on targets that use the grey_core lib
if a splash showed up when playback was started,
e.g. LANG_PLAYLIST_CONTROL_ACCESS_ERROR, or
when PictureFlow quit.

Change-Id: I661c59057b5315ba793ee1674f7a2ea1ffd7968d
2022-01-04 18:00:49 -05:00
William Wilgus
bfe3dac3ba printcell_helper.c bugfix scrollbar spacing
when the scrollbar was on left and number of items was < nb_lines
the spacing between title and items was off by sb_width

selected item no longer draws separators when no colums are selected

Change-Id: If564261759721eb7bcf3b7b4ba58bf9c130771b0
2022-01-04 16:51:24 -05:00
William Wilgus
a7703e4926 gui lists add callback for owner drawn items
allow the guts of gui_sync_list to be used with owner drawn items

WIP

printcell_helper--

goal: allow data to be displayed in a spreadsheet format  with an easy to use interface

printcell_set_columns(gui_synclist, title, icon)
 sets title and calculates cell widths
 each column is identified by '$' character
 ex 3 columns title = "Col1$Col2$Col3"
also accepts $*WIDTH$
 ex 3 columns varying width title = "$*64$Col1$*128$Col2$Col3
printcell_enable(gui_synclist, enable)
 sets the printcell function enabled

After setting the columns and enabling the printcell function
 items can be added to the list like normal
 column items are supplied delimited by '$'
 ex item = "Item1$item2$item3"
 they will be placed in cells defined by set_columns and scroll if the cell is too small

--Fixed for 1 bit & 2 bit displays

Change-Id: I49bd7903005d7a54e93af4379b0cdea63c860656
2022-01-01 23:56:51 -05:00
Christian Soffke
edc68b0657 Solitaire: Fix Quit option with no saved games
Selecting "Quit" would start the game
instead of quitting if no games had
previously been saved.

Change-Id: I4874288cc1087697dfb593a371e25da473870c8e
2022-01-01 22:01:30 -05:00
Christian Soffke
abfee36ce0 PictureFlow: enable theme in settings menus
Submenus for adjusting settings
were previously left unthemed

Change-Id: I073c7aabfdd9ce4e4c10c4c0dc689112c29b2a58
2022-01-01 22:00:09 -05:00
Christian Soffke
7dffbd84af Playlist Viewer: Add Track Info
Adds a command for showing track info to
the Playlist Viewer's context menu, which
brings up the same screen used by the WPS
for currently playing tracks.

Change-Id: I17d99671935934dad565d290a0d6fb3b0dfd8b01
2021-12-28 11:15:57 -05:00
Christian Soffke
e8b9123205 Database: show song's album in PictureFlow
Adds a 'PictureFlow' command to database context
menus for quickly bringing up the album for a
song in PictureFlow.

Change-Id: I88cd89e93d9418558c698a15fc7fb5d9a90fb262
2021-12-28 11:06:10 -05:00
Christian Soffke
7d59bbd170 Database: Fix selection being reset
Consistent with (preferable) behavior of file browser
after selecting an item for playback

Change-Id: I45a72f6d743fd70c301f9d5de0f8a2a02157b2c6
2021-12-28 10:57:13 -05:00
Christian Soffke
6c6f0757d7 PictureFlow: Show background cache building progress
There was no easy way to see how far along PictureFlow
was in building the art cache, once background scanning
had commenced.

PF now uses the  screen area normally used by the FPS
meter to show completed percentage until building the
art cache has  finished.

Change-Id: I60fa7187b522cda219e35f5a9f630835ecac6883
2021-12-24 11:08:26 -05:00
Aidan MacDonald
f4fbc1bceb tagtree: Support user override config file
Allow users to create an alternative tagnavi config file named
"tagnavi_user.config" in the .rockbox directory. If present, it
will be used instead of the default tagnavi.config, allowing the
default menu to be completely redefined.

This makes it much easier to maintain customizations which remove
or modify parts of the default config -- since the default config
is shipped in the Rockbox zips, a customized tagnavi.config would
have to be saved with manual intervention on each & every update.

Change-Id: I509177fab0e01fc0db0bc4407a3a92bbff5fa481
2021-12-24 10:41:27 -05:00
Christian Soffke
6b5c811d1c PictureFlow: reset idle timer when art cache is being built
- creating the album index and art cache can take longer
than what the idle poweroff timer is set to, so make sure
to reset it periodically

- when finished, make sure progress is stored
to disk immediately, so it isn't lost on idle poweroff

Change-Id: Ibe88a260e4495b1bd007f37950e8c5fbc9364975
2021-12-24 10:38:37 -05:00
Christian Soffke
d04804b6ff Root menu: prevent infinite loop trying to exit plugin
Rockbox could enter into an infinite loop when last_screen
and next_screen were both GO_TO_PREVIOUS, which
happened when trying to quit PictureFlow in the following
scenario:

1) start playback from PictureFlow plugin
2) return (or be returned) to WPS directly
3) wait for playback to finish and to be returned to PF
plugin

Change-Id: I0b52d4df56d416f81cef027d9024e964a734fcdc
2021-12-24 10:38:18 -05:00
Christian Soffke
747c8d5ea4 Remove dead code/documentation/comments
Change-Id: I4928d5967ad8a1f15b8725853102b74420252cc6
2021-12-24 10:37:28 -05:00
Aidan MacDonald
22d0c4da70 Revert "powermgmt: Remove an unnecessary function"
This reverts commit 6ff1a935b9.

Reason: it created a mismatch between the displayed voltage
and percent since the voltage was unfiltered but percentage
was based off the filtered voltage.

Change-Id: I4cba099f2e1edf0ef7c4e17a32f566aa66f5b933
2021-12-23 11:40:22 +00:00
Aidan MacDonald
fc678bd001 battery_bench: Log battery current information
Works on targets supporting CURRENT_MEASURE.

Change-Id: I021b995c46fab923287ad54e72863695ef9ed58a
2021-12-23 11:39:58 +00:00
Aidan MacDonald
9ae983068a Display battery current in debug menu
Change-Id: I07a458c34da931125d986d20df27df38e47c8854
2021-12-23 11:39:58 +00:00
Solomon Peachy
d6faef8205 FS#13330: Updated Dutch translation (Issa Beganović)
Change-Id: I5d029551154a0485d1866ee4f1c44d9662275981
2021-12-18 17:28:48 -05:00
Solomon Peachy
bdef4fc80d FS#13228: More Turkish translation updates (Selami Dinçer)
This one is focused on corrections to existing strings

Change-Id: Icf74b30429f8bfadafa8b14545e82b1b13a8bf8f
2021-12-17 19:37:49 -05:00
Solomon Peachy
ded161e81a FS#13327: Further Turkish translation updates (Selami Dinçer)
(Continuing to fix strings that were the same as English)

Change-Id: Id6a1d607019747e61740f8ef87ac5b69cfe7d4d5
2021-12-17 08:00:26 -05:00
Solomon Peachy
0300f62bf1 FS#13326: Further Turkish translation updates (Selami Dinçer)
Change-Id: I92e3477c83f48c5bab0ee96528e902bc45c8fb08
2021-12-16 11:46:30 -05:00
Solomon Peachy
f496e1fb97 FS#13325: Further Turkish translation updates (Selami Dinçer)
Making a big dent in the "same as English" list

Change-Id: Ieeb1dc4245233012ea5a8b63599a474bad0517de
2021-12-15 22:29:50 -05:00
Solomon Peachy
b53d2bc432 languages: Fix RTL language file generation
The 'rtl' flags for Arabic and Hebrew was inadvertantly deleted
in 7ff3c94e1 (over a year ago, in November 2020!) but it's actually been
broken since the introduction of 'updatelang', in 2305966d (July 2020)

The fix here is to change the 'RTL' flag from an <options> section in
the language file to a comment in the header.  It's not as pure in a
design sense but it makes for a much cleaner implementation.

I may further revamp this by making the 'RTL' flag into an explicit
LANG_xxx string

Change-Id: I48f394adfadc0aa804fd67690c87cc28f04fccdc
2021-12-15 19:19:44 -05:00
Solomon Peachy
651853f5df FS#13324: Updated Turkish translation (Selami Dinçer)
Change-Id: I970e29318e74317e699d52a88c4d4d25067bb028
2021-12-15 11:38:13 -05:00
Solomon Peachy
f996f4ed70 FS13323: Updated Italian translation (Alessio Lenzi)
Change-Id: I3ebadcf4691483d9bd002161cc01d0bfcc3926d0
2021-12-13 21:45:32 -05:00
Aidan MacDonald
75d615e818 Fix yellow from 69d08be0
Change-Id: Id1ee471454f1d23df3322ed78ba3feb2fe443d74
2021-12-11 17:11:11 +00:00
Christian Soffke
69d08be083 Additional Single Mode options
In addition to the existing behavior of pausing
after each song, this adds options to pause
after playing current:

Album,
Album Artist,
Artist,
Composer,
Grouping / Work, or
Genre.

Allows you, for example, to only listen to the
remaining movements of a classical work
without having to purge your playlist of any
upcoming songs.

Change-Id: If18f4a5d139320026cc5fcc9adf29dd8e4e028a8
2021-12-11 11:43:39 -05:00
Solomon Peachy
68ed534f83 Automated translation fixups for a couple of strings
Change-Id: Ia61512044d5c9da3b7f161097402b525719a7bb5
2021-12-11 09:48:01 -05:00
Solomon Peachy
21866949dc Update english-us "translation"
Change-Id: Icac11ade75768312db7ed4119aadda0c0dd751d7
2021-12-11 08:37:15 -05:00
Solomon Peachy
06f98fa2e7 FS#13322: Updated Polish Translation (Adam Rak)
Change-Id: I08ea5cc3c47c80e573c54c226f55c21d7fcf54dc
2021-12-11 08:35:59 -05:00
Solomon Peachy
e05db7304e Update Chinese translations
Lifted from the Rockbox-RCC github repo, plus several cleanups by myself.

Change-Id: I1f9fb7995812acd376f8783aa12a4e6717ff5c33
2021-12-11 08:14:24 -05:00
Solomon Peachy
fde78a0c8d lang: Use consistent capitalization for button names
Change-Id: I02aecb17a214f3da179177f70986bb6961670c3d
2021-12-11 08:14:23 -05:00
Aidan MacDonald
dcac2c616f Add setting for numeric list sort order
The sort order of numeric lists can now be changed with the
new "List Order" setting. It defaults to ascending for most
scrollwheel targets and descending for all others, matching
the old hardcoded behavior.

Change-Id: I4866f04ec5995158edf9e40badf7f661b3ddea81
2021-12-11 01:13:22 +00:00