feat(Windows): Add virtualhid_control diagnostic UI tool#44
Merged
Conversation
Introduces virtualhid_control, a native Windows UI for creating, controlling, and testing virtual gamepads. The tool provides interactive gamepad creation from built-in profiles, button and stick controls, device node inspection, and output report monitoring. Includes CMake build configuration with support for static runtime linking on Windows (MinGW/UCRT64 and MSVC) and platform-specific flags. Documentation covers platform limitations, build options, driver packaging integration, and usage instructions. Cross-platform stub provided for non-Windows platforms.
Add Windows resources and wire the `virtualhid_control` tool to use an app icon. The UI now supports removing devices, locking buttons, battery controls, richer output summaries, and improved layout/visibility handling for supported controls. Update docs to reflect the expanded gamepad management and feedback features.
Improve window clipping, redrawing, and layout handling: - Add WS_CLIPCHILDREN and WS_CLIPSIBLINGS window styles for proper child control rendering - Force window redraw on size changes and profile switching - Add SWP_NOCOPYBITS flag to prevent drawing artifacts during repositioning - Remove tick marks from trackbars for cleaner appearance - Extract layout dimensions into named constants for better maintainability - Refactor battery control positioning with configurable spacing - Increase minimum window size from 900x660 to 980x740 - Track visibility changes to optimize redraw operations - Add relayout_and_redraw() helper to ensure consistent UI updates
Update the Windows driver build step to include `virtualhid_control` alongside the existing catalog and adapter targets, so CI covers the control target as part of the driver pipeline.
Relocate libvirtualhid.ico from tools/windows/ to the project root directory. Update CMakeLists.txt to include the project source directory in the include path so the resource build can locate the icon file.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #44 +/- ##
===========================================
- Coverage 89.77% 76.15% -13.63%
===========================================
Files 14 18 +4
Lines 4500 5188 +688
Branches 1511 1987 +476
===========================================
- Hits 4040 3951 -89
- Misses 345 1105 +760
- Partials 115 132 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Harness.
|
Add a dedicated `run_gamepad_adapter_example` CMake target and use it in CI so the gamepad adapter runs from the correct generator-specific output path on all platforms. CI now also enables `LIBVIRTUALHID_BUILD_TOOLS`, and coverage collection was broadened to include `examples/`, `src/`, and `tools/` while excluding `tests/` and `third-party/` noise. Development docs were updated to document the new run target.
Stop shipping the reviewer PowerShell validation scripts in the Windows package, and update the Windows driver and store review docs to point reviewers at the installed `virtualhid_control.exe` UI instead. The unit test is also cleaned up to use unqualified `GamepadOutputKind` enum values for readability.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Adds a ui diagnostic tool for Windows.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage