Skip to content

fix(gamepad): forward-port SDL option scoping to main - #1545

Merged
fvaloppi-nv merged 1 commit into
mainfrom
codex/fix-gamepad-sdl-scope-main
Nov 17, 2026
Merged

fvaloppi-nv merged 1 commit into
mainfrom
codex/fix-gamepad-sdl-scope-main

Conversation

@fvaloppi-nv

@fvaloppi-nv fvaloppi-nv commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Building the gamepad and OAK plugins together forces SDL_VIDEO=OFF into the global CMake cache, so OAK's SDL2 preview fails with SDL not built with video support. Scope the gamepad's SDL3 options to its directory so OAK retains video support.

Forward-port the original fix from #1435, already merged into release/1.7.x, to main. This is a cherry-pick of 835ed9b with the same stable patch ID.

Related: NVBug 7053924 (Thor) and NVBug 7053285 (same SDL option conflict).

Existing build directories need a fresh configure without the stale CMake cache, which retains the forced SDL settings.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

  • SKIP=check-copyright-year pre-commit run --all-files passed.
  • Ran an isolated CMake configure check using the option loops extracted from the actual before/after source: before the fix, the sibling OAK video option is disabled; after the fix, it remains enabled while the gamepad still has video disabled and joystick enabled.
  • git diff --check passed; stable patch ID matches the original fix.
  • No new committed test: this forwards the existing fix; the isolated configure check verifies directory scope without requiring SDKs or hardware. Plugin builds, live OAK preview, and Thor validation were not run here. The original PR reports successful OAK-D preview validation on x86_64.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation (inline scope constraint; no user documentation change)
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

Summary by CodeRabbit

  • Chores
    • Updated build configuration. There are no changes to user-facing features or behavior in this release.

The gamepad plugin set its SDL3 options with set(... CACHE BOOL "" FORCE).
The OAK plugin's bundled SDL2 reads the same SDL_* names and is configured
later, so it was built with SDL_VIDEO OFF and `camera_plugin_oak --preview`
failed with "SDL not built with video support" (test_oak_camera.py too).

Use normal variables instead. SDL3 honors them (CMP0077) and they stay in
the gamepad directory scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Grecia Salazar Estrada <gsalazarestr@nvidia.com>
(cherry picked from commit 835ed9b)
Signed-off-by: fvaloppi-nv <fvaloppi@nvidia.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The gamepad CMake configuration keeps the existing SDL3 option values. It now assigns them as directory-scoped normal variables instead of forcing BOOL cache entries.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: Minimal · up to dafa3

This change limits the gamepad's SDL3 build options to its own directory, which should stop it from disabling video support in the OAK plugin's SDL2 build. No concrete merge risk was found. Existing build directories need a fresh configure to clear stale cached settings.

Architecture risk: Low · up to dafa3

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/plugins/gamepad/CMakeLists.txt: SDL3 options are still set to OFF for the listed shared, test, install, and subsystem options, and ON for the listed static, joystick, HIDAPI, and Unix console options. The assignments no longer force BOOL cache entries; they use directory-scoped normal variables.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the gamepad plugin and the fix. The change scopes the SDL3 CMake options to the gamepad directory with normal variables instead of forced cache entries, which matches the title. The ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the gamepad plugin and the fix. The change scopes the SDL3 CMake options to the gamepad directory with normal variables instead of forced cache entries, which matches the title. The title is short and specific. It uses the term 'forward-port', which tells reviewers this is a port of an earlier fix to main, and the objectives confirm that.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dc10c4f and dafa36d.

Files selected for processing: 1

  • src/plugins/gamepad/CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@fvaloppi-nv
fvaloppi-nv merged commit 67cfea8 into main Nov 17, 2026
43 checks passed
@fvaloppi-nv
fvaloppi-nv deleted the codex/fix-gamepad-sdl-scope-main branch November 17, 2026 23:26

This branch was successfully deployed

1 active deployment
dev — dafa36de Deployed Nov 17, 2026 by fvaloppi-nv via publish-wheel #7052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants