Resolved the conflict with #760 in runtime/input_sdl.c by keeping both the window enter/leave cases and the new wheel case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the map the mouse moves the cursor, so it had no way to zoom: the zoom is the right stick's y, which only the
keys and a pad reached. While the map is open, each wheel notch is now a full-tilt push of that stick for 100 ms with
50 ms of neutral after it (a turn away from the player zooms in). A fast scroll's notches wait their turn, at most four,
and a turn the other way drops them. The wheel stays unbound elsewhere.
The back ends count the notches while the cursor is captured (input_win.c from raw input's usButtonData, input_sdl.c
from SDL_EVENT_MOUSE_WHEEL), keeping a high-resolution wheel's part of a notch (ikb_wheel_take).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
menu_cursor.c reads the pointer's place through input_wsys.h, which the
Win32 back end fills (GetCursorPos, SetCursorPos, raw-input travel) and
the SDL one stubbed, so on Linux a right click still went back (B is
injected before the place is read) but no item took the focus under the
pointer and a left click confirmed nothing.
input_sdl.c now keeps the pointer's place from the window's own mouse
events, as fractions of its size packed in one atomic word the game
thread reads; entering the window seeds it, and leaving or losing the
focus drops it. ikb_pointer_set warps through the window thread, as SDL
asks for its video thread, and the warp target stands as the place where
the compositor does not echo the warp. Mouse motion also counts towards
the device used last (ikb_mouse_travel), so moving the mouse alone
brings the pointer into the menus after a gamepad.
Co-Authored-By: GLM-5.2 <noreply@z.ai>
The camera input's activity hook wrote the flags to +0x418, but the game's next instruction stores w8 over them
(1.4.3 main+0x874d80), so a mouse-only turn still read as idle. The hook now changes w8.
The free-orbit hooks rewrote the camera stick input from the last sample even in steps without mouse motion; they now
take a step only when the mouse moved in it or holds the pitch, so a gamepad-only step reaches the camera as the game
made it.
The mouse shake gesture for detaching parts is gone: three 24-count reversals fire while a held object is turned back
and forth. Arrow keys or the pad's right stick shake as before.
The menu pointer comes only while the keyboard and mouse are the device used last (input_kbm_last): a gamepad player
sees the menus as on the console. Raw mouse travel is counted while the cursor is released too, so moving the mouse
brings the pointer back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While one of the game's menus has its focus box (the title, the save list, the inventory, Options, shops,
dialogue choices), the cursor is released from the mouse camera and shown; the item under the pointer takes
the focus as the d-pad would, a left click is A on it and a right click is B. runtime/menu_cursor.c reads
eui's screens at each pad read and moves the focus with the writes eui::BoxCursorMgr::moveBoxCursor makes,
adapted from Weeping of the Empire's totk_menu_cursor.cpp (1.0.0, MIT), with eui::ScreenMgr's instance placed
in 1.4.3 at main+0x3acf960. menu_cursor = 0 turns it off.
Shared runtime code now goes through runtime/platform/platform.h, implemented by platform/win32.c and a new
platform/linux.c: futex locks, a userfaultfd and PAGEMAP_SCAN write watch, signal-based async preemption, our own
fiber switch, and a SIGSEGV handler for the thaw and crash hooks. The window, input, menu and software keyboard get
SDL3 back ends beside the Win32 ones, with the swapchain (gfx_present.c) and input merging (input.c) shared. SHA-256
replaces BCrypt, ELF builds get their own override sections, and the build tools gain Linux branches.
On Linux the selftest and the gfx-abi, astc, nvn and window probes pass. probe-vkmem still fails: imported guest
memory cannot be write-watched on Linux, which the shadow buffers in vk_memory.c will address.