Skip to content

test-input-focus: drop the duplicate photo_pad stub - #1100

Closed
gshlok wants to merge 1 commit into
Revivedx:testfrom
gshlok:fix/unit-tests-build
Closed

gshlok wants to merge 1 commit into
Revivedx:testfrom
gshlok:fix/unit-tests-build

Conversation

@gshlok

@gshlok gshlok commented Nov 24, 2026 •

Copy link
Copy Markdown

What this changes

tools/test_input_focus.c defines the photo_pad stub twice: once among the HLE stubs (line 77, from a76f902) and again at the end of the file, added by the November 18 batch (22d36c9). The test no longer compiles on any platform:

tools/test_input_focus.c:285:6: error: redefinition of 'photo_pad'

This removes the second copy. Nothing else changes.

How it was tested

Windows 11, MSYS2 UCRT64 (clang 23.1), on top of test at 2ae4b39:

  • before: make test-input-focus fails with the redefinition error above
  • after: it builds and prints input focus checks passed
  • the other make test-* targets that build on Windows still pass

No game files are involved: the test uses only synthetic input.

Checklist

  • Based on the latest test and opened against test
  • Built and run locally, and checked in the game (test-only change: built and ran the test, nothing to check in the game)
  • No game files, keys, firmware, generated game code or save files in the changes

🤖 Generated with Claude Code

The Nov 18 batch (22d36c9) added a second photo_pad stub at the end of
tools/test_input_focus.c, next to the one already among the HLE stubs, so the
test no longer compiled ("redefinition of 'photo_pad'") on any platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 07:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Dathinel

Copy link
Copy Markdown

Reproduced on test 2ae4b39 with llvm-mingw 20261117 (clang 23 + lld) and SDL 3.4.18. The redefinition of 'photo_pad' error goes away with this change.

With lld as the linker, the test then stops at ld.lld: error: undefined symbol: act_cycle_live. That's dead code in input.c:406, and COFF lld reports it before --gc-sections, the same class as #1101. The rule doesn't pass -fuse-ld=lld, so MSYS2 UCRT64's default linker may not hit this. I didn't have that toolchain here to confirm.

Either of these makes it pass (input focus checks passed, exit 0):

The stub keeps link errors meaningful for symbols that are actually reached.

(Synthetic build/test only. Investigated with AI assistance.)

@Revivedx

Copy link
Copy Markdown
Owner

Thanks! Our branch already had this (the duplicate stub was gone), so there was nothing left to apply. Closing.

@Revivedx Revivedx closed this Nov 25, 2026
@gshlok gshlok mentioned this pull request Nov 26, 2026
2 of 3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants