Repository navigation
Glide3xVK 0.4.5
Pre-release
Pre-release
Built from ce78b99
[0.4.5] - 2026-10-28
Added
- Experimental Controller support (g3x_controller): opt-in gamepad play via input
injection — the wrapper polls pad 0 through XInput on its own background
thread (~125 Hz, smooth regardless of the game's 25 Hz tick) and injects
ordinary mouse/keyboard events (SendInput), so the game just sees a normal
mouse and keyboard and every D2 screen works. No Game.exe patch, no driver,
no new DLL imports (XInput loads dynamically: xinput1_4 -> xinput9_1_0 ->
xinput1_3; none = logged once, feature stays off). Map v2 (field spec:
left analog moves me, triggers click, d-pad belts, and hitting things NEAR
me must not need pixel-perfect cursor work — in D2 movement IS the mouse):
left stick = walk (steers the cursor and auto-holds left click while
deflected — D2 walk-to-cursor;controller_moveclick=0for cursor-only),
right stick = fine aim (same curve atcontroller_aimsensspeed, default
0.35, for placing the cursor on monsters/portals/item labels), LT = left
click hold, RT = right click hold, A = hold Shift+LMB (D2 attack-in-place
toward the cursor — swings/shoots at what is near it without moving, the
forgiving way to fight with a stick), B = hold Alt (item labels),
X = tap Space (close screens), Y = tap I (inventory), D-pad = belt 1-4,
LB = C (character), RB = T (skill tree), L3 = tap R (run/walk),
Start = Esc, Back = Tab (automap); R3 reserved. Binds are multi-step
combos pressed in order and released in reverse, and the event model is
desired-state diffing — sources OR together, so the walking LMB and the
A combo's LMB can never double-press or steal each other's release.
Taps are one clean keystroke (down this tick, up the next) so held menu
keys cannot auto-repeat-flip a D2 screen closed. Injection is gated on
the game window being foreground, and everything held is released on
focus loss, disable, pad disconnect and shutdown (a still-held control
stays silent until a fresh press — no surprise clicks after alt-tab).
Conf keys (hot-reloaded like everything else, ~2s probe):
controller=0|1(off by default),controller_sens=(left-stick speed
multiplier, default 1.0, clamp 16),controller_aimsens=(right-stick
fine-aim multiplier, default 0.35, clamp 0.05-4),controller_deadzone=
(percent, default 15, clamp 1-80),controller_moveclick=0(opt out of
stick-walk). Zero present-path cost — no grBufferSwap hook; lifecycle
rides grSstWinOpen/grSstWinClose/detach. Pure core host-tested
(scripts/ctrltest.cpp: 240/240 — conf fixups, bind-table shape, stick
response, trigger edges, combo order, the stick-walk/A-combo interaction,
tap walks, flood cap, release_all re-arm semantics). - Controller cursor-home (field round 2 — the user's own design: "when
no analog input, put the cursor on the player and hide it, then when the
analog moves, it's from player position and when analog stops, it's back
to player position"). The wrapper cannot see the player and does not need
to: D2 walk-to-click always ends with the character standing AT the
cursor, so the cursor position at every stick-walk release IS the player's
screen position. That spot becomes the home anchor (self-correcting — a
walk stopped short by an obstacle re-syncs on the next walk), and after a
~0.4 s quiet dwell (sticks centered, nothing injected, nothing held) the
cursor is SetCursorPos'd back onto it; stick motion therefore always
emanates from where the player is, and the cursor can no longer get lost
at the screen edge. Real-mouse movement is detected and respected (it
counts as activity and re-syncs the tracked cursor). Honest limits, in
the README: the cursor is parked, not hidden (hiding D2's own cursor
sprite would mean intercepting the game's WM_SETCURSOR — Game.exe
territory, out of scope), and a click that walks the character somewhere
(LT on a far portal) leaves home there until the next stick-walk.
Requires stick-walk;controller_home=0restores a plain free cursor.
Field round 3 (verdict on the shipped build): experimental — the anchor
model helps but is not fully dialed in; docs now flag the module as such
and the escape hatch is documented everywhere.
Changed
- Shift+V conf panel (g3x_overlay + g3x_slang): press Shift+V in-game
to toggle an overlay panel on the left edge (below the game's/fpsline;
the tag box keeps the top-right) listing everyd2slangvk.confoption as
currently resolved — preset (basename), scale, vsync, aspect and base_res
at their live F11/F12 session values with afile: ...annotation when
they differ from the conf, window, borderless, and the controller block
(sens/aimsens/deadzone/moveclick/home — listed only while the controller
master switch is on) with the same defaults their
consumers apply (g3x_ctrl_conf_fixup, emptywindow== native). The
content is re-parsed from disk on every open — the file is the truth, and
unlike the F11/F12 hotkeys the toggle polls on EVERY present
(g3x_frame_present), so it works with the chain off, where the present-path
hot-reload probe never runs. While up, the panel refreshes on conf
hot-reloads and F11/F12 presses. Same focus rule as F11/F12 (presses made
in another window never toggle), same fail-soft look (65%-black backdrop,
8x8 font, drop shadow), honors the[glide3xvk] overlay=ini switch, and
toasts + logs on toggle (overlay: conf panel on/off (Shift+V)). - Conf panel arrows: selection + value editing (g3x_overlay +
g3x_slang): while the panel is up, Up/Down move a green selection
cursor through the option lines — the selected row draws as a dim-green
band with bright-green glyphs (#20FF20-ish) against the white text, a
menu cursor in the same hue D2's own UI uses for picked text. The
d2slangvk.confheader line and the hint footer are not selectable; the
cursor clamps at the ends (no wrap — on a 13-option list a wrap reads as a
glitch); each move re-parses the conf (the file-is-truth rule holds for
selection redraws too, and the panel picks up any conf edit that landed
since the last refresh) and logsoverlay: conf panel sel <key>.
Left/Right change the selected option: one press = one step, written
straight intod2slangvk.confand pushed through the normal conf
machinery, so it lands live exactly like a hand edit — aspect/base_res
snap on the spot, scale reads per frame, vsync at the next swapchain
(re)creation, window/borderless/controller on their own mtime probes.
The write is surgical (g3x_slang_conf_rewrite_text, host-tested):
comments, blank lines, spacing, key order and line endings survive
byte-for-byte; only the edited key's assignment changes (every duplicate
of it — the parser is last-one-wins); same-line comments are kept; a
missing key is appended at the end of the[slangvk]section, a missing
section or conf is synthesized. The steps mirror the consumers' own
fixups, so what the arrows write is always a value the parser accepts:
preset cycles the game dir's*.slangpfiles (sorted,(none)at the
front; subdir/absolute presets stay file-edit-only), scale
fit/stretch/integer, vsync auto/off/on, aspect auto/4:3/16:10/16:9 (the
F11 order), base_res 1x-4x, window native/240p/480p/576p/720p/768p/
1080p/desktop (the preset table;WxHstays file-edit-only),
borderless/controller/moveclick/home toggle, controller_sens 0.25 steps
(0.25-16), controller_aimsens 0.05 steps (0.05-4), controller_deadzone
5% steps (1-80). Every change toasts (aspect 16:9) and logs
(overlay: conf aspect = 16:9); a list end, an empty preset dir or a
failed write touches nothing and logs why. Same focus rule and edge
latches as every hotkey here; while the panel is hidden the arrow keys
are untouched — the game keeps them. The footer hint reads
[Up/Down] select - [Left/Right] change - [Shift+V] hide(on the preset
row:... [Left/Right] list ...). - Conf panel: controller-off hiding + preset browser (g3x_slang): with
controller=0the controller sub-options are inert, so the panel skips
their rows — thecontroller offrow itself stays (Left/Right switches
it back on, which re-lists the sub-options on the spot). And Left/Right
on the preset row open the preset browser over the current preset's
folder subtree: the scan root followspreset='s dir component
(presets\crt.slangplists thepresetstree; a bare/empty/absolute
preset=lists the game dir tree) and the walk recurses to any depth —
shader collections nest deeper than two folders — with the rows stored
exactly aspreset=accepts them (presets\xbr.slangp,
shaders\crt\royale\kurozumi.slangp— a pick resolves back to the very
file listed).
Page shape: apresets (N) - <dir>header (the scan root), the
conf's current preset starred (*),(none)at the front, up to 16 rows
on screen with a scroll window that follows the cursor. Up/Down move
the green cursor through it, Right loads the highlighted preset (the
same surgicalpreset=write + conf hot-reload path as the value
edits — a real change rebuilds the chain live, re-picking the same
preset is a no-op rewrite that still confirms via toast), and Left
goes back to the option page (Shift+V hides everything and resets the
browser). The browser is deliberately Enter/Esc-free — Enter reaches the
game's chat box and Esc its menu, and a GetAsyncKeyState poll cannot
swallow either, so Left/Right do double duty (open from the preset row,
then load/back while it is up). The tree is scanned fresh at every
open; an empty tree toastsno .slangp under <folder>instead of opening
an empty page. Logsoverlay: preset browser ...lines to match. - Overlay: repo credit line (g3x_overlay): the tag box ends with a
permanent bottom line —GitHub: VTSTech/D2LoD-libslang-vk— the one
overlay line that never clears (shader line) and never expires (toast),
so every screenshot the overlay stamps also names the project's home.
The conf panel draws before the tag box, so the stamp wins any overlap on
tiny present targets. - Overlay: the running game exe + its patch version (g3x_hostver +
g3x_overlay + glide_exports): the tag box gains a line directly under the
build stamp naming the host —d2.exe 1.14d— detected once per process at
the firstgrSstWinOpenand fail-soft end to end. The primary identifier
is a zlib-compatible CRC-32 of the exe file on disk (chunked read through
a static buffer): a hit in the known-build table names the exact binary
outright and outranks the resource tiers (Game.exe Retail 1.14d— the
bytes are ground truth), an unknown one is the raw-hex fallback
(d2.exe [CRC 3A5D2B1F]) for builds with no version resource (this
repo's own CMake-built d2.exe) or just the exe name. Tier 2 reads the
exe's VERSIONINFO resource and maps the Blizzard-stampeddwFileVersion
pair to the community patch names via d2dx's field-tested table
(1.0.9.22=1.09d,1.0.10.9=1.10,1.0.12.49=1.12,1.0.13.60=1.13c,
1.0.13.64=1.13d,1.14.3.68=1.14b,1.14.3.71=1.14d); an unmapped
pair shows the dotted value (Game.exe v1.0.13.55). Both tables grow
from the field: the raw evidence is always logged (hostver: ... (ver= ms= ls= crc= bytes=)), so an unmapped build can be named later by
quoting its log line. New moduleg3x_hostver(pure tables/CRC/format
host-tested in scripts/test_hostver.cpp, 47 checks under ASan+UBSan;
Win32 pass fakecheck type-checked); glide3x links the system version
import lib. No game-side changes — the DLL stays strictly read-only
toward Game.exe.
Fixed
- Flicker investigation closed by the config-only switch (field
confirmation): the "constantly resizing the frame" turbulence reported
on the F10 builds (b6c5bce log: 20 applies = 20 clean one-shot swap
recreates, no storms — the wrapper's per-frame path was never the
culprit) rode on the live hotkey apply cycle itself (SetWindowPos +
same-frame swapchain recreate + chain retarget + toast at the menu's
cadence). Field-verified after the F10 removal: resizing viawindow=in
the conf — applied at renderer open and on the quiet ~32-frame mtime
hot-reload — changes the running size with no flicker. Config-only
presets are therefore also the flicker fix; any future live-resize
feature must solve the apply-cycle turbulence first. - Conf-panel/browser toasts were invisible while no preset was loaded: the
overlay's optional toast line required the active-shader line to be up
(three = two && s_toast_on), so e.g. the browser'sno .slangp ...
toast never drew in exactly the situation that produced it — the field
report of "never seeing" the empty-folder toast. The toast now draws
whether or not a shader line is up; the tag box's credit line stays the
bottom row either way. - The 8x8 overlay font's 'm' rendered as a solid block: DejaVu Sans Mono
Bold's triple-stem 'm' collapses under the 4x-box-filter at 8px, and no
overlay string until now contained a lowercase 'm'. The Shift+V panel's
controller keys (controller_aimsens/controller_moveclick/
controller_home) exposed it.scripts/gen_font8x8.pynow hand-draws 'm'
alongside the g/p/q/j descender overrides (1px stems 3 columns apart, 1px
top bar, x-height body rows 2-7, in the style of the generated 'n'); the
header was regenerated — every other glyph byte-identical.
Full Changelog: 0.4.4...0.4.5