The section the pull request added named the set count wrong (RT_PATCH_COUNT 12 to 14; the table goes from 14 to 16
sets), quoted branch hashes as baselines, and carried the author's audit history and WSL toolchain notes, which do
not describe the current state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With mouse_mode = direct the mouse reached only the cameras the direct hooks cover. Autobuild's placement camera runs
none of them on games 1.4.3 and 1.2.1 and turns by the right stick, so the mouse moved nothing there. mouse_direct.c
now notes each camera step that runs a hook; after two steps without one the mouse acts as the right stick
(input.c mouse_camera), as with mouse_mode = stick, until a hook runs again. A script's MOUSE lines move that stick
too, also under TOTK_INPUT=none, so the path can be tested with scripted input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit read the combo from the merged buttons, where a key bound to ZL is the same bit as the left
trigger: with freecam_pad = zl+zr, the right mouse button and F switched the free camera in play. The keyboard has
freecam_key for that, so the gamepad combo now counts the gamepad and the input script, which stands in for one.
runtime/input.c poll_merged: script_apply writes its buttons into script_seen, which is then merged into the buttons as
before. freecam_gate counts a position of the combo when pad_seen has it or script_seen has the Switch buttons it stands
for; Home stays gamepad only. docs/controls.md ("Free camera") says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
freecam_gate read the combo from the physical gamepad only, so a tester's input script that pressed ZL+ZR+L3
sent it to the game instead (#1213). Each position of the combo now also counts when the Switch buttons it stands
for are down in the merged buttons, as the Minus+Plus menu combo already does; Home has no Switch button and stays
gamepad only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
freecam_key and freecam_pad were F6 and ZL+ZR+L3 for everyone, potentially causing unwanted toggles. F6 is also the
quick save key of #1188. Both are none now.
runtime/cfg.c: the FREECAM_PAD and FREECAM_KEY rows of the settings table default to none. runtime/input.c
freecam_pad_mask reads the combo with cfg_value instead of falling back to its own zl+zr+lstick, so an unset combo is
the table's none like the key. The comments in runtime/freecam.c, runtime/input.c and runtime/ui/menu.cpp
rows_freecam, docs/controls.md ("Free camera") and totk.ini.example say so and keep F6 and ZL+ZR+L3 as examples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
input.c freecam_gate also switches the free camera on a press of TOTK_FREECAM_KEY (f6 by default, none for no key).
While it is on, ZL, ZR, L and R come from the merged Switch buttons, so the keys bound to them (Z, X, Q and R by
default) go down, up and change the speed like the gamepad's; the keys' sticks already flew and turned it. The mouse's
counts are taken in the poll and turn it at the game camera's rate (0.08 degrees a count times mouse_sens, through
freecam_mouse), and input_direct_mouse_sample gives the game's mouse camera none meanwhile; in the stick emulation mode
the mouse arrives in the right stick as before. The Controls tab gets a Free camera key row (off, F2 to F7, F9), with
text in all four menu languages; docs/controls.md lists the keyboard column.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The camera component update (main+0x628460) copies each component's eye, target and up into its sead camera. The site
freecam (main+0x6286d4, the load every path to that copy runs first) calls runtime/freecam.c freecam_hook, which
writes the component's one-shot eye and target overrides (+0x180, +0x198) while the free camera is on; the update
takes them in place of the pose and clears them, so the game camera's own state is never changed and resumes the
frame the free camera ends. The up vector is levelled through the component's up offset (+0x200), which is kept and
put back. Of the three components a frame updates, the hook drives the two that share the player camera's eye, leaves
the one at the default pose and picks again after a load; with the free camera off it does only the displaced load.
input.c freecam_gate latches TOTK_FREECAM_PAD (zl+zr+lstick when unset, none for no combo) like Minus+Plus and, while
the free camera is on, gives it the sticks, the trigger axes and L and R presses and the game nothing. The left stick
flies along the view and sideways, the triggers straight up and down, the right stick turns, each L or R press halves
or doubles the speed (0.25 to 512 m/s, 8 at the start); the flight follows the wall clock. TOTK_FREECAM_PATCH=0
removes the hook.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The texts that came with the audiodrain set (docs/settings.md, totk.ini.example, the comments in patches-v121.txt and
patches-v143.txt) said that above about 200 game updates a second the game switches its sound off. Every run behind
them had captured the mix with audio = none. With a device playing, on Linux with PipeWire, the game keeps its sound at
240 fps without the set.
The guard (1.2.1 main+0x9bcdc4) sets its count back to 0 whenever a free list is there (0x9bce00), which takes two
audio frames between two updates of the game. The mixer's timer renders one frame every 5 ms, so at 240 updates a
second that never happens and the count reaches 300. A device paces the render thread in bursts after each period
(audren.c, gap_ns: 4 ms apart on Linux; 0 on Windows, read from the code and not measured), so it happens several times
a second. Sampled on the render thread on Linux with PipeWire's 1024-frame periods: 200 frames a second either way, 76%
of them 4 ms after the one before with the device, 939 of 940 at 5 ms with the timer. The count and the switch have
not been read in a run.
The mixer also keeps time by its timer while a device takes nothing. Measured at fps_limit 240, same save and input
script, with the game's audio stream paused from outside (pw-cli on its PipeWire node, not a real device stalling)
while the game ran at 240 fps. On 1.2.1 with the set off a pause of 5 s (two runs) and of 2 s (two runs) left the game
silent to the end of the run, also after the device resumed, and a pause of 1 s (one run) did not; with the set on a
pause of 5 s (two runs) left only the gap. On 1.4.3, one run each: silent after a pause of 5 s and of 2 s with the set
off, sound after a pause of 5 s with it on, sound with a device and no pause with the set off.
The numbers without a device now come from runs that can be named: 1.2.1 6 of 119 and 111 of 119, 1.4.3 3 of 119 and
113 of 120 (set off and on). They replace 5 of 118 / 108 of 118 and 2 of 118 / 110 of 119, which I cannot match to a
run any more.
Text only: no code, no site and no default changes. Not measured: Windows, a device with periods of 240 frames or
less, a real device stalling, 1.4.3 with a device and the set on.
Co-Authored-By: Claude <noreply@anthropic.com>
When the game resolution, the HUD width, the button prompts or the pad layout need a folder the install lacks (an
older setup, a failed setup step, a new display), totk.exe starts the setup's generator for it in the background
with the tools build-cache/rebuild.txt names, once per folder and process: at start for the settings in effect
(the resolution output_res asks for, also when the missing layout made this start 16:9), and from the settings
menu once a changed choice has stayed for 1.5 seconds or the menu closes. A missing 16:9 prompts folder is made too,
the PC prompts from totk.ini's bindings. The notes under Game resolution and Button prompts say the files are being
made and are used at the next start; when the tools did not start they say so and Try again starts them again.
The Prepare button is gone. Source builds without rebuild.txt and TOTK_ROMFS_PATCHES keep the old behaviour.
romfs_shape_missing and romfs_shape_prepare become romfs_folders_missing (a mask of the missing folders) and
romfs_folders_prepare; --probe-cfg and tests/romfs_shapes_check.py check the new decisions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prompts = playstation shows the face buttons as circle, cross, triangle and square, L1 R1 L2 R2, Options and Share.
The setup writes romfs-patches-playstation (pad_layout = nintendo) and romfs-patches-playstation-xbox (xbox, auto) on
every install, next to the Xbox folders, and the Shapes step and the settings menu make their shaped folders like the
other styles. playstation-xbox lays the action prompt's diamond out as xbox-label does, cross at the bottom.
Rebased onto dev from pull request #741 by fabiomode2: the shaped folders, hud_width, the Xbox diamond and the
keyboard prompts' text glyphs of dev are kept, and cfg.c's shape default uses input_prompts_folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1. scan_pads took a controller Steam hid when the virtual pad was not up yet and kept it for the session, so Steam's
remapping was lost. While the open pad is a hidden one, pad_physical looks again every RESCAN_MS and scan_pads
moves the buttons to the virtual pad; the hidden controller stays open as motion_extra, so motion goes on with
the same bias and orientation.
2. pad_identity marked " (under Steam)" only on motion_extra; a hidden controller that became the pad lost the mark
and could take the bias calibrated with Steam closed. The mark now follows steam_hidden_id.
3. After pull request #1024: sensors_ready logs SDL_GetError when the pad has both sensors but enabling them failed,
instead of "has no gyro and accelerometer".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game Steam starts gets SDL_GAMECONTROLLER_IGNORE_DEVICES with the controllers Steam reads itself and sees Steam's
virtual gamepad, which has no motion sensors. input.c steam_reveal keeps that list and clears the hint before
SDL_Init (only with motion on); scan_pads still takes the virtual pad for buttons and sticks, so Steam's remapping
holds, and motion_source opens the hidden controller for its gyro and accelerometer only. A bias belongs to the pad
as Steam presents it: " (Steam Input)" or " (under Steam)" in gyro_bias_pad. docs/controls.md, "Steam Input and
motion", says the Steam layout must bind the gyro to something or Steam zeroes it on the Steam Controller.
The patch as posted against 6151ac4, with sensors_ready merged with #1274's restart. Tested by the author on Linux
(Steam Controller) and the Steam Deck; not on Windows.
Co-authored-by: St5sz2Jk <St5sz2Jk@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add native and Unicorn numeric comparisons, switch gating, register and stack preservation checks, and optional local ExeFS anchor validation. Document supported sites and acceptance boundaries.