Commit graph

39497 commits

Author SHA1 Message Date
Roman Artiukhin
842492d77b hiby: r1_patcher: add macOS support
Change-Id: If9f11fc7fbac87275325f0f892c2546184714d0b
2026-08-12 11:21:10 +03:00
Solomon Peachy
fd8d6f10a1 synopsys-dwmac: Bugfixes
* Dedicated FIFO mode requires a non-zero multi-count for periodic INs
 * Add ISO frame polarity
 * Correct max packet size for high-speed ISOC operation

Change-Id: I2c0d40b5f8d0e1e4cf43369631f17c7f80c6fab2
2026-08-11 13:43:24 -04:00
Aidan MacDonald
444c9ce4bd manual: add touchscreen settings section
Change-Id: I5b9196fb79e7b67a4ac013fe10b8ad462cb8bfa8
2026-08-11 12:22:19 +01:00
Michael McAllister
ef20bc4c78 usb: keep the USB Serial setting across connects
Debug -> USB Serial calls usb_core_enable_driver(USB_DRIVER_SERIAL, ...), which sets a flag inside usb_core. usb_core_init() clears every driver's enabled flag on each connect and runs after the toggle, so the choice is gone before any descriptor is built: the menu reports the new state and nothing changes.

Hold the setting in firmware/usb.c and reapply it from usb_configure_drivers() on each connect, which is where the other drivers are already configured. usb_set_serial()/usb_get_serial() sit alongside usb_set_hid(), which works this way for the same reason.

toggle_usb_core_driver() goes with it: toggle_usb_serial() was its only
caller, and a generic wrapper around a call that cannot persist is not worth keeping.

Affects any target building USB_ENABLE_SERIAL.

Change-Id: I171a532d23cc9cf0efe0a01c2836b69846333a4d
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:32:36 -04:00
Michael McAllister
6ad1fd074a usb: acknowledge SET_LINE_CODING in the serial driver
usb_serial_control_request() copies the line coding and returns handled = true without calling usb_core_control_response(). usb_core only answers requests a driver declines, so returning handled makes the status stage the driver's responsibility and nothing sends it. The host sees the request accepted and then times out waiting for status.

Every other branch in this function already responds but this one was missed.

Affects any target building USB_ENABLE_SERIAL. The symptom is a CDC console that enumerates and then stalls when a terminal opens it and sets the line rate.

Change-Id: Icd97805971c68ce3a599cf01e9f6aa103c61c2ec
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:30:53 -04:00
Michael McAllister
233ea05ea2 x1000: set the NAND driver's init guard so setup runs once
nand_init() guards its one-time setup with a static `inited` flag that
nothing ever assigns, so every call re-runs the initialiser. That resets
refcount to 0 on a driver another caller may already hold open, and the next nand_close() then decrements from zero and tears the driver down underneath its user.

Assign the flag, and fix the caller that reaches this. On a failed open the installer's updater_cleanup() would call nand_close() against a driver nand_open() never took a reference on, because nand_open() only takes one once it has identified the chip; release the lock and drop the pointer instead.

Change-Id: I88d54ac5bca9bcebb62fd9c6f50f1acf982a9a3b
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:26:23 -04:00
Michael McAllister
fae5c8d067 x1000: don't close fd 0 when a bootloader backup fails early
backup_bootloader() and restore_bootloader() initialise `fd = 0` and their error paths close it unconditionally. Any failure before the file is opened updater_init(), or the size check between them therefore reaches close(0) and closes whatever fd 0 happens to be. On a native target that is whatever the filesystem layer handed out first, so an unrelated open file is closed and the damage surfaces somewhere else entirely.

Initialise to -1 instead, which is the value close() ignores.

Found by inspection while bringing up another Ingenic target. Not run on
X1000 hardware.

Change-Id: Ib043f79f0b7edc7c70ccd77cbff54e264ed2b2de
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:20:49 -04:00
Michael McAllister
a13368d0d6 axp2101: fix the enable test in axp2101_supply_get_voltage()
The enable check read

    if(r & (1 << info->en_bit) == 0)

`==` binds tighter than `&`, so this evaluates as `r & ((1 << bit) == 0)`,
i.e. `r & 0`, which is always false. The check never fired, and a supply
that was switched off reported the voltage it would have had if enabled.

Callers cannot tell "off" from "on at this voltage", so anything reading a rail back to confirm it came up gets a false confirmation.

Found by inspection while bringing up another Ingenic target. Not run on
X1000 hardware as I do not have one of these devices.

Change-Id: I19fc89ff33cce047160d826ce2344cc34b26e224
Co-Authored-By: Claude Opus 4.8
2026-08-10 14:32:54 -04:00
Solomon Peachy
612453da48 FS#13979 - rbutil: fix Talk file exclusion options and initial focus (Alessio Lenzi)
1. The "Ignore files" checkbox was saved in the settings but not
   consulted when starting generation. Patterns from the text field were
   therefore applied even when the checkbox was unchecked. The pattern list
   is now passed to TalkFileCreator only when the option is enabled.

2. Ignore patterns were converted to regular expressions by replacing only
   '*' and '?'. Other regular-expression characters were left unescaped and
   matches were not properly bounded. The patch uses Qt's
   wildcardToRegularExpression() conversion instead.

3. The Talk generation dialog initially focused "Strip Extensions" because of
   widget creation order. It now explicitly focuses the folder tree, matching
   the task flow and making keyboard and screen-reader use more predictable.

4. The handling of talkclips.ignore is also corrected so that files below a
   marked directory are skipped recursively. Previously Rockbox Utility could
   generate talkclips.ignore.talk and clips for files below .rockbox even though
   .rockbox/talkclips.ignore was present.

Change-Id: I1f9f14ed7fc057bc254f62148a7ef8ffb69425ed
2026-08-10 11:05:44 -04:00
Solomon Peachy
0726ec9351 FS#13978 - rbutil: Improve GUI responsiveness during voice/talk file generation (Alessio Lenzi)
Voice file and Talk clip generation currently run synchronously in the
GUI thread. During long TTS operations this prevents the progress window
from processing input and accessibility events. On Windows this makes
the progress list unavailable to screen readers such as NVDA and can
make Rockbox Utility appear to be hung.

The attached patch moves VoiceFileCreator and TalkFileCreator to
low-priority QThreads while keeping ProgressLoggerGui in the GUI thread.
Progress and log signals are delivered through queued Qt connections.

Cancellation remains available while a synchronous TTS request is
running. The abort flags used across threads are atomic and the abort
signal is sent through a direct connection. Worker objects and threads
are deleted through the standard finished / deleteLater lifecycle.

Talk generation now passes all selected folders to one worker and
processes them sequentially, emitting the final done signal only once.
This preserves multiple-folder selection without starting work in the
GUI thread.

Change-Id: I58aa66333d43e1be249c84e0cf46c17c119a8360
2026-08-09 15:54:58 -04:00
Skye
85c1ff8667 change build scripts to make reproducible builds possible
- makes SOURCE_DATE_EPOCH affect BUILDDATE and version string
- makes wpsbuild.pl output deterministic
- omits unnecessary extended metadata from zip files
- runs strip-nondeterminism on zip files if REPRODUCIBLE_ZIP is set

Change-Id: I1617e3f5233b2bc356fcfa6457be1a7785c303f9
2026-08-09 10:29:48 -04:00
Solomon Peachy
21e95258f2 FS#13977 - rbutil: fix SAPI5 TTS test output and playback (Alessio Lenzi)
After the SAPI5 error handling added for FS#13972, the Test TTS button
can fail with SAPI error 5 even though the engine and voice are
configured correctly. The test also destroys its QSoundEffect and
temporary file before asynchronous playback can complete.

Config::testTts() used a QTemporaryFile with no .wav extension.
TTSSapi::voice() removes the requested output before synthesis so that a
stale file cannot be mistaken for successful output. SAPI SpFileStream
was therefore asked to create an extensionless output file and returned
error 5 (invalid procedure call or argument).

After successful synthesis, QSoundEffect was allocated on the stack, its
loop count was set to zero, and the temporary file was removed when
testTts() returned. This does not allow asynchronous playback to
complete reliably.

 * create a temporary directory and requests an initially
   nonexistent tts-test.wav inside it;
 * keep the directory and generated wave file alive for playback;
 * keep QSoundEffect alive until playback finishes or fails;
 * request one playback and clean up all temporary data afterward.

Change-Id: I8e482ab846e6445889118e121025ec48d3776d6b
2026-08-09 08:00:50 -04:00
Roman Artiukhin
eecd4ec98b hiby: r1_patcher: fix sd hotplug on newer firmwares
flush mount option is no longer available.

Change-Id: I2380c1adcd2c2ba914db492eff1ed49bb45cb30c
2026-08-08 22:12:31 +03:00
Roman Artiukhin
4f65dfa649 hiby: r1_patcher: add separate pack/unpack/inject-app options
Change-Id: I87f513b55b1cb58b6c1c3f307fcb734e36bda8e3
2026-08-08 22:12:31 +03:00
William Wilgus
49600dd77c filebrowse.lua add sort by type, add .bmp, .mod to known filetypes
also extends date and size examples to show the size and timestamp
respectively

Change-Id: Ife2b74a8a60a6da097f1f714ebaf68a60d504287
2026-08-07 09:05:59 -04:00
Solomon Peachy
f44bf5c66d FS#13974 - Updated Russian translation (Ivan Romaniuk-Mikhailovsky)
Change-Id: Ie5d42c11e1811beb486ee12c0b7cd2cdf2703d38
2026-08-07 08:48:05 -04:00
Solomon Peachy
21d48d5ae3 iap: Improve IAPGeneralCommandID_RequestIPodName
iap-serial was hardcoded to return "ROCKBOX", and it was
not implemented at all in iap-usb.

Extend the iap-serial implementation to return the contents of
<ROCKBOX_DIR>/playername.txt, or "Rockbox" if there is an error
opening/reading that file.

And cut-n-paste this into the iap-usb side of things

Change-Id: I9d328be390b4cc8bd92237f996c41ef1e5e19724
2026-08-07 08:48:05 -04:00
Solomon Peachy
2d2b03d314 build: Bundle the main .map files into the zip file
This covers the rockbox binary (or bootloader), which increases the zip
file by 60-80k depending on the target.

It currently *excludes* codecs and plugins, which can add over 1MB to
the zip file.  We can revisit this when/if we move to distributing 7zip
files instead.

Change-Id: Iec72dd3aa634ceca716975c13b7fa8707a485d30
2026-08-06 09:46:10 -04:00
Roman Artiukhin
20f4f9539a hiby: usb dac: fix crackling sound due to sample rate mismatch
Both Ubuntu and Windows fail to report the proper sample rate on my machines, causing crackling sound on my hiby r1. Since we explicitly specify the only supported sample rate (48 kHz), just ignore the reported value.

Change-Id: Ie6e85bf94f9e15fca0c968441d5a8ce5a0088b77
2026-08-05 19:27:41 -04:00
Skye
290b06c869 plugins/fft: do not starve other threads
Change-Id: If8149086ed6e946d300ecdecf1f47dcf294822cb
2026-08-05 16:18:03 -04:00
William Wilgus
dcdb539ca5 FS#13970 - lcd_drawline() different depending on drawing direction try#2
Last patch didn't swap both x and y so was wrong and messed up the coord pair
I didn't want to add more swapping due to extra overhead

ultimately the issue is that you have 1/2 pixel error (-1 0 1)
and when doing the reverse line the error is on the wrong side
so instead get the first point from the opposite dinc

Change-Id: I141c4af36a601314f2b509a9ebfcfab3b5213bcd
2026-08-05 11:43:10 -04:00
William Wilgus
20c763ff89 FS#13970 - lcd_drawline() different depending on drawing direction
swap x1/x2 and y1/y2 rather than negating the increment

Change-Id: I16c37ab00c2a9a7f97768da68508c2d5c98a14c5
2026-08-05 10:21:34 -04:00
Hemant Kumar
b217a55059 ipod6g: Add inline earphone remote support
Decode the jack remote's play/pause and volume buttons via the
"Mikey" controller (I2C 0x72) and report them as multimedia keys so
they work on every screen, like the OF. Protocol reverse engineered
on-device, notes in mikey-6g.c.

Change-Id: If5f3d3abf043c0ce0d8ca7beb0f4b591e41c5c43
2026-08-05 08:40:24 -04:00
Solomon Peachy
a467bfc55f FS#13972 - Improve rbutil SAPI5 stability (Alessio Lenzi)
The existing code treated any ready-read notification from cscript as
proof that synthesis had completed. The SAPI script can emit other
output, so the Utility could check for the wave file before the explicit
SYNC reply and report that the output file did not exist.

The script also used global "On Error Resume Next" without reporting
errors from SpFileStream.Open(), SpVoice.Speak(), or
SpFileStream.Close(). Several waits had no timeout, allowing the GUI
thread to remain blocked indefinitely.

The changes:

 * reports SAPI COM errors to Rockbox Utility;
 * verifies that SAPI actually created the requested wave file;
 * waits for the explicit SYNC reply instead of any process output;
 * applies finite timeouts to vendor queries, synthesis, and shutdown;
 * terminates a stuck private cscript process safely;
 * restarts cscript and retries the current string up to three times when a
   third-party SAPI engine stops responding during a long generation run.

Change-Id: I2cf2aefb704353c648bef0c4312f35282ac4e25d
2026-08-04 17:03:50 -04:00
Solomon Peachy
1b6767a7d7 FS#13972 - Fix crash creating voice files under Windows (Alessio Lenzi)
VoiceFileCreator::createVoiceFile() stored corrFile as the address of a
local QTemporaryFile (or a local QFile used as fallback). Both objects
were destroyed before VoiceFileCreator::create() called
TalkGenerator::setLang(), leaving a dangling pointer.

On Windows this produced an access violation in RockboxUtility.exe
immediately after the voice strings had been read. Windows reported
exception 0xc0000005.

The change gives the corrections file QObject lifetime under
VoiceFileCreator, uses the built-in corrections file as a persistent
default, and replaces it with a persistent extracted QTemporaryFile when
extraction succeeds.

Change-Id: I29a371d2431021833676dec2b875186a3c021b13
2026-08-04 17:03:50 -04:00
Solomon Peachy
b4db6ffbff FS#13971 - Updated Italian translation (Alessio Lenzi)
Change-Id: I97feb3f5558b6ba1b241c1f402bdd963ce8da273
2026-08-04 09:29:07 -04:00
Solomon Peachy
ab863dc40c iap: Clean up use of logf.h
Change-Id: I4f4a0faca42345cb8f9c8018a662377df9f58776
2026-08-02 13:57:03 -04:00
Solomon Peachy
aa99dc51c1 Translation updates:
* Moldavian (Mihai Alexandru Vasiliu)
 * Romanian (Mihai Alexandru Vasiliu)
 * Simplified Chinese (Wang Ji)

Change-Id: I586102fc47999667dec959f9f846ddd10061ad5f
2026-08-02 09:34:25 -04:00
Solomon Peachy
104f57252b iap: Increase the IAP thread's stack size from 6K to 8K.
iAP accessories that query the track information via mode3/mode4 result
in a call to get_metatada(). This routinely overlows the current 6KB
thread stack into the iAP RX buffer, possibly corrupting the current iAP
packet being received/processed.  Bumping this to 8K should yield over
1K of headroom.

(The tagcache scanning thread uses a 16KB stack in comparison)

Inspired by commit 99b21cd6c on the rockpod fork. (Nux Li)

Change-Id: Ibe997f3ae9dab2dcc2d9947f0b49d206a5b006b6
2026-08-02 08:52:52 -04:00
Solomon Peachy
00bf7f97ba rbutil: Support building with QT 6.6
Without this we'd need 6.7 or newer, which isn't that big of a deal except
we want to support producing RHEL9-based AppImages.

Change-Id: I931be94400d0d19af7fba498f46f174f51a4cd8b
2026-08-01 13:07:44 -04:00
William Wilgus
511d4dd90b FS#13876 strcasestr doesn't finds utf8 characters
fisxes regression from afb0e84

Change-Id: I44e2cd481300ed73aec82aaa65474132fd544b7c
2026-07-31 20:34:39 -04:00
Solomon Peachy
94ce143e06 Translation updates
* Polish (Adam Rak)
 * Slovak (Matej Golian)
 * US English (myself)

Change-Id: Ic74865b833189df091be97fd0e286c63bb2de36b
2026-07-31 09:15:32 -04:00
Gilad Schnurmacher
b5d512c409 iriver H300: fix remote-hold boot entry
Holding HOLD on the remote while powering on was incorrectly
detected as a bootloader mode entry request because remote_type()
was not yet initialized. Add sleep(HZ/8) after lcd_remote_init()
and re-check remote_button_hold() only if a remote is detected.

Fixes erratic bootloader entry on remote-connected H300.

Change-Id: Ic042cf5ff40713e93b2096d4ee48d7e1001ce4a5
2026-07-31 09:08:06 -04:00
Skye
e764656ab7 Allow customizing EQ filter types
Allows any EQ band to be set to any of Low Shelf, Peak, or High Shelf, instead of hardcoding the types per band.

Change-Id: I470ab916359092ba465e7b6331baed3bf11b2fc9
2026-07-30 07:48:45 -04:00
William Wilgus
1007216fc4 FS#13961 - Add audio status, file_attr constants to lua
use require "audio_status" to use the new AUDIO_STATUS_ defines
use require "file_attrs" to use the new FILE_ATTR_ defines

Change-Id: If0b3b612e92e9e5b361a9487ccca2d40f79a953e
2026-07-30 07:07:39 -04:00
Christian Soffke
db87622e7d fix yellow in 3af4e20
Change-Id: Ia0963934176ff4759a94af5bfe33fc61c95226fc
2026-07-30 12:53:00 +02:00
Christian Soffke
3af4e20792 skin_engine: fix div by 0 for %pP tag
Fixes possible crash during playback with
'Auto-Change Directory' setting enabled.

When the currently playing directory changes, the
skin may be updated on the main thread while the
playback thread is executing create_and_play_dir
and has yet to add any indices to the newly created
playlist.

Introduced in commit 41d5ca3.

Change-Id: I6e930f2db546c7690b362ba8c1a4907d0348ff52
2026-07-30 06:18:09 -04:00
Vencislav Atanasov
d42dcdcba2 rbutilqt/themeeditor: Allow specifying the Apple code signing ID using an environment variable
Co-authored-by: ChatGPT-5.5
Change-Id: Idd4624c7851f7fa37afac4de59f319e0087d0bc6
2026-07-29 22:55:40 +03:00
Solomon Peachy
58d4d2b221 desktop: Drop the 'version' fields
They refer to the *desktop file specification* not the application version

Change-Id: Ib35f460c73aae40961255826f0c767a22cb5b518
2026-07-29 10:27:35 -04:00
Christian Soffke
c54dddc2ac playback: fix Playlist Single Mode pause behavior (31dfd5da2e)
Don't pause after every track when playlist hasn't changed

Change-Id: Ic4f0261bb96ac1883c8d5857d0dd9db47b2e2c69
2026-07-28 19:54:59 +02:00
Roman Artiukhin
31dfd5da2e playback: add Playlist Single Mode option
Change-Id: I27c782ad246135fa6c98b52ed1491e86a7dfd456
2026-07-27 22:22:46 -04:00
Solomon Peachy
5f129ef299 tools: Update mkinfo to handle the echor1 target's symbols
With this change, RAM size is computed (and reported) properly.

Change-Id: I4ead8f677c69b78141b137e05d9da942dd4d8138
2026-07-27 20:27:30 -04:00
Michael McAllister
4f6aac445f hiby: raise the plugin buffer to 2MiB on the 64MB targets
PictureFlow refuses to start on the larger panels in this family with
"Not enough memory for album art cache", no matter how small the
library is.

It is PF_PLAYBACK_CAPABLE here, so it deliberately takes the plugin
buffer instead of stealing the audio buffer in order to keep playback
running. It then gives a quarter of that buffer to its album art cache,
which needs DISPLAY_WIDTH * DISPLAY_HEIGHT * sizeof(pix_t) bytes:

  HiBy R1        480x800  ->  400x533  ->  416 KiB
  HiBy R3 Pro II 480x720  ->  360x480  ->  338 KiB
  Surfans F28    320x480  ->  240x320  ->  150 KiB

A quarter of 512KiB is only 128KiB, so all three fail the check before
they ever look at the library. The rest of the family tops out at
320x240 and needs at most 68KiB, which is why the old value went
unnoticed.

Most hibyos devices only have 32MB of RAM in total, and the OS and its
daemons eat about two thirds of that, so there is nothing spare to hand
out and the buffer stays at 512KiB. The three affected targets happen to
be exactly the 64MB ones, and they are also the only members of the
family configured with MEMORYSIZE >= 16, so key the size off that.

Plugins are dlopen()ed on hosted targets, so pluginbuf is plain BSS and
plugin.lds/DRAMSIZE do not apply.

Change-Id: I38db01231bbb8d139cb2239623a79250e0e46b61
2026-07-27 08:03:54 +01:00
William Wilgus
24c3779146 rbsettings.lua add routines to write settings
supports most settings and status items allows writing
rockbox settings from lua

Change-Id: I852489fd9819c8f7147c922e1d03c4ed9ebafa53
2026-07-24 12:45:20 -04:00
Roman Artiukhin
8d84986fc0 pcm_mixer: fix active_channels handling in mixer_handle_sampr_change
`channel_stopped` compacts the `active_channels` array, so we should check the same index for the next active channel.

Change-Id: I54c42f9b6c97f0c54d43b8faae0052e856f3c06d
2026-07-23 21:17:13 -04:00
Roman Artiukhin
958e84c042 codec: flac: fix playback of certain files
Use flac_seek by time even when elapsedtime is 0, and apply it as a fallback for failed offset seeks since it provides more robust error recovery.

Change-Id: I438888fba02bda38137f3f1347bb1f657ef9c166
2026-07-23 20:27:57 +03:00
Michael McAllister
dbd53ef8ae hibyr1: implement USB DAC
Implement the USB Audio Class DAC on the HiBy R1 and R3ProII, driven by
the usb_audio setting from the scaffolding patch: the host plays audio
over USB and the player's CS43131 renders it.

The vendor kernel provides a UAC gadget function "uac_sa" whose char
device /dev/uac_sa delivers the host's PCM: the isochronous OUT frames
are converted to left-justified S16-in-S32 stereo and queued in a kernel
ring, drained with a non-blocking read(). The data path lives in
usb-dac-hiby.c -- a pump thread drains /dev/uac_sa into a small
single-producer/single-consumer ring and the mixer callback hands that
PCM to the codec through the normal ALSA output path. No resampling is
needed because Rockbox clocks the codec at the host-negotiated rate.

The DAC is built on the existing configfs gadget and binds the UDC like
ADB, while usb_power_only keeps the USB thread out of the way. In charge
mode it is a standalone self-bound gadget. In adb mode it is composed
alongside adb on one gadget so the host gets a sound card and adb at
once; uac_sa must be the first-linked function (audio interfaces 0-1)
because the vendor function hard-codes its interface numbers.

The pump is hardware-only, so usb-dac-hiby.c is excluded from simulator
builds; the usb_audio_get_active() playback-interlock stub lives with the
scaffolding.

The R3ProII shares this hosted HiBy port and the same userspace gadget,
and the data path is codec-agnostic, so nothing here is R1-specific.
Only the R1 has been validated on-device.

Co-Authored-By: Claude Opus 4.8
Change-Id: I64c57ede27f411a2c61d41a7e0fa127b51a7b5b9
2026-07-22 15:22:46 -04:00
Michael McAllister
ea775fa501 hibyr1: add USB DAC scaffolding
Introduce the generic, target-agnostic pieces for a gadget-driven USB
Audio Class DAC, gated by the HAVE_HOST_USB_AUDIO target flag so they stay
inert unless a target opts in.

Rather than adding a new USB mode, reuse the existing usb_audio setting
(never / always / while charge-only / while mass-storage) with its
LANG_USB_DAC string, usb_set_audio() callback and the
PCM_MIXER_CHAN_USBAUDIO mixer channel. HAVE_HOST_USB_AUDIO becomes the
umbrella capability flag for this common code; USB_ENABLE_AUDIO stays the
native usbstack class-driver contract (which needs HAVE_USBSTACK and so
cannot be used by hosted ports whose kernel owns the USB controller).

usb_set_audio() is declared here and implemented by the target (natively
by the usbstack driver, or in the hosted port for gadget targets, as with
usb_audio_get_active()), and applied at settings load. The playback
interlock in wps.c/playback.c keeps local playback from mixing with host
audio while the DAC is active. Simulator stubs for usb_set_audio() and
usb_audio_get_active() keep sim builds linking.

Co-Authored-By: Claude Opus 4.8
Change-Id: I5b7738508c24721d91d4c32379102a1ac7c6228b
2026-07-22 15:22:46 -04:00
Michael McAllister
8acd1c14d6 kernel: avoid divide-by-zero in thread_get_debug_info() for zero-size stacks
thread_get_debug_info() computes the current stack usage as
stack_used_current * 100 / thread->stack_size with no guard against a zero
stack size. On hosted targets the main thread has stack_size == 0, so
opening the "View OS stacks" debug screen divides by zero and panics with a
floating point exception.

Guard the division and report 0% when the stack size is unknown, which
matches the stack_usage() helper.

Likely affects all hosted non-SDL targets, but tested/confirmed on my
HiBy R1.

Change-Id: I8ecc56f53f1e97e8a59ca71c0e08a66093fecbae
2026-07-22 09:34:04 -04:00
Solomon Peachy
91774611cd uisimulator: Get rid of long-obsolete stub for mpeg_set_pitch()
Change-Id: Icbfa6917d0108d12a4428c8fe512c0a48385cdaa
2026-07-21 14:56:06 -04:00