Repository navigation
Conversation
db45277 to
334e808
Compare
|
Tested f959626 merged onto main 1628210 on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
|
Tested f959626 on NVIDIA RTX 5060 Ti (Blackwell), NVIDIA 621.01 (Vulkan 1.4.357), Windows 11 (26300), VS Build Tools 2022 (MSVC) + Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, SDL3 (
AI-assisted (Qoder): I built the full runtime with MSVC + SDL3 and ran ctest. |
IGameInputReading returned nothing for keyboard and mouse, so a title that reads them through GameInput got no input on PC. With LEONIDA_KEYBOARD_MOUSE=1|always the shim connects a keyboard device and a mouse device next to the pads. Their readings carry GameInputKindKeyboard or GameInputKindMouse only: GetKeyCount/GetKeyState list the held keys (virtual key, scan code, character, dead-key flag; up to 16), GetMouseState the buttons and the cursor's movement summed into relative positions. Keys and buttons come from GetAsyncKeyState with the keyboard pad's focus rule. They stay out of the pad list (no SDL, rumble, battery or player slot), and every reading search, enumeration, aggregate and FindDeviceFromId covers them; a search with no device now filters by kind, so a gamepad query never answers with a keyboard reading. The v0 structs are declared in gameinput_abi.h with static_asserts on their layout. gameinput_test: 21 checks with fake keys, focus and cursor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, non-null nativeLanguage, full key compare From Kam471's review of ItsNotRexed#2413 and @justr4mzi's ItsNotRexed#2426: - keyboardInfo.layout is the active KLID (GetKeyboardLayoutNameW), keyCount the reportable virtual keys with a scan code, functionKeyCount GetKeyboardType(2) (12 if Windows doesn't say). - keyboardInfo.nativeLanguage points at an empty GameInputString instead of null, so a title reading it does not dereference null. - mouseInfo.sampleRate is 500: one sample per 2 ms poll_thread() pass. - A held key whose scan code, character or dead-key flag changes (a layout switch) is a new reading: same_keys compares every field, not only virtualKey. gameinput_test: 226 checks, 0 failures (4 new). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetTouchCount and GetTouchState returned 0. SDL3's touch subsystem lives inside SDL_INIT_VIDEO (off in this build, and tied to the main thread and an SDL window), so with LEONIDA_TOUCH=1|always the shim connects a "Touch (Leonida)" device fed by rt::gameinput::touch_contact(), a thread-safe bridge a host window's WndProc can call on WM_POINTER*, or by set_touch_source() in tests. Its readings carry GameInputKindTouch only: up to 10 contacts in ascending touchId order, coordinates and pressure clamped to 0..1. It follows the keyboard pad's focus rule, stays out of the pad list and is covered by enumeration, reading searches, CreateAggregateDevice, FindDeviceFromId and reading callbacks. GameInputTouchState and GameInputTouchSensorInfo are declared in gameinput_abi.h with static_asserts on their v0 layout. gameinput_test: 24 touch checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
std::clamp passes NaN through, so a host bridge that sent a NaN coordinate or pressure would have handed it to the title. touch_contact() now leaves the contact table unchanged for a non-finite position and reads a non-finite pressure as 0. gameinput_test: 2 more checks, 262 in all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f959626 to
9084a0e
Compare
|
Rebased onto #2413's current head Conflicts with what landed since (RT-160 haptics, RT-176 dispatcher quota):
Tested on Windows 11, RTX 3070 (NVIDIA 32.0.16.1088), MSVC (VS 18), SDL3 3.4.20 (
The earlier GPU reports (@JRamos1993, @steamaze0) were on AI-assisted (Claude Code). |
|
Tested f959626 on Tiger Lake (Xe-LP) iGPU 0x9a78, driver 32.0.101.7088, Windows 11, MSVC 14.44: pass Built with
First-time game-gated data on this machine (package DLLs, no game data quoted): AI-assisted (GLM, operated by the account owner). |
|
Tested 9084a0e, the rebased head (the earlier checks here are of f959626), on Windows 11 Home 26200, MSVC 19.44 (VS 2022), Ninja, RelWithDebInfo, SDL 3.4.20 through The branch as it is now: #2413's two keyboard/mouse commits plus the two RT-167 commits, on
The No compiler warnings from the |
|
Tested on AMD Radeon RX 6600 (RDNA2, gfx1032), Windows 11, Adrenalin 26.11.2 (Vulkan driver 32.0.21045.29003). PR head
No regressions on this hardware. (The PR now conflicts with main, so this is the pre-conflict state.) |
Claimed in the coordination issue as: RT-167 (#2516 (comment))
Depends on: #2413 (reuses its non-pad device list and kind-filtered reading path). Rebased on its current head (
09e77438), which is onmain16282101.What and why
IGameInputReading::GetTouchCountandGetTouchStatereturned0, so a title that queries touch input through GameInput on touchscreen PCs and handhelds received nothing. As noted in #2300 / #2516, SDL3's touch subsystem is initialized insideSDL_INIT_VIDEO(which must run on the main thread with an SDL-managed window and is built withSDL_VIDEO=OFFhere).This adds the GameInput touch device, its readings, and a thread-safe host-window bridge behind
LEONIDA_TOUCH(off by default, likeLEONIDA_KEYBOARD_PADandLEONIDA_KEYBOARD_MOUSE):runtime/shims/gameinput_abi.h):GameInputTouchState(48 bytes),GameInputTouchSensorInfo(64 bytes), andGameInputTouchShape/GameInputLabel/GameInputLocation, checked side by side against the v0 header ofMicrosoft.GameInput0.2303.22621.3038 and pinned withstatic_asserts.runtime/shims/gameinput.cpp):Touch (Leonida)behindLEONIDA_TOUCH=1|focus|always|off, withsupportedInput = GameInputKindTouch,touchPointCount = 10,touchSensorCount = 1andtouchSensorInfo, kept out of the gamepad list (connected_count()is unchanged). Enumeration,GetCurrentReading/GetNextReading/GetPreviousReading,CreateAggregateDevice(GameInputKindTouch, ...),FindDeviceFromIdand reading callbacks cover it.GameInputKindTouchonly (GetTouchCount/GetTouchStatein ascendingtouchIdorder, up to 10 contacts); pad, keyboard and mouse getters return nothing on a touch reading, and gamepad queries never return touch readings.runtime/shims/gameinput.h):rt::gameinput::touch_contact(id, x, y, pressure, down)(andclear_touch_contacts()) can be called from any thread (e.g. a host window'sWndProconWM_POINTER*), clamping coordinates and pressure to0..1, plusrt::gameinput::set_touch_sourcefor synthetic tests, under the keyboard pad's focus rule.docs/gameinput.md): adds the "Touch device" section, theLEONIDA_TOUCHrow in the environment table, and updates theIGameInputReadingAPI table.Tested
AI-assisted (Claude Code). Re-run after rebasing on #2413's current head.
Windows 11 (26300), MSVC 19.51, SDL3 3.4.20 (
-DLEONIDA_SDL3_FETCH=ON), NinjaRelWithDebInfo, NVIDIA GeForce RTX 3070:Microsoft.GameInput0.2303.22621.3038GameInput.hwithcl /std:c++20to verifysizeofand every member'soffsetofforGameInputTouchStateandGameInputTouchSensorInfo.gameinput_test: 262 checks, 0 failures (26 new touch checks covering: off by default,LEONIDA_TOUCH=1focused mode, device info andtouchSensorInfo,FindDeviceFromId, initial zero-contact reading, pad/keyboard/mouse isolation, multi-contact ordering by ascendingtouchId, coordinate/pressure clamping to0..1,GetTouchStatecapacity and null output, contact movement and removal,GetPreviousReadinghistory walk, 10-contactmaxTouchPointscap, focus loss vsLEONIDA_TOUCH=always,set_touch_sourceseam,CreateAggregateDevice(GameInputKindTouch, ...), non-finite coordinates and pressure, and disconnecting onLEONIDA_TOUCH=off).Checklist
docs/design.md, with how it was confirmed. (N/A: runtime only.)🤖 Generated with Claude Code