1
0
Fork 0
forked from len0rd/rockbox
Commit graph

38236 commits

Author SHA1 Message Date
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
5d9b01b9ed [Fix Red] define lcd_awake for targets with lcd_sleep
Change-Id: I62f8f7908f2877d4b255075120f87e3c9a375f66
2025-01-05 12:12:57 -05:00
William Wilgus
734cc3e8d1 [Bugfix] call lcd_awake() unconditioanlly on shutdown for devices with HAVE_LCD_SLEEP
last patch limited this to the 6G but the ipod Video has similar reports

I have a feeling there are others and enabling this unconditionally shouldn't hurt
the other devices

Change-Id: Ie4077299550ee028c32d746e5fe6c60b707f052e
2025-01-05 10:59:46 -05:00
William Wilgus
f42343b715 [BugFix] Ipod 6G Classic Shutdown Hang
I think it comes down to lcd_target_enable_clocks(true)
which turning on backlight or lcd_awake calls

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

Change-Id: Iab2a0abc0763e63213f01bda79dca5e39aa41fc4
2025-01-05 10:15:29 -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
Dana Conrad
f2dd489120 FS#13535: AXP2101: ADC / reporting improvements
Improve ADC behavior, add correct conversion
for die temperature, add readout of EGauge to debug screen.

Add delay to give ADC time to get a good reading. Initial reading
may still be 1-3% optimistic, which is probably ok.

EGauge appears to be pretty good, but no great need to convert
to using it either.

Change-Id: Iab9d50e2427f656ad0875f9a623b03545fc69881
2025-01-01 20:49:07 -05:00
Christian Soffke
d038aa47fe panicf: Add version info
Makes it easy to figure out the build
from PANIC screens posted by someone

Change-Id: Ic0e6fbb20b3d7b8caf35aedad48136bf3e914c2e
2025-01-01 20:48:03 -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
Nick Feldmann
488306e1eb android: target java 1.7 bytecode
Java 17 on the host does no longer support targeting Java 1.6.
This causes the build to fail.
Build Tools 19.x support Java 1.7 bytecode and converts it to dex
files for Android 2.2 or later, unless one uses the
try-with-resources syntax which requires KitKat.

Change-Id: I523746427f9ba3b60bef73fe1379b272cf048a05
2025-01-01 09:59:46 -05:00
Nick Feldmann
f1b53d129f android: make installToolchains.sh work again
Google changed their site and the layout of downloaded SDK zips.
Also add a warning to configure if a r2x series NDK version is used, because those aren't supported - they no longer contain GCC, only clang.

Change-Id: I48a42c38c9b657ac6662162a39763aac73ec502a
2025-01-01 09:59:34 -05:00
William Wilgus
e79996e031 [Bugfix] strcasestr
I pushed the wrong version of the function it was an experiment
on resetting haystack past the searched string but it is missing the
rest of the logic and therefore misses strings that should match

Change-Id: I23391d2e753840bfeaab8e26d9987198272fe7b8
2024-12-31 23:06:08 -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
Yakov
832e0fd458 update .gitignore to ignore macos files
dYSM files were generated upon building the simulator

Change-Id: Iff621925c862c784494165ce7d0d145f523fc1da
v
2024-12-31 15:56:28 -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
William Wilgus
186ad1234b [BugFix] pathfuncs.c path_append_ex basepath_max might cause buffer ovfl
strlcpy returns the length of the string that would have been copied
had there been sufficient space basepath_max might still be
larger than buf_size yet smaller than len
which would result in a null terminator being written past buf[buf_size-1]

Change-Id: I43e8ba9f72ea35bfe4f759ecd102c2e4bd26eb75
2024-12-30 19:35:33 -05:00
William Wilgus
27aff7ec8d strcasestr optimize for speed and size
revisit this and shave a bit more off on code size

Change-Id: I90546b931780c6779960129619a41cc6592c44e1
2024-12-30 16:42:55 -05:00
Solomon Peachy
6f542b6540 libc: We need to define SIZE_MAX in our stdint.h
Change-Id: Ifbf7ad4ea62c5543bcc7e0bd18d612d30d60b63e
2024-12-30 15:22:11 -05:00
William Wilgus
2a825b866a SIMULATOR help text fix yellow
Change-Id: If425ead1c53f8021f6047abc6c440c1343c68e79
2024-12-29 21:46:34 -05:00
William Wilgus
fcbfa494f5 [Feature] Simulator add F1 help text
give a listing of the keys used in the simulator

Change-Id: Ifcb91c59de41c214d050bd175065fabb6cf9eac4
2024-12-29 21:25:48 -05:00
Christian Soffke
9ba59477a1 sdl: improve window resizing on macOS
This enables smooth resizing of the window using a
fixed aspect ratio, instead of snapping into the
correct aspect ratio only when the resize operation
has finished, by using an SDL event filter that gets
events delivered during the resize operation
(whereas SDL_PollEvent blocks until done on macOS).

Change-Id: Ie6614e4b6f49a24469c5ee6a69721c9fbd440dae
2024-12-30 01:08:12 +01:00
Christian Soffke
8ce9d9e39e simulator: maintain LCD position/size when toggling background
Change-Id: Id76464b77b33d531d6075a83038466e18fab3a7f
2024-12-30 01:08:11 +01:00
William Wilgus
8884284da4 simulator hand icon on button region mouse over
add a hand pointing cursor over the buttons

Change-Id: Idb54e084b5b768de845a94c5bb13e4435d9b82e5
2024-12-29 16:43:21 -05:00
William Wilgus
fc26ba3f20 Simulator ClipZip ClipPlus add power and volume buttons
Change-Id: I6c7997f436bd0d7f5c0421489823d481b0396eea
2024-12-29 01:38:21 -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
Christian Soffke
8bd62e35cc button_queue: fix cpu never unboosted
regression introduced in da9d67a

Change-Id: Id1496873f1ab72fecc225dcfc78e633eea441089
2024-12-27 17:41:34 +01:00
Christian Soffke
5e09a9246c sdl: fix shutdown hang on MacOS when SDL threads are used
Change-Id: I2179d2beed89beba1716072fc06b9cc090118364
2024-12-27 11:45:53 +01:00
William Wilgus
dca70e1816 compressor remove static delay line buffer
core_alloc works well for this and we can allow the alloc to be moved

bugfix compressor_process() possible buffer overflow

Change-Id: I701c6306c39cc1c7aa72b0dbe402b9b0d1a3fcda
2024-12-27 02:34:18 -05: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
Christian Soffke
fa8b095f29 sdl: fix: concurrent drawing on Windows
On Windows, we need to prevent the event thread
from drawing at the same time as the main thread,
when window is being adjusted.

Change-Id: I2b4e4a50fec427e53e310593850e2a556a594b31
2024-12-26 12:24:24 +01: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
1643e0e287 [Bugfix] metadata.c copy_mp3entry() dest and orig may overlap
I meant to add this with the last patch b07d7d6
since it may supply UNBUFFERED_ID3 to the peek function
which uses UNBUFFERED_ID3 and will try to copy it back
wich is undefined behavior for memcpy

Change-Id: I91160570adac22134c84d3b37f8fcecb097d87d6
2024-12-26 01:29:02 -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
Christian Soffke
d323d968d8 sdl: adjust texture access pattern to "frequently"
probably doesn't make much of a difference
for our use case but should prevent creation
of temp buffers

Change-Id: Ie2cbefcbd7b8f94bed340f08bf71f764a32ed1ea
2024-12-25 19:24:32 +01:00
Christian Soffke
32cc5ee8f9 simulator: Press Tab to show/hide background
Change-Id: I80e8f629b1bbf37f92d243e190d541e7360e9dea
2024-12-25 08:34:40 -05:00
Christian Soffke
400452180d sdl: Keep texture around, upload LCD-parts only
No need to create a new texture for every
rendered frame, unless the scaling method
has been adjusted.

We also don't need to upload the (unchanged)
player interface to GPU memory repeatedly.

+ Remove unused lcd_display_redraw &
having_new_lcd variables

Change-Id: I5bff6aa2d54347a3f2c3afba8d8d7eb9e39f77f7
2024-12-25 08:34:40 -05:00
Christian Soffke
7aaa722a5d simulator: Adjust scaling using keyboard shortcuts
Press 0-3 to to adjust current zoom level
to 50% (0), 100% (1), 200% (2), or 300% (3).

Press 4 to switch between "best" (linear)
and nearest pixel sampling.

Change-Id: Id10d361659855a0ad9c97e6b341f498f72709ef5
2024-12-25 08:34:40 -05:00
Christian Soffke
759cbf4e5f sdl: Remove usage of SDL_SoftStretch
SDL 2 lets us take advantage of a fixed logical resolution,
where the renderer scales content up or down automatically.

Relative mouse motion is also affected by renderer scaling
by default (see SDL_HINT_MOUSE_RELATIVE_SCALING).

If window zoom has been enabled from the command line,
set scaling quality to "nearest pixel sampling" instead
of "best" to allow pixel peeping.

Change-Id: I4e5c19d36b55c985c26ac5ae64c4a6b8dd9b308d
2024-12-25 08:34:40 -05:00
Christian Soffke
60f3283f48 sdl: make window resizable, enable high DPI
Tested on Linux, MacOS, and Windows.

On MacOS and Windows, we constrain the window's aspect
ratio by adjusting the size when responding to resize
events.

On Linux, I've not found a way to do so, that doesn't
result in fairly stuttery behavior and weird jumpy
behavior of the resize handle, possibly depending
on your window manager. So, black bars are displayed
around the content.
Maybe someone, at some point, finds a way.
(SDL3 seems to have SDL_SetWindowAspectRatio)

When the window is in fullscreen, black bars are
display necessarily, of course, on all systems,
unless the player GUI has exactly the same aspect
ratio as the screen...

Change-Id: I535e6617497611ea57a4c19e08e552f990859cfe
2024-12-25 08:34:40 -05:00