Commit graph

17692 commits

Author SHA1 Message Date
Roman Artiukhin
1f548f74e6 unicode: add utf16decode with utf8 buffer size check
Make use of it in id3tags and cuesheet

Change-Id: I153c23f1f7312e9d5e1de9f03725f2d2ab0abc93
2024-12-15 15:44:57 -05:00
Dana Conrad
e334a1f95e Settings: Make Default Codepage default to UTF-8
Associated with FS#13534

Change-Id: I41f64ff59b32aac90158cf72bc535e7fc6949b3b
2024-12-15 15:44:15 -05:00
Solomon Peachy
10b8448511 Don't use CHECK_VOL(x) as a loop conditional
...On non-multidrive targets it will always evaluate to true because
it effectively ignores the argument passed in.

Instead use 'x < NUM_VOLUMES'

Fixes regression introduced with a41a001258 on non-multivolume devices

Change-Id: I1a620af113c87cf3227ef8b40d0b51b2600cd816
2024-12-15 15:34:18 -05:00
Roman Artiukhin
004304dc65 unicode: add iso_decode_ex with utf8 buffer size check
Make use of it in id3tags, playlist and cuesheet

Change-Id: Ibc8abc0faf16688bc9b826b7a712d1dfe9bf75b2
2024-12-15 09:26:26 -05:00
Roman Artiukhin
a23002cd5e unicode: Unify check for UTF-16 BOM
Adds utf16_has_bom function

Change-Id: I67ea474c9cf6ca6e6684351c2f54131164b7903c
2024-12-13 17:38:05 +02:00
William Wilgus
789aa0a695 Scrobbler plugin remove logf size warnings
using chris_s' trick to caste to 64 bit int

Change-Id: I28cac7e301d272351d44527531b46f1e211141fc
2024-12-11 19:35:02 -05:00
William Wilgus
a3ef7b73b8 [Bugfix?] tagtree build_firstletter_menu dst src overlap
pretty sure this is a false positive by gcc but we know what we expect
to recieve so add a small buffer to shut gcc up

Change-Id: Ibbd7c995ec2f0ade4bfbcb1d659f1cae5d4f1de3
2024-12-11 19:19:30 -05:00
Solomon Peachy
d0172b4dd9 disk: disk_set_sector_multiplier() takes the MULTIPLIER not the resultant size
Change-Id: I3ef924a1359c92bfeb67d7cfba2bc793f4ec0cdc
2024-12-11 12:59:27 -05:00
William Wilgus
1a6f0d8b0f [FixRed] checkwps has no concept of playback
Change-Id: I1ed30de3716e225e38444bb4569eda9f958a02d8
2024-12-11 01:23:54 -05:00
William Wilgus
f79374e1e8 WPS don't display next track till ID3 data is ready
this causes a bunch of flashing on track change for me and I never get to read enough
of the filename before it picks up the id3 data anyway

Change-Id: I36e9b5dd03510b796b652e3116800992bea73869
2024-12-11 00:44:59 -05:00
William Wilgus
05336c9efb wps.c cleanup
No functional changes code clean-up
consolidate pause_action, unpause_action_ do_wps_playpause

Change-Id: Id5de9616c0ecd6d2b48d611667ef0589a50dcae6
2024-12-11 00:43:15 -05:00
Solomon Peachy
a61c146e36 COV352716: Inproperly concatenated help text (very minor issue)
Change-Id: Id8393bd456e93215208c314ab72e0f3b710b3610
2024-12-10 23:11:48 -05:00
Solomon Peachy
b752f3f964 ipod6g: fix sim build
Change-Id: Idb1401e34a5f98222b7813ebdbe17a999691cef2
2024-12-10 23:04:09 -05:00
Solomon Peachy
c19b50cdd8 FS#13532: Updated Chinese translation ( 王吉)
Change-Id: I16fbdd6770442e3493fec39676a6b95910cd8521
2024-12-10 10:27:15 -05:00
Solomon Peachy
1328464c86 puzzles: Update resync script to work around WIN32 issues
Change-Id: I30a6c674724f683d0a0953f042749001f625f7b2
2024-12-09 21:24:10 -05:00
Solomon Peachy
da8bde0860 puzzles: Disable "unfinished" puzzles for Windows builds
They rely on weak symbols which the windows linker doesn't like.

Change-Id: Id24ed5553e393f9140b4e7cd256cafe64d3656e3
2024-12-09 19:28:21 -05:00
Solomon Peachy
7b40c1f786 FS#13531: Minor correction to Turkish Translation (Mustafa YILDIZ)
Change-Id: I98c3059069af610bd99ac5f1bd0ec33c7187b911
2024-12-08 15:37:00 -05:00
Solomon Peachy
bc1d7d77c5 FS#13530: Updated Italian translation (Alessio Lenzi)
Change-Id: Ie96cd5ff92b1d579e6b75c1ff2c777a798a24a52
2024-12-08 12:37:16 -05:00
Christian Soffke
05a77178ff plugins: fix plugin handle reset after plugin load failed
e519356 prevents loading further plugins otherwise

Change-Id: I97dc14aa5d0e0471d264f006593f62da3fd4394a
2024-12-08 12:22:00 -05:00
William Wilgus
33cbefb310 skin_parser Reduce ram usage for conditionals on %ft() file text tags
the skin engine calls the tags for each conditional to check them since %ft
erases it's var if the file doesn't exist %?ft is likely only being called
to check existance of a file or line of a file

this patch allocates 2 bytes to satisify the conditional if the line exists

Change-Id: Ic74bf5fec9a5d9b6724692c49a0997bfa4cff48d
2024-12-08 03:52:38 -05:00
William Wilgus
ebd1021fe4 [Bugfix] Pt doesn't return length of the next track
fix yellow in mp3_encoder

Change-Id: I1658250141d3ea00b56da0258e111ca76aa56b53
2024-12-08 00:28:16 -05:00
William Wilgus
9eb9e4ab22 [Bugfix/Red] fix red in checkwps , fix mp3_encoder plugin div by 0, warnings
checkwps doesn't have current_tick

mp3_encoder had a divide by zero if the file wasn't encoded correctly or wrong file was passed

fix gcc warning in huffman encoder

move text for small screens

Change-Id: I9d09353e184e760ae31d1a1cd434d2790eacb7ca
2024-12-07 23:56:52 -05:00
William Wilgus
bcc8c608e5 Revert "FS#13429: Add a freeform "player name" configuration setting"
This reverts commit 2bb9323de8.

Reason for revert:superseded g#6154

Change-Id: I59250be7ecc6a08698be3429dc02a85272fcb9da
2024-12-07 23:02:22 -05:00
William Wilgus
44bfffd7c5 [Feature] skinengine subline timeout hide line for n seconds
builds on top of the file text patch to add hide timeouts to
subline text tags

this allows you to specify both a show time and hide time
for these elements

%t(show, hide)

also removes the 327 second limit for timeouts whne this form is used

Change-Id: If4598dcc24d0c7be4380e7595b7d91c7eba3a728
2024-12-07 23:02:22 -05:00
William Wilgus
eb3e5eb2bf [Feature] Skin engine Themes grab text from a file %ft(file, line)
allow the skin engine to read text files and return a particular line

you then can use ss on that string to allow display of strings from the file
(Playername comes to mind)

able to be used as conditional
%?ft(filename)<Found|Not Found>

if (selected) line of file is empty the tag is treated as #COMMENT

bugfix:
%t(n)%?x<text|text>
would ignore the specified timeout defaulting to 2 seconds

bugfix: cabbiev2.128x160x16.wps was missing %Sx()
for translation on 'Next Track:'

playername.txt generated at boot if it doesn't exist contents: 'Rockbox!'

Change-Id: I04ea4fd411f74c7c6e672657949aa520c2f86f95
2024-12-07 23:02:22 -05:00
Solomon Peachy
876e8c1305 FS#13529: Updated Korean translation (Hoseok Seo)
Change-Id: I5654b1bd20b008c959edecd9627356a34acb2abf
2024-12-07 20:42:16 -05:00
Solomon Peachy
197d0579bd FS#13527: Update Polish translation (Adam Rak)
Change-Id: Ic181358eee401486703301390f9d7ce5716d2a53
2024-12-07 16:51:01 -05:00
Solomon Peachy
f94401213e FS#13528: Update Turkish translation (Mustafa YILDIZ)
I think there's still a single remaining issue preventing this from 100%.

Change-Id: I5d05d8c801a710b12451af7a44ddbd3e345e6164
2024-12-07 16:51:01 -05:00
Solomon Peachy
a76ecf1725 erosqnative: Fix operation in a simulator environment
Real hardware needs 24-bit PCM data supplied, but simulator
is still 16bit only.

Change-Id: I20b88a7cb27105829fe5c9e9c434f559a6dbbb60
2024-12-07 14:05:23 -05:00
Solomon Peachy
e6851a55ed Revert "[Feature] Skin engine Themes grab text from a file %ft(file, line) WIP"
This reverts commit 62b5dfd81d.

This was accidentally merged, and wasn't up-to-date anyway.

Change-Id: I4fcceb8dc4f86762701daab72498202cabd8295a
2024-12-07 13:48:05 -05:00
Solomon Peachy
97456ae338 lang: collapse the two "line out" strings into one.
Change-Id: I7928f693a1cfbdbadd66102812027b989796be19
2024-12-07 13:38:38 -05:00
William Wilgus
62b5dfd81d [Feature] Skin engine Themes grab text from a file %ft(file, line) WIP
allow the skin engine to read text files and return a particular line

you then can use ss on that string to allow display of strings from the file
(Playername comes to mind)

able to be used as conditional
%?ft(filename)<Found|Not Found>

if (selected) line of file is empty the tag is treated as #COMMENT

scroll timeouts now persist thru trackchange

bugfix:
%t(n)%?x<text|text>
would ignore the specified timeout defaulting to 2 seconds

playername.txt generated at boot if it doesn't exist contents: 'RockBox!'

Change-Id: I961910e01be052ef902f77e6d92fc3e367ffe9d0
2024-12-07 13:21:21 -05:00
Christian Soffke
87452d775e fix warnings on some systems / format specifier mismatch
Instead of %ld or %lx, use %jd or %jx
for off_t (after casting to intmax_t)

Change-Id: I4cd1831816820d2862b383ff8782e548b2fca294
2024-12-07 11:07:44 -05:00
Solomon Peachy
93ecb97693 skin_engine: Splash an error when a font fails to load
...Otherwise we fail silently with the theme only partially applied.

Change-Id: I1010efaee965db86bb8d2859b04364f63bfbcc0f
2024-12-07 09:22:51 -05:00
Dana Conrad
5ed0db6e90 erosqnative: Repurpose stereosw_select setting for output select
Turns out they did not swap the stereo switch lines on us,
so this setting isn't really useful. Repurpose it to allow
the user to force the device into headphone or line output mode.

Note that settings other than "Automatic" will cause jack detection
to not work.

Default Automatic.

Change-Id: If94499fbb8f0d92111811fe51f6107ce213b66ad
2024-12-07 09:20:40 -05:00
Vencislav Atanasov
a29b570ac4 S5L8702: Rename nor-* to norboot-*
Since the SPI NOR flash is only used for the bootloader, rename the files accordingly, This is a preparation for the nandboot driver will be introduced, since S5L8720+ don't have an SPI NOR flash anymore.

This is a part of the large iPod Nano 4G and iPod Touch 2G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Iea835fd2029470bfe9f813631ad4f3db711facc3
2024-12-07 00:56:06 +02:00
Dana Conrad
adbd0125fd erosqnative hw1/hw2: Check for DAC in bootloader
Check for the ES9018K2M dac in the bootloader for
hw1/hw2 devices. Assume that all devices newer than
hw2 have ES9018K2M DAC unconditionally.

All devices will now report the correct hw revision
in the debug menu under Device Data.

Add devicedata.version field, current version 0.

Rename device_data.lcd_version to device_data.hw_rev.

hw2 devices with older bootloaders which ID as hw1 are special-
cased to keep using hwvol on them. They should still upgrade though.

Change-Id: If0fd5ce3bc6e85e511047721ec18e42fb89312e7
2024-12-06 11:39:24 -05:00
Solomon Peachy
4919c32bc7 FS13525: Updated Russian translation (Ilya Ban)
Change-Id: I1e8c72c3f20b7afd3334fdab84d0e8c4a89898b0
2024-12-04 10:47:06 -05:00
Christian Soffke
2ce1a1e638 tagcache: fix logf format specifier mismatch
Mostly replace "%ld" with "%" PRId32 for int32_t,
or add casts to improve portability and prevent
incorrectly displayed values on some systems.

NB: (Some of) the log output is also presented
to the user in the db_commit plugin.

Change-Id: I98f663b35fec682c98f8a065253ee0c9bd34b61b
2024-12-03 16:55:14 -05:00
William Wilgus
793c797447 [Fix Yellow] remove DEBUGF from skin_parser.c cleanup spaces
move const to the proper side

Change-Id: Ide7c1878281eaee28d06426eee43041ad61acbc4
2024-12-03 01:48:50 -05:00
William Wilgus
68d4fd0e5b skin_engine minor refactoring struct alignment No Functional Changes
Move some elements around to save 720 bytes in the skin engine with cabbie

saves some code manipulating the skin_helpers arrays in skin_engine
eliminate conditionals checking for pre/post process functions
using a dummy fn(), consolidate pre/post process into a single function
adding a bool preprocess to indicate stage

Change-Id: Id2df4706b73e9025c7300be135dc02e135e587fe
2024-12-03 01:21:28 -05:00
Christian Soffke
f1010005b0 Fix simulator crashing on MacOS
Event handling must happen on the main
thread for MacOS.

Not sure if button_queue_wait is the
best place for doing the SDL event
polling, but seems to work ok.

Change-Id: If928282df84bdd74e24a48afd7dbc4c4bfcc49e2
2024-12-01 20:18:11 -05:00
Christian Soffke
1745b74576 Make simulator compile on MacOS
Tested on MacOS Sequoia (Apple Silicon) with the
latest Xcode command line tools, gcc 14
(Homebrew GCC 14.2.0_1) and sdl2 (Homebrew 2.30.9)

Make sure 'gcc' (and 'gcc-ar') is in your PATH
ahead of the Xcode-provided "gcc"(clang). E.g.
by setting up symlinks in /usr/local/bin that
point to gcc-14 and gcc-ar-14.

Notes:
- The appropriate bmp from uisimulator/bitmaps
  has to be manually copied to your build folder
  and renamed to UI256.bmp, if you want the sim
  background to be displayed

Change-Id: I559f33d2165065f913f30c016b85906af380fb81
2024-11-30 22:19:02 -05:00
Michael Sevakis
c53c617976 peakmeter: Make a smaller, cleaner calc_db().
Use a binary tree in an array.

Change-Id: I392d71fddae21e900ff9e97deed54e0a843e4eb9
2024-11-30 21:14:37 -05:00
William Wilgus
80a0bf590f radio.c presets.c small clean-up
remove some extern vars in favor of get/set functions

Change-Id: Ic4effae2acdd480beeab76c9f0319b1783a3bab3
2024-11-30 16:42:43 -05:00
Solomon Peachy
fdc17096b5 build: add 'lto' to features.txt if built with it
This makes it easy to tell at a glance if a build was with LTO or not.

Change-Id: I7ba9b412f7b74d300a0c55e36ea4cf522d46e6f2
2024-11-30 13:49:42 -05:00
Christian Soffke
a41cad6458 Playlist Viewer: align buffer
Change-Id: If93c7e3694a007ace62e3b75d96083b03557f3ec
2024-11-30 17:30:01 +01:00
Christian Soffke
0469a95bee Playlist Viewer: Mitigate FS#13518 (stack overflow)
Playlist Viewer hangs indefinitely on tracks with long Comment fields

Commit 2156d98 (metadata: mp3: Improve support for long tags) has
allowed the length of parsed tags to exceed ID3V2_MAX_ITEM_SIZE.

Overly long tags  may blow the stack due to a stack-allocated buffer
in the metadata parsing routine, that can reach 3 times the size of
the id3v2 and id3v1 buffers combined.

This patch moves the mp3entry struct used by the Playlist Viewer
off the stack and onto the plugin buffer instead, which helps prevent
a stack overflow in cases such as the example posted in FS#13518.

Future patches to either constrain ID3V2_BUF_SIZE to ~1120 bytes or
to lower the stack usage of metadata parsing will still be required
to fully address the issue.

Change-Id: I2f436195bc8df4d785b1880f6ab167783a162020
2024-11-30 15:45:40 +01:00
William Wilgus
c6fb789b3b test_fps add log buffering
most of the data gets wiped out by the next (or current) text

add some sleep and buffer the log text so we can display it after each test

needs tested:
	remote displays
	greyscale

Change-Id: I14e53aca71e925ff9f547a77c6805a75d2d37e67
2024-11-29 11:06:53 -05:00
William Wilgus
c115cb9472 [FixRed] 4ce8963c50 tree.c Maybe?
Change-Id: If959f6bcffa9b7afdd2942edc1ea683d275bac72
2024-11-29 00:51:44 -05:00