test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83 #1011
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1011
Loading…
Reference in a new issue
No description provided.
Delete branch "d4nkn3ss/Longshot:test/pads-after-menu-loadlibraryex"
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?
Type: test · Risk: low · Tested on: Windows 11, RTX 3080 · Needs: none
Why
test_pads_after_menufails on main on every OS, before checking anything. It checks that the pads go back to the game after the Insert menu closes. It compileshost/nn_hid.c's pad reading against a stand-in for Windows' calls, and since39484b83("load XInput and IMM32 from System32") that code loadsxinput1_4.dllwithLoadLibraryExA(..., LOAD_LIBRARY_SEARCH_SYSTEM32). The stand-in only hadLoadLibraryA, so the compile stops withcall to undeclared function 'LoadLibraryExA'. I searched the open PRs for the check's name; #823, #822 and others only list it among main's failures.What changed
The stand-in gets
LoadLibraryExAand the flag's value. Like itsLoadLibraryA, it returns no module (no XInput: SDL has the pads). The cases are unchanged.tests/test_pads_after_menu.pyPRELUDE:#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x800andstatic HMODULE LoadLibraryExA(const char *, void *, DWORD).Measurements
Verdict: nothing to measure: a check only. It fails on main and passes here.
Flags and settings
None
Testing
Tested:
python -I -B tests/run_all.pyfrom PowerShell on Windows 11, with llvm-mingw from the Longshot Builder.1764fed2c73e8116test_pads_after_menucall to undeclared function 'LoadLibraryExA',use of undeclared identifier 'LOAD_LIBRARY_SEARCH_SYSTEM32'run_all.pyin allThe 18 left fail on main too:
test_auto_handheld,test_bug_report_defaults,test_crash_dialog,test_crt_options,test_fsr_uniform_ownership,test_guest_imported,test_import_reach,test_linux_preflight,test_make_game_cache,test_missing_nup,test_parallel_init_order,test_pending_guest_import,test_release,test_replay_write_order,test_run_all_changed,test_tested_configurations,test_vk_occlusion_queries,test_walk_key. Some have open PRs: #1009, #1007, #1006, #1003, #993, #999, #592, #144, #954, #937 and #537.Not tested: Linux and macOS. The stand-in is the whole of Windows there (run_all builds the check with gcc), and the error was an undeclared function, the same on every compiler.
Must be tested: None. The change is to a check only.
Risks
What could break: nothing in the game: only
tests/changes.Turning it off: revert the commit.
Compatibility: Nothing changes.
Issues
None found: the change that moved nn_hid.c to LoadLibraryExA is
39484b83.Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
39484b83WIP: test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83to test(hid): test_pads_after_menu stubs LoadLibraryExA, which nn_hid.c loads XInput with since 39484b83View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.