Commit graph

39425 commits

Author SHA1 Message Date
Solomon Peachy
cfbbf5b488 pdbox: Fix up a pile of set-but-unused variable warnings with GCC16
Change-Id: I8de93d879ade61251fdde205353120a8e583b157
2026-05-23 21:31:25 -04:00
Solomon Peachy
95df5fdec0 doom: Fix set-but-unused warnings with GCC16
Change-Id: Iecd8ea9f5dc95f37955bed5e4892a90a93472cc6
2026-05-23 21:22:52 -04:00
Solomon Peachy
eb6746c1d6 albumart: fix warning with GCC16
apps/recorder/albumart.c:68:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
68 | sep = strrchr(fullpath, '/');
| ^

Change-Id: Ifd25623c8fa649302e44421316671aec2de9f037
2026-05-23 21:11:40 -04:00
William Wilgus
4ffd098ac9 [bugfix] text_viewer plugin, wonky word wrap, line pos buffer overflow
IpodVT reported odd word wrapping in the case of a perfectly fitting line on a space
which carried over to the next line

in the process I got a ASAN overflow on the line buffer due to
the possibility that lines_per_page - 1 might be -1 and then
reading off in space for an offset into the file
not sure that this would really cause an issue since it would presumably
be bounded within the boundries of the file anyway

Change-Id: Ib5b2c5a30b58faf8bda653f9b9d8d7f76cfb8069
2026-05-23 18:24:01 -04:00
Skye
557694a07f libc: add sscanf to core
Change-Id: Ia4162132a500e4d06305eab724250b7714091b9e
2026-05-23 08:03:09 -04:00
Christian Soffke
6a252576f5 bookmark: stop scrolling list item for skinned context menu
Lists with a selection size of >1 aren't skinned, so we
we have to manually take care of calling scroll_stop on
the un-skinned bookmark list before displaying the
(skinned) context menu.

Change-Id: Ie7ce627b5ea073be03304b7c676403cdfb4d3243
2026-05-23 12:05:07 +02:00
William Wilgus
f456dbfa52 [Bugfix] FS#13902 lua strfrtime wrong month field, did not add one to month
posix month field is called mon not month
mon goes from 0-11 so strfrtime needs to add 1 to the number for %m
day of week goes 0-6 where 0 = sunday
day of year goes 0-365 (365 on a leap year)

according to lua everything starts at 1
so month is 1-12
day of week goes 1-7 1 = sunday
day of year is 1-365 (366 on a leap year)

added some fields in the time_date example

Change-Id: Icd502b172285d23133488aa3456786d756667bfa
2026-05-22 18:10:36 -04:00
Skye
b5597a1c38 erosqnative: add HW4 BT pins
Change-Id: I2569f4db70261b454a1e1444ec529f8e714adc80
2026-05-20 10:24:12 -04:00
Solomon Peachy
bf8328fbe0 rbcodec: Fix build failure with DEBUG but without LOGF
Regression from 39497d1c74

Change-Id: I09ae974b56cd94753caa8bd4630d7ffcfe057846
2026-05-19 19:48:41 -04:00
Christian Soffke
1c39495ec2 playlist_viewer: simplify format_line
Reduces GNU Complexity score from 33 to 2.

Additionally:

- Allocate MAX_PATH, instead of MAX_PATH+1,
  for formatted id3 info (NULL terminator is
  already included)

- Ensure minimum name buffer size of 2*MAX_PATH,
  instead of MAX_PATH+1, so that there is space for
  both the formatted track name and, if enabled, the
  id3 info of a single track

Change-Id: Ie60590f6c0da4fe3a515b5643494a29cfc56de50
2026-05-19 19:37:29 -04:00
Christian Soffke
0492021247 fix yellow in commit 13a0e58b1c
Change-Id: Id2ec3d0ace5aab9d67aeda54f4cef52d0d111b01
2026-05-19 23:23:39 +02:00
Christian Soffke
13a0e58b1c gui: usb_screen: drawing adjustments
- Eliminate separate display update for USB screen UI vp;
  wait for skin_render instead

- Eliminate outer loop around handle_usb_events

- Use handle_usb_events in Simulator as well.
  Fixes USB screen being dismissed by any button presses,
  or by system events.

- When USB keypad mode is changed, only redraw the title viewport

- Delete unused MODE_NAME_LEN #define

- Hide "USB keypad mode:" prefix. Only display current mode setting,
  which requires less scrolling and ensures that the new setting
  is always visible immediately after it has been changed

- Change comment from:

  /* Don't return until we get SYS_USB_DISCONNECTED or SYS_TIMEOUT */
  to: /* Don't return until we get SYS_USB_DISCONNECTED */

  which reflects existing behavior (comment may have been
  copy-pasted from usb_wait_for_disconnect_w_tmo)

- Don't scroll USB keypad mode unless UI vp's width is > 1, since
  some themes try to hide the USB viewport and display a custom UI
  instead

Change-Id: I9b9703025b00ad807920ee60a843f269f414f6f9
2026-05-19 17:06:47 -04:00
Roman Artiukhin
69b6c97e58 Codecs: mp4: Improve support for long files
Load stts (time to sample) table on demand if it doesn't fit in RAM.

Fixes FS#13889 (in most cases I've seen files with single element in this table and problematic one has 111200 elements)

Change-Id: I719f92a4512a45472739587e81861b9bc545f349
2026-05-19 16:28:50 -04:00
Christian Soffke
aae46a822a simulator: support usb_inserted %bu tag (FS#13843)
Change-Id: Ia236c51f338bd333795f17991eb9e3659e722c6c
2026-05-19 13:37:28 -04:00
Christian Soffke
29d62e933f plugins: text_editor: fix list items that continue to scroll (FS#13900)
When using a theme with custom skinned lists
(e.g. Themify 2), a line in Text Editor will
continue to scroll after opening the context
menu, because you're switching from an un-
skinned list to a skinned list, which means
that list-skinned.c/list_draw isn't calling
scroll_stop_viewport for the list_text_vp,
as would be the case for un-skinned lists.

Change-Id: I952937166d8f17c9d57f4d93e715de970c49e5e8
2026-05-19 12:20:11 -04:00
Christian Soffke
1a8efac956 manual: fix skinned list tag mixup (FS#13895)
Change-Id: I890fe8800aa6e8640f445cd79ee3fa192398ad0c
2026-05-19 17:11:42 +02:00
William Wilgus
58f75311d8 merge font_getstringnsize and font_measurestring
measure string just needed a bit more to be a replacement

Change-Id: I25c760df5edd7224b50c0522b4e44b1f9b574c51
2026-05-18 01:36:50 -04:00
William Wilgus
6e27ba80e4 [bugfix] splash.c /t as last char should not add extra spaces
small bug, /t as the last character should left justify without
adding spaces to the end of string
/t also added too many spaces to the end of tabbed lines

adds info comment for new usage

ifdef removes some functionality for the bootloader

Change-Id: Ia4ba80f631f8bac3a13441912a8560616fa2c784
2026-05-18 00:12:18 -04:00
Solomon Peachy
d97e4425c6 playlist_viewer: Use 'NULL' instead of '0' when calling playlist_viewer_init
For some reason this resolves an apparently-unrelated warning about a const
violation inside playlist_viewer_init().

Change-Id: Ifd4eb008335876707abe64da04a3afd0d1c46633
2026-05-17 16:45:47 -04:00
Solomon Peachy
39497d1c74 build: Silence a pile of set-but-not-used warnings in codecs
GCC16 is stricter about reporting these, and while we can rely on
the compiler to optimize away dead stores, we're better off eliminating
them from the source code.

Change-Id: I14570a986811a77ca656c60d792593ff8c458571
2026-05-17 16:39:06 -04:00
Christian Soffke
8abc859c32 fix regression in cae4336
Change-Id: I026fe919401bbe13cef161a6eb6ce44e5fbbbb6f
2026-05-17 14:49:46 +02:00
Solomon Peachy
cae433608f build: Silence a pile of set-but-not-used warnings with GCC16 in apps/
The compiler is smart enough to optimize away dead stores but let's
just get rid of them in the first place

Change-Id: I5c85d7c05ef03b084205356a21248f7b049296b0
2026-05-17 08:03:44 -04:00
mojyack
2c0381a34e plugins: mpegplayer: libmpeg2: idct_armv6.S: use explicit register pair for ldrd
Change-Id: I65c7516f500cfe9f2b4990f769e9d85708f7fc62
2026-05-17 07:36:11 -04:00
mojyack
a446c06b21 recorder: jpeg_idct_arm.S: use explicit register pair for ldrd
Change-Id: Ic76b4ed4d2a3bea16937a5880502f0a57dd4e556
2026-05-17 07:35:00 -04:00
William Wilgus
d8db60b34a [bugfix] splash goes into infinite loop when vp is too small
chris_s reported that a vp width of 1 wpuld cause the trxt reflow to go into an endless loop

check for this and skip displaying the splash
add a warning to the sim for catching unintentional cases of this

Change-Id: I9e1c561f745b5bcf113d0a6cdff57a00cd190fd4
2026-05-16 17:33:20 -04:00
William Wilgus
7c2e84ad2f FS#13898 expand date_time.lua example
os.date(*t) did not return table when *t supplied because
require("strfrtime.lua") was not loaded

Change-Id: I89b02adad633dca0106b571bdb4b10ffb39cbcf6
2026-05-16 15:54:42 -04:00
William Wilgus
17d28b96b6 lua rocklib.c add splash_progress function
Change-Id: I864a301368c3144a7808ecfa9644e679af2ac727
2026-05-16 14:56:51 -04:00
mojyack
b350d6e066 target: arm: s5l8702: crt0.S: use APSR_nzcv instead of r15 in mrc operand
Change-Id: I7e0cf0325407cade9d95d73af6f8dceb92bf3155
2026-05-16 12:02:32 -04:00
mojyack
c4abbdd718 target: arm: mmu-arm.S: use APSR_nzcv instead of r15 in mrc operand
Change-Id: Ie27d323ac497fe8d63cee89d2c0722caa293cd25
2026-05-16 12:02:11 -04:00
mojyack
127428e32d bootloader: ipodnano2g: fix mcr/mrc usage for clang
Change-Id: I0e328c2d0d4243783cbede843a6451c45f5ba914
2026-05-16 12:01:36 -04:00
mojyack
6fc41c7cdf target: arm: s5l8700: fix mcr/mrc usage in crt0.S for lld
Change-Id: I6d25e4759e1d86f8de3047d10f5fcac8030afc6e
2026-05-16 12:00:45 -04:00
William Wilgus
21fe45caad [Bugfix] splash adjust string split logic, tab justify
only split a long word across lines if it is larger than screen width
also consider \0 as a valid place to split so we still run through the space finding loop

make /t left justify the splash window (in RTL langs it right justifies)

Change-Id: Id2955878a178c66cb0a1c644e62f943247666d8b
2026-05-16 11:51:53 -04:00
Solomon Peachy
1beafb9290 FS#13891 - Updated Romanian and Moldavian translations (Mihai Alexandru Vasiliu)
Change-Id: Ida441f2324fad443c89da82a9d4d58fcbb9e2f6f
2026-05-16 07:37:40 -04:00
Solomon Peachy
6ee85ce61a imx233: Increase the memory region reserved for loading firmware
The imx233 bootloader reserves the first 1MB of DRAM for loading the
main firmware, but the recent utf8proc changes means we now exceed that
size on most imx233 targets.  Bump this up to 1.5MB to give us more headroom

Change-Id: I1b8bede85d06d40338ea6e3d9abb4e5da34423be
2026-05-15 11:41:23 -04:00
William Wilgus
b4c308d698 splash, rework word wrap, support some escape characters
Fixes issues with multiple spaces
adds support for \n and multiple \n
adds support for \t (only at start of line)

adds utf8 aware string splitting

locks to max width/height

adds \f to reset min width / height

larger buffer for units with ram > 8mb

make splash buffer static

Needs testing
Change-Id: I46915043719dce0d696c5ab0da3ed92e4755829c
2026-05-15 11:13:12 -04:00
Solomon Peachy
89cb41c322 pdbox: Add a keymap for the ErosQ family, enable it in the build
Change-Id: I9df8d8a8eac161aeaa133e234cc0c2a60b2f3f93
2026-05-15 10:54:08 -04:00
Solomon Peachy
f774de61b6 xworld, pdbox: Fix issues with using strncpy
Change-Id: Iaed18b7c856b7febef443d1e3e5f6b527b32ecae
2026-05-15 10:37:35 -04:00
Solomon Peachy
a977c19338 fix broken bootloader builds, regression from 5951f6e5e9
Change-Id: I0daf76c362c9e50bf6593e3c8f40847a121dd3ea
2026-05-15 10:25:25 -04:00
Skye
5951f6e5e9 libc: move strncpy to core
Change-Id: If005a0305cedbab85905536238d0f799f19213e1
2026-05-15 10:04:06 -04:00
Solomon Peachy
4c60fe95fc Revert "pp5020: ata: do not yield in ata_wait_intrq()"
This reverts commit e13befb925.

Reason for revert:  Significant performance regressions, especially with respect to UI interactivity when the database is in use; see https://forums.rockbox.org/index.php/topic,55703.0.html

Change-Id: I0428711871480b74f7faeecb0536f7ed63f631cc
2026-05-14 14:42:53 -04:00
Skye
7d3f738b3f libc: fix firmware assert.h
Change-Id: Id7cc3e4656519fee908083d3b551c5228d220ef7
2026-05-14 11:54:52 -04:00
William Wilgus
db32a7f07e [bugfix] font_getstringnsize() incorrect count, add font_measurestring()
maxbytes counted final characters not actual bytes

font_measurestring() returns the number of bytes of a string that will
fit in a given width

Change-Id: Id73b763267e399bd558f87872b5e715076f9b7f7
2026-05-14 09:51:58 -04:00
Skye
7ab521cba6 libc: add actual sprintf to sprintf.c
Change-Id: Iba19b587781da3191c7674a6a141c0c4fbf8b344
2026-05-12 10:19:51 -04:00
Skye
25551180ba libc: add basic maximum field width support to sscanf
Change-Id: Iba6d8af32435beccf9a77d801b0eaac91549bc89
2026-05-12 10:16:45 -04:00
Christian Soffke
51abd937d5 playlist viewer: retrieve track name id3 from db
Metadata for formatting the trackname can
be read from the database instead of from
disk. I think this was changed by mistake,
when a single function was added for both
Show Track Info and track name formatting.

Change-Id: I903d36bb513898242505f01562340924bf642a12
2026-05-12 09:38:29 -04:00
Christian Soffke
9bda6389ce quickscreen: fix UI update when USB connected
Regression introduced in commit 7aca1d4.

Quickscreen kept redrawing itself over the USB screen,
because remove_event_ex was only called after returning
from it.

Change-Id: I8a187809781cef46d13ed45392efecb28435a9df
2026-05-11 21:58:13 +02:00
Aidan MacDonald
075d1deac3 pcm_mixer: remove some unused preprocessor symbols
Change-Id: I0c9c96f082cd4bb8313ade9a8d8da7fa2ba087e4
2026-05-11 07:19:50 -04:00
Christian Soffke
bc528c4079 plugins: properties: don't clear UI viewport for dirs
Accidentally made the vp flash in previous commit.

Dir scanning doesn't display a progress bar
and already handles its own drawing

Change-Id: Id0e67d62081dfe4b22e91c775cd80af2e55a4b69
2026-05-09 07:03:58 +02:00
Christian Soffke
325a028af4 plugins: properties: clear UI viewport at startup
Otherwise, with themes that adjust the viewport
for the current activity, the background behind
the progress bar may look glitchy while
scanning items, until the list is displayed

Change-Id: I27a207b37c3209eae9bc61e1fd0862fb5872be57
2026-05-08 17:00:15 +02:00
Christian Soffke
ae871d25a9 gui: skin_engine: reduce updates
Slight optimization of c145d19. Not supposed to result in
any visible difference.

- if UI viewport is drawn for GUI_EVENT_NEED_UI_UPDATE,
  it doesn't need to do a viewport update; skin_render
  already updates the display

- skin_render_deferred shouldn't need to request that
  the skin perform an immediate update

Change-Id: Id03cf89357eaf0d61af1e928c94942d8c4882dba
2026-05-08 15:43:55 +02:00