1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17662 commits

Author SHA1 Message Date
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
William Wilgus
4ce8963c50 [COV] tree.c rockbox_browse potential NULL deref
ultimately its only used as a way to prevent reentry
but coverity correctly identified the possibility..

Change-Id: I4738e52782ad4cac6134394238345a0491a50382
2024-11-29 00:25:03 -05:00
William Wilgus
c2bc7aa516 [BugFix] lib/printcell_helper.c vp buffer ovfl #2
found another place where vp width could exceed the buffer

Change-Id: I85d806cc58955b44327bd47c6a08dc7e556722c0
2024-11-29 00:23:51 -05:00
Christian Soffke
b1e70db6e7 Fix FS#13523 splashf crash on devices with remote LCD
regression introduced in ff2f912

Change-Id: Ifc9f37710e379605ad3325679325aab229003a21
2024-11-28 22:26:52 +01:00
William Wilgus
da9d67a0fe Button queue handling is split from main button driver
First half of
https://gerrit.rockbox.org/r/c/rockbox/+/570

Change-Id: Icc64dfd8194c18f69564ed5f8bf7dd70a4330eb9
2024-11-27 20:16:53 -05:00
William Wilgus
5954a2fd48 runtime info add type to clear time dialog switch to simple_list
its nice to know which item you are clearing
simplelist does most of the background stuff for us

Change-Id: Ia2a2a92cecbb38d92297705ca1015aba2f81f18f
2024-11-27 15:48:28 -05:00
William Wilgus
cb478d9d3f add INIT_ATTR to dircache_load and core_load_key_remap
both of these are only called in main at init

Change-Id: If2020c2832df837aca23a331474bbf2352d803d4
2024-11-26 22:13:43 -05:00
Solomon Peachy
6b348d7f75 Fix nano2g build from 88a1d902
Change-Id: I7f760ce84a2b8e8f5b118b7fe3b57c64d0f4af05
2024-11-26 20:12:59 -05:00
Vencislav Atanasov
88a1d90236 s5l87xx: Add S5L8720 registers
This adds some confirmed and some to-be-confirmed (TBC) registers for Samsung S5L8720, which is used in iPod Nano 4G, iPod Touch 2G and the 920-0614-03 development/prototype board.

All credit goes to Cástor Muñoz <cmvidal@gmail.com>

Change-Id: I9fe5052fe9f05cd33f34de4e228cdb291944aa11
2024-11-26 19:04:12 -05:00
Solomon Peachy
303fc090a7 logf: Fix warnings that only happen with simulator builds.
Change-Id: I51d960877201534f5683ba2ecbb829913f6a8afa
2024-11-25 09:34:03 -05:00
Solomon Peachy
03555cc7b5 logf: Correct two format string problems in plugins
Change-Id: I67ab14b2079de8fb660aaa5c1391db053aad2cc5
2024-11-25 09:08:32 -05:00
Christian Soffke
18fdb41b2c plugins: simple viewer: prevent audio dropouts when scrolling
Change-Id: Idf3ee45585985beaccb991f4f66cd895aa3f7a4c
2024-11-24 23:55:40 +01:00
Solomon Peachy
bdf1690cb2 build: Allow LTO to work globally, not just codecs/plugins
IMPORTANT: There is no guarantee this will compile cleanly much less
_work_ on any given target.  This is purely to enable future hackery.

Change-Id: Ib58f21b717719fd4325622b446a60779406ae035
2024-11-24 08:23:38 -05:00
Solomon Peachy
f24bae5baf ...This time, fix the non-multidrive+non-multivolume builds.
I swear, this is getting old.

Change-Id: If810a6559eaebbed0a0f0c6a0891b09101783be6
2024-11-23 23:07:12 -05:00
Solomon Peachy
fb2316b9b0 Hopfully fix up the remaining warnings
Change-Id: Iba1facabf4980b491d80842ef91e92d6bc374cfa
2024-11-23 22:39:35 -05:00
Solomon Peachy
57cd8cd712 fix warnings and errors in a41a001258
* volume_partition() wasn't defined for hosted targets
 * wrap the "special" volume stuff in HAVE_MULTIDRIVE

Change-Id: Icbea256ab6438e1f7e45d361ed61724feec7ef0b
2024-11-23 20:59:32 -05:00
Solomon Peachy
a41a001258 info_menu: Don't print a line for volumes that don't exist
This is an example of what could happen:

 HD1: Not present
 ouping Not present
 ouping Not present
 ouping Not present

We have up to 4 fixed volume slots (==partitions) per drive, but
shouldn't display an entry if the slot isn't used, ie the normal case.
Instead, we _were_ displaying a partially-unitialized entry!

There is a special case for targets that support multiple *drives*, in
that we want to show 'not present' for the first volume slot of the
2nd drive.

Change-Id: I717edd305cd654ff4e13ba9ffb57e7a4c9935c17
2024-11-23 20:33:26 -05:00
Christian Soffke
237c83852a Fix: read_color_theme_file needed beyond init
Change-Id: Icb1e2bf42149b1b27ed11046ec79e9faf105f289
2024-11-24 00:42:50 +01:00
Christian Soffke
46a4361bf1 playlist viewer: move on-disk playlist struct to playlist.c
Change-Id: I40281142f2fa930f0c68b9612c12fca14885ac37
2024-11-23 09:05:39 -05:00
William Wilgus
2591f6ad02 filetypes.c small cleanup
no functional changes

Change-Id: I9c27689920ba89abf5ba16d84ed0dad8747be74a
2024-11-22 23:20:32 -05:00
Vencislav Atanasov
d7b57e33d9 Add support for S5L8720 in various places
Due to its similarity with S5L8702, clickwheel support and sleep can be used as-is on S5L8720. DRAM and IRAM are also configured.

Change-Id: I52f8a3417e6a25c7360b1cae2fb5eed621e2e0db
2024-11-22 16:45:29 -05:00
Solomon Peachy
98259cd55c FS#13521: Corrections for Korean translation (Hoseok Seo)
Change-Id: I3308e9bb210f950d368ece7cd6b0f8e7face0012
2024-11-22 10:21:28 -05:00
Solomon Peachy
dfa7d43b43 FS#13520: Updated Spanish translation (Lianela Sky)
This _should_ bring us up to 100% completion!

Change-Id: I5fd829aa5d1816659cf61e935dc0a34256be951e
2024-11-22 08:25:40 -05:00
William Wilgus
56378cb38e [FixRed] main_menu.c typo CONFIG_CHARGING == CHARGING_SIMPLE
Change-Id: I5422a566459336727bf9189130b2c02d7c1b40e2
2024-11-22 02:37:16 -05:00
William Wilgus
b73fc15f1f [FixRed] Info menu Devices without HAVE_RECORDING
Change-Id: I61ffcfdf81ed286e620adddf5801c8eaa08b2a4c
2024-11-22 02:07:56 -05:00
William Wilgus
4340f33b63 main_menu.c convert system>info menu to static simplelist
Change-Id: Iec9f7f4b6def905abdfe281c7b71a8bf2506a3f7
2024-11-22 01:40:56 -05:00
William Wilgus
e6f49e47e3 menu.c remove the check for valid menu_callback
instead of checking for menu callback use an empty callback instead

this code is a bit strange in that a prior valid callback might be returned
so I left the behavior but I question if thats really needed..

Change-Id: Id0c4eb208b33a6fffdbdffc63ea9cc928bba1a6d
2024-11-21 19:56:03 -05:00
William Wilgus
d1a4903afb [BugFix] lib/printcell_helper.c vp buffer ovfl
vp->width may exceed the actual available screen area which
prevents the sim from clipping properly
'

Change-Id: I487761b3e656d4a066960fb8dc7477cceb30aa57
2024-11-21 19:50:57 -05:00
William Wilgus
00906647b4 Simplelist remove simplelist_set_line_count(n)
replace with simplelist_reset_lines(void)
there was one user saving one short string
remove the feature to simplify list code

fix scrolling in dircache debug item

Change-Id: I71f933f224c2de5f7a68feab904a2fe0b81e1362
2024-11-21 12:14:17 -05:00
William Wilgus
d6e3514c0d [BugFix] gui/list.c simplelist_set_line_count > 1 list buffer corruption
when line was > 0 static item might not be in buffer after 35a913473e

Change-Id: I6fefb16d05d132f8f0e4bbbbfcf471342a434072
2024-11-21 10:46:27 -05:00
William Wilgus
35a913473e list.c small cleanup, add simplelist_setline()
add simplelist_setline() to allow literal strings or owner buffer
to be shown in the simplelist

this makes simplelist more versatile by allowing static strings
to be added directly instead of copying into the simplelist buffer
(ie not consuming the simplelist text buffer)

add bounds checking to simplelist_setline/addline
No one has more than SIMPLELIST_MAX_LINES..  right?
-- there are actually a few places this isn't checked..

use new setline function in debug menu

share the simplelist buffer with the list_draw fn for gui_synclist
since they shouldn't be in-use simultaneously we can save some stack

Change-Id: I4a1e64d3a621d326ff094241da55452c0ff746ba
2024-11-21 08:49:18 -05:00