upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/gameinput.cpp
AgeCommit message (Collapse)Author
7 daysImprove first-run input diagnosticsZroFreaks
7 daysMerge #2144 from klikso: a scripted press can be held longer, ↵Jan Trencansky
button@seconds:hold (INPUT-SCRIPT-HOLD) Head 7bd4cec02. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 daysgameinput: LEONIDA_INPUT_FILE presses buttons named in a file while the ↵Jan Trencansky
title runs A local tool for headless runs, whose private display passes no keyboard input to Wine: every line appended to the file names one button of the script's table and becomes a press at once, held like a scripted press (300 ms and six readings, at most 5 s), so a run can be driven step by step from the shell while its screenshots are read. The file is read again at most every 250 ms. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 daysgameinput: the SDL keyboard pad honours a scripted hold tooklikso
#2098 gave the SDL path its own loop (held 300 ms, then until the title has read the pads six times, at most 5 s), which ignored button@seconds:hold. A press now lasts its own hold, then the read latch, and never past 5 s or its hold if longer. The long-script test checks both: X kept past 300 ms until six reads, Y kept for its 0.6 s after them. It fails on the old loop. Found by AndreiKocherzhinskiiA on #1608. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 daysImprove post-load GPU memory and pipeline handling (RT-POST-LOAD-GPU-MEMORY)Moriz82
Fall back to a dedicated buffer allocation when the shared arena fills. Update console descriptors and resource backing, preserve pipeline cache entries, and replay mesh records using bounded indirect arguments. Keep scripted input available until read and cover the runtime and translator paths with synthetic tests. Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> Co-authored-by: ivanepsilondelta <264061546+ivanepsilondelta@users.noreply.github.com>
8 daysRT-INPUT-SCRIPT-NO-SDL3: serve LEONIDA_INPUT_SCRIPT without SDL3Jan Trencansky
A build without SDL3 answered GameInputCreate with no devices and E_NOTIMPL for every other slot, so the title waited at its first "press A" prompt forever: no CI artifact or offline build could get past it. With LEONIDA_INPUT_SCRIPT set, gameinput_no_sdl.cpp now serves one scripted pad (an Xbox One gamepad) driven by the script alone: device enumeration through RegisterDeviceCallback (blocking, async, dispatcher), FindDeviceFromId, and GetCurrentReading/GetNextReading/GetPreviousReading whose gamepad and UI navigation state follow the script. Readings are taken when the title asks, so no thread polls. Without the variable it behaves as before. The parser, the 300 ms timeline, the button names, the press log lines and the UI navigation mapping move from gameinput.cpp into gameinput_script.h, which both shims use; nothing in it needs SDL. gameinput.cpp checks the shared SDL button numbers against SDL_GamepadButton at compile time. gameinput_no_sdl_test --input-script (CTest gameinput_no_sdl_script) checks the scripted pad on a fake clock. Docs: runtime/README.md, docs/gameinput.md, docs/linux_proton.md, docs/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 daysMerge main into RT-PROTON-STORY-LOAD (#984)Jan Trencansky
Merges main at 1154976d4 into the integration branch at 273b3bdf9 (merge base ece4ba5b3). 42 files conflicted; this commit is the resolution only. Build and test repairs follow in their own commits. Rule of resolution: where both sides added different things, both stay; where both made the same change in two forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two changed the same code for different purposes, both purposes are kept. Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h, d3d12_xs_desc_clean.h, registry.cpp): - d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and list slot 139 (#396). - Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider pc_resource_desc, S_OK for queue slots past the PC table. - Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base list proxy, its null-view slot 70 and its refusing slot 133. Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp): - Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra cases added; main's --env-slots-74 and #984's --env-slots-70. - Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy, the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases. D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h, frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp, d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp, vk_pipeline_check.cpp, vk_test_device.h): - Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's origin, so both pools run on disjoint sets of textures. - frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter. - main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4 stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980). - shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it. - Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it. Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp, runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp): - ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file. - gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries. - Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped. Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1, make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py, runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md, runtime/README.md): - Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake. - rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped. - shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags. - shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants. One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
9 daysgameinput: keyboard pad input scripts of any length (RT-INPUT-SCRIPT-LENGTH)Moriz82
Main had no keyboard pad script scheduler. Add timed button presses with a full-length environment reader so entries beyond byte 63 reach the pad. Combine scheduled and physical presses. Reject malformed entries and report their count when the script is read on the first pad update. Build gta6rt and gameinput_test. Exercise a long script, rejected items, focus loss, configuration reload and release under Wine. Restore only the old environment reader to reproduce the missing presses. Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> AI-assisted (Codex and Claude Code agents). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
9 days[integration] Linux/Proton and native Windows: boot through the story load ↵Moriz82
(RT-PROTON-STORY-LOAD) One squashed commit of a fork that was developed on a Linux/Proton machine and tested on two native Windows machines. On all of them the retail 1.0.2.1 package now launches, shows its launch movie, first-run pages and landing prompt, runs the story load to its end with the loading slideshow drawing its artwork, and enters the world phase. A first world frame is not verified yet. docs/linux_proton.md has the setup, a healthy boot's timeline, the machines and where it stops. Runtime: frames in the title's own window; DirectStorage pinned reads, page-list scatter/gather, BCPack and unshuffle with a locally generated predictor file; pooled, device-local and deferred image backing for streamed and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table that degrades instead of refusing a submission; a descriptor hash finalizer (off until a library carries it); directly indexed heap offsets for compute dispatches and VS/PS/GS draws; title buffer windows outside a fragmented arena; opt-in device-local copies of streamed buffer views; write-fault retries under the tracker lock, shared trackers and write-watched title memory for native Windows; device-loss, compute-input and memory probes. Translator: loop bounds at structured exits, the eight FidelityFX programs that use a packed-dot form the disassembler skips, buffer bounds modes per view kind, a compaction option, the hash finalizer option. Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows boot script, the paired compute translation script. No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted by people on the machines named in docs/linux_proton.md. Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
10 daysgameinput: serve GameInput.dll's ordinal 1, the retail executable's ↵Gustavo Kissel
GameInputCreate import The retail executable imports GameInputCreate from GameInput.dll by ordinal 1. The loader looks ordinal imports up as "#1", which the shim table did not have, so the import bound to the host's GameInput.dll. On Windows the installed GameInput answers; under Wine it is the builtin stub, the call fails and the title stops on its result. The alias maps #1 to the same GameInputCreate, and gameinput_test checks it. (cherry picked from commit 5e45c7da942d7ac08fc57561e9ed924bcfc76476)
10 daysMerge remote-tracking branch 'origin/pr/9765'ItsNotRexed
10 daysgameinput: the device info has its GameInputLabel membersMaraco91
gameinput_abi.h left out the labels of the public v0 layout. In GameInputControllerAxisInfo and GameInputControllerButtonInfo a label sits at offset 4, in what is otherwise padding, so the sizes matched while isContinuous, restValue, legacyDInputIndex and rawReportIndex were four bytes early. GameInputGamepadInfo and GameInputUiNavigationInfo are tables of 14 and 21 labels; they were declared empty, and the pointers in GameInputDeviceInfo led to one-byte members, so a title reading a label read whatever followed. The header declares the enum, the two tables and the two label members and pins each offset that moved. fill_info gives every control the Xbox label of its position on every pad, since every pad is presented as an Xbox One pad. gameinput_test reads the tables by the public header's byte offsets, so the shim's own header cannot agree with itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
10 daysGameInput: honor the delay between trigger haptic pulsesmrbrinker
10 daysgameinput: include <cstdint> for UINT64_MAXNoname0202
SetHapticMotorState's saturating end time uses UINT64_MAX, which gameinput.cpp only got through a transitive include. Include <cstdint> directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 daysgameinput: SetHapticMotorState saturates a request's end time instead of ↵Noname0202
wrapping IGameInputDevice::SetHapticMotorState computed the end of a request as duration * playCount + repeatDelay * (playCount - 1), then now + total, all in uint64 microseconds with no overflow check. A very long request wrapped: duration = UINT64_MAX with playCount 1 put the deadline just before now, so the motor never played, and duration = 2^63 + 50 ms with playCount 2 wrapped to a 100 ms request that stopped early. The products and sums now saturate at UINT64_MAX, a deadline the poll thread never reaches, so such a request plays until the state is set again. Requests that fit are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysMerge pull request #4553 from Maxime MansietItsNotRexed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysMerge pull request #4552 from Maxime MansietItsNotRexed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/gameinput.md
11 daysMerge pull request #4102 from Felix CroasdaleItsNotRexed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysMerge pull request #3851 from Leonida local testItsNotRexed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysgameinput: a reading callback's inputKind filter checks what the device supportsMaxime Mansiet
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
11 daysgameinput: GetRawReport holds hid_mu while it reads the raw reportsMaxime Mansiet
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
11 daysgameinput: the poll thread no longer revives a force-feedback effect being ↵Felix Croasdale
released (RT-262) ForceFeedbackEffect::Release() drops the count to 0 and deletes the effect; its destructor then waits for g().mu to unlink it from the device. In that window apply_effects (holding g().mu) could AddRef the dying effect from 0 to 1, sync it after it was freed, and delete it a second time with its own Release (@AAyberkU's finding). apply_effects now takes a reference only on a live effect (add_ref_if_live: a compare-exchange that never moves a count up from 0), so an effect whose last Release ran is skipped. gameinput_test: add_ref_if_live itself, and 20,000 effects created and released while a second thread runs the poll step. With the old AddRef that run ends in STATUS_HEAP_CORRUPTION (0xC0000374) every time here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysgameinput: report SDL's effect result from gameinput_probe (RT-160)Leonida local test
`--force-feedback` now reads the shim's output state once the poll thread has picked the effect up, and says whether SDL created it and is running it, or why it did not, so a wheel owner can tell a silent drop from a real run. The shim records SDL_CreateHapticEffect's id, SDL_RunHapticEffect's result and SDL's error text per device; gameinput_test asserts the success and the refusal. AI-assisted
11 daysMerge pull request #3685 from ICUMADETHISItsNotRexed
11 daysgameinput: track which kind of device the player used lastICUMADETHIS
The shim tells the title every pad is an Xbox One pad, so nothing could say what the player is really holding. rt::gameinput::active_input() now returns the family of the device used last (Xbox, PlayStation 5, PlayStation 4, PlayStation 3, Nintendo, or the keyboard pad), a generation that counts changes, and whether LEONIDA_PROMPTS forced it. It is groundwork for button prompts that follow the device in use. Only deliberate input counts: a button going down, a trigger past 0.3 or a stick leaving a 0.35 radius. Held input, stick drift and noise do not; a pad's first reading after it connects is its baseline; and after a change the next one waits LEONIDA_PROMPTS_SWITCH_MS (300 ms). The rules live in runtime/src/active_input.h with no SDL, tested by active_input_test; gameinput_test drives them on SDL virtual pads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysMerge pull request #3172 from Bora SevimItsNotRexed
# Conflicts: # docs/gameinput.md
11 daysMerge pull request #2567 from marqueziniItsNotRexed
11 daysMerge origin/main into rt-175-raw-hidBora Sevim
Keep RT-160's force-feedback interface and tests next to the raw HID ones. The raw HID test fakes are renamed (FakeRawHid, raw_*) so they no longer clash with the haptic fakes. The API table gets one IGameInputDevice row with both feature sets; the stale duplicate IGameInputDevice and IGameInputDispatcher rows are dropped.
11 daysgameinput: raw HID reports and raw device I/O through SDL's hidapi (RT-175)Bora Sevim
The shim opens each pad's HID device with SDL_hid_* (by SDL's device path, else the one game-pad collection with the pad's vendor and product id) and reads its report descriptor for every input, output and feature report's id and size. Such a pad reports GameInputKindRawDeviceReport and GameInputDeviceRawIoEnabled and fills inputReportInfo, outputReportInfo and featureReportInfo (no item tables). Readings carry the newest raw input report, and IGameInputReading::GetRawReport returns it as an IGameInputRawDeviceReport. CreateRawDeviceReport, GetRawDeviceFeature, SetRawDeviceFeature and SendRawDeviceOutput work through the backend; an undeclared id or kind is E_INVALIDARG, a failed transfer E_FAIL, and a pad without a HID device keeps E_NOTIMPL. gameinput_abi.h declares IGameInputRawDeviceReport, GameInputRawDeviceReportKind and the three raw report info structs, checked against Microsoft's v0 header (offsetof for every field, the 12 vtable slots, the IID). Xbox pads on Windows go through XInput, whose HID interface SDL's hidapi skips, so they have no raw I/O; the log says so. gameinput_test covers the descriptor parser and the whole path with a fake HID backend (24 checks); gameinput_probe prints each pad's report tables and newest raw input report. docs/gameinput.md: "Raw HID".
11 daysMerge main (873a952a) into the RT-176 branchmarquezini
11 daysRT-176: Dispatch runs only the batch queued when it startsmarquezini
Review follow-up. Dispatch took events one at a time from the live queue, so readings queued during the call (by the poll thread, or by a callback) were delivered in the same call: with an unlimited quota a busy queue could keep the title inside Dispatch, and each erase at the front made a drain O(n^2) under deliver_mu. Dispatch now swaps out the batch present at entry and walks it in order; events it leaves (quota spent) go back to the front of the queue, ahead of newer ones. gameinput_test adds a callback that queues a reading from inside the call: each Dispatch(UINT64_MAX) runs exactly its starting batch and returns true (the previous version never returned). The docs say so, and the dispatcher row's open column reads a dash instead of a blank.
11 daysMerge pull request #2567 from marqueziniItsNotRexed
# Conflicts: # docs/gameinput.md
11 daysMerge pull request #2552 from Leonida local testItsNotRexed
11 daysgameinput: keep only the haptic calls the shim makes in the test seam (RT-160)Leonida local test
HapticApi carried SDL_GetNumHapticAxes and SDL_HapticEffectSupported, which nothing calls: the motor's axes are the shim's choice and the effect kinds are gated on SDL_GetHapticFeatures. They are gone from the table, its SDL implementation and the test's fake, so the seam is exactly the calls a pad's force feedback makes. AI-assisted.
11 daysRT-176: IGameInputDispatcher::Dispatch honours its quotamarquezini
Dispatch ran the whole queue whatever quota it was given. It now runs queued events oldest first, at least one per call (a quota of 0 runs exactly one, as the GDK documents), takes no further event once the quota has passed, and returns whether events remain. While events remain the wait handle is signalled again, so a title that waits on it before each call comes back for the rest. The automatic path (no dispatcher, poll thread) still delivers the whole queue. gameinput_test checks Dispatch(0), a 1 ms quota against a 5 ms callback, a large quota draining the queue, and an empty queue.
11 daysgameinput: report and drive force-feedback and haptic motors through SDL3 ↵Leonida local test
haptics (RT-160) IGameInputDevice answered the force-feedback and haptic half of the API with nothing: no motors in GameInputDeviceInfo, E_INVALIDARG from CreateForceFeedbackEffect, false from IsForceFeedbackMotorPoweredOn, a no-op SetForceFeedbackMotorGain and E_INVALIDARG from SetHapticMotorState. A pad SDL opens as a haptic device now reports one force-feedback motor with the effect kinds SDL lists, and a pad with trigger motors reports two haptic motors. Force feedback goes to SDL_CreateHapticEffect/RunHapticEffect on the poll thread, so title calls still never touch SDL; the eleven GameInput effect kinds are SDL's eleven force-feedback effects. The trigger haptic motors play their one waveform as an intensity on the existing trigger output. A pad with neither keeps the old answers, and LEONIDA_RUMBLE=0 silences both. gameinput_test drives all of it through a fake haptic backend, because SDL's virtual joysticks report no haptics. AI-assisted.
11 daysMerge pull request #2239 from itsRevelaItsNotRexed
11 daysMerge pull request #2162 from CozmaItsNotRexed
11 daysgameinput: GetTemporalReading stays E_NOTIMPL, as in GameInput v0 (RT-147)itsRevela
Microsoft's reference page says IGameInput::GetTemporalReading "was never implemented in v0" and returns E_NOTIMPL, and v1 removed it, so the shim's E_NOTIMPL already matches the API the title was built against. A history lookup would answer what no GameInput runtime does. The v0 header (NuGet Microsoft.GameInput 0.2303.22621.3038) declares (timestamp, device, reading), the shim's layout; the page's five-parameter form doesn't match it. Pin the behaviour in gameinput_test (E_NOTIMPL with the reading cleared, for past, present and current timestamps, with and without a device filter; E_POINTER for a null output) and say so in docs/gameinput.md instead of listing the method as a gap.
11 daysgameinput: the keyboard pad's right stick reads raw mouse input and keeps ↵Cozma
the cursor in the window GetCursorPos deltas stop at the screen edge and include pointer acceleration. A message-only window on its own thread now registers for raw mouse input (RIDEV_INPUTSINK) and sums the relative counts; the poll takes the difference of that total. Absolute reports are ignored, and GetCursorPos stays as the fallback if registration fails. With raw input on and a window of this process in the foreground, the cursor is clipped to that window's client area (re-applied every 100 ms), and released on focus loss or when the pad is turned off. LEONIDA_MOUSE_SENSITIVITY (0.1..10, default 1) scales the axis units per count.
11 daysgameinput: refine aggregate device reading kind filter and callback guardsSHAURYASANYAL3
11 daysgameinput: implement IGameInput::CreateAggregateDevice and reading delegationSHAURYASANYAL3
11 daysGameInput: motion support via SDL sensors (#660 follow-up)Jack UK
Expose SDL3's gyroscope and accelerometer through the GameInput shim: - gameinput_abi.h: GameInputMotionAccuracy, GameInputMotionInfo and GameInputMotionState with the v0 layouts (Microsoft's public docs), size asserts included. - The shim enables both sensors when a pad with them is opened, reads the latest sample each poll, and reports GameInputKindMotion plus a GameInputMotionInfo on such pads. GetMotionState returns the state as signed fractions of the motionInfo maxima (2 g accel, 2000 deg/s gyro, the shim's choice since SDL exposes no sensor range; VERIFY). All-zero accel means no sample yet, so readings before the device's first sample carry no motion. Magnetic field and orientation stay zero and Unknown: SDL has no compass and nothing synthesises a quaternion. Pads with sensors stream a reading every ~8 ms so motion is not stuck at the last button event; other pads keep the old change-driven behaviour. - GetCurrentReading and GetNextReading with a device filter now reject kinds the device does not support (READING_NOT_FOUND), matching the v0 docs and the device-less path, so a motion query on a plain pad fails instead of returning a reading without motion. - gameinput_test: a virtual pad with SDL sensors covers kind/motionInfo presence, no-motion-before-first-sample, normalisation, accuracy values, the +-1 clamp, the cadence, and the plain-pad rejection. gameinput_probe prints the live accel and gyro fractions. - docs/gameinput.md: a Motion section, the API table, and VERIFY notes for the chosen maxima and the unprovided members. Tested: gameinput_test 185/185 and ctest 90/90 (RelWithDebInfo) on Windows 11 Pro 10.0.26200; SDL3 3.4.20 via -DLEONIDA_SDL3_FETCH=ON. Follows: #660. AI-assisted (ZCode agent).
12 daysgameinput: keyboard pad moves and aims: WASD left stick, mouse right stick, ↵quackottu
mouse buttons LT/RT The keyboard pad only pressed buttons, enough for menus. WASD now drives the left stick (opposite keys cancel, diagonals on the round gate), cursor movement the right stick (decaying back to center), and the right/left mouse buttons the left/right triggers. Everything is released on focus loss. A set_cursor_source seam sits beside set_keyboard_source for tests.
12 daysDistinguish identical connected gamepads in device-ID lookupnicolas
12 daysMerge keyboard-pad coverage with controller reading historynicolas
12 daysKeep gamepad readings in order between title pollsnicolas
12 daysGameInput shim: keyboard pad (LEONIDA_KEYBOARD_PAD)Cozma
The title reads gamepads only, so keys reach it as one more pad: an SDL virtual gamepad whose buttons are pressed from GetAsyncKeyState on each poll. It goes through open_pad/read_pad like a real controller (device object, player slot, readings, callbacks, UI navigation) and reports no motors. Arrows d-pad, Enter A, Backspace B, X X, Y Y, Q/E shoulders, Esc Menu, Tab View. Off by default; =1 reads keys only while a window of this process is in the foreground and releases everything on focus loss, =always ignores focus (console tools). Sticks and triggers stay at rest. gameinput_test drives it through set_keyboard_source with fake keys and focus: 31 new checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 daysGameInput shim: download SDL3 only when asked (LEONIDA_SDL3_FETCH)kotorvr
The shim is built with an installed SDL3 (find_package) or with -DLEONIDA_SDL3_FETCH=ON / FETCHCONTENT_SOURCE_DIR_SDL3; otherwise configure prints a message, gta6rt builds without it, and CTest lists gameinput as disabled. build_runtime.ps1 gains -FetchSdl3 and warns that its cl.exe fallback never builds the shim. Review nits: delivering_thread is atomic, and SDL's own GameInput joystick driver is pinned off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 daysRuntime: GameInput shim on SDL3 (any controller; DualSense trigger effects, ↵kotorvr
lightbar) GameInputCreate and the v0 IGameInput/IGameInputDevice/IGameInputReading/IGameInputDispatcher surface a title uses for gamepads, served from SDL3 gamepads so DualSense, DualShock 4, Switch Pro and Xbox pads all work. Rumble goes to SDL_RumbleGamepad, impulse-trigger rumble to SDL_RumbleGamepadTriggers, and on a DualSense to adaptive-trigger effects through SDL_SendGamepadEffect (LEONIDA_DS_TRIGGERS=off|rumble|resistance). Lightbar via LEONIDA_DS_LIGHTBAR. SDL3 (zlib) comes from an installed package or a pinned, hash-checked release tarball via FetchContent; -DLEONIDA_SDL3=OFF skips the shim. gameinput_test covers the shim on SDL virtual joysticks; gameinput_probe is the manual check on a real pad. docs/gameinput.md has the mapping, settings and VERIFY list. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>