Stop the mouse pointer from scrolling the map at a screen edge #3
Loading…
Reference in a new issue
No description provided.
Delete branch "oasis1701/StellarisAccess:feat/no-edge-scroll"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A proposal to switch off the game's mouse edge scrolling while the mod runs. Blind players never pan with the mouse, and a pointer they can't see, left at a screen edge, drags the map away from where the keyboard puts it.
The problem
On 2026-11-17 the lane dial said "Icons off screen" for every neighbour, even right after Ctrl+Up. The mouse pointer was resting in the top-right corner. The galaxy camera was held at the map's north-east limit (look-at -1000, -1000), following nothing. Moving the pointer to the middle fixed it.
CGameCamera::UpdateScrollingMovement(Steam v4.6.00x141060910) treats the pointer as at an edge when it is within the NCamera defineEDGE_SCROLLING_PIXELS(3) of a window side. On an edge it scrolls toward that side if Screen Edge Panning is on, then callsAbortObjectFocuswhatever the setting says.FocusOnonly sets the focus object, andUpdateFollowBehaviormoves the camera while one is set. So by the listing, even with the setting off, a pointer on an edge cancels every camera move the map cursor makes. That case wasn't tested in game.The change
src/edge_scroll.cppsetsEDGE_SCROLLING_PIXELStoINT32_MINfrom an input-pump tick, so no pointer position counts as an edge.hooks::uninstallputs the game's value back on unload (not yet exercised). One engine global is written, and no hook is installed.[[global_slot]]intools/addrgen/manifest.toml(anchorCGameCamera::UpdateScrollingMovement,load_index3,expect_symbolNDefines::NCamera::EDGE_SCROLLING_PIXELS).edge_scrollintools/siggen/gates.toml.docs/dev/engine/selection-camera.md("Edge scrolling"), with a line in the dial plan.UX decisions made here
Generated tables to regenerate
This branch doesn't build as committed.
addrs_generated,sigs_generatedanddeps_generatedaren't included, because the GOG column needs the GOG v4.6.0 program and we don't have it. Please run:If GOG is no longer maintained, a zero GOG address is safe.
edge_scroll::install()logs an error and leaves edge scrolling on.For the first test build, on v4.5.4, we ran the generator Steam-only (
--primary-only) against our own Ghidra project, which has v4.5.2 names migrated onto Steam v4.5.4. All 215 existing Steam addresses came out identical tomain, and the new entry resolved to0x14311c900. That matches the listing (read at0x140f379ff) and a live read of 3 in the running game.Tested
In game on Steam v4.5.4, with the pointer placed in the top-right corner and then moved along every edge. 37 dial lines came without "Icons off screen". The camera stayed on the cursor's system (a live read showed it following system 306, 24 of 30 system icons drawn), and Screen Edge Panning was still on in the settings. The log shows
edge_scroll: EDGE_SCROLLING_PIXELS 3 -> offand no faults.Rebased onto v4.6.0
Rebased on 2026-11-24 onto the v4.6.0 port (
e3e5a90) with no conflicts, and the Steam v4.5.4 addresses in the code comment, the manifest note and the engine doc replaced with Steam v4.6.0 ones.UpdateScrollingMovementhas the same 433 instructions and the same constants on v4.6.0, and the define is still its fourth writable-data read, soload_index3 holds. Our Steam-only regeneration resolves it to0x143341b18(read at0x141060d2f). A v4.6.0 launch of a local build with this change loggededge_scroll: EDGE_SCROLLING_PIXELS 3 -> offand no faults. The pointer test wasn't repeated on v4.6.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01EZNZEiCiFiHusWHbDPjYoQ
acc96bc2d3to8dad80c413