Skip to content

feat: build SDL backend on all host platforms#327

Draft
Xavier Bernhardt (XavierBernhardt-Philips) wants to merge 5 commits into
mainfrom
fix/sdl-host-build
Draft

feat: build SDL backend on all host platforms#327
Xavier Bernhardt (XavierBernhardt-Philips) wants to merge 5 commits into
mainfrom
fix/sdl-host-build

Conversation

@XavierBernhardt-Philips

@XavierBernhardt-Philips Xavier Bernhardt (XavierBernhardt-Philips) commented Jul 8, 2026

Copy link
Copy Markdown

Enable the preview.sdl target for any host build, not just Windows, so the SDL DirectDisplay can be used from Linux/macOS host applications.

  • gate preview/sdl on EMIL_HOST_BUILD instead of EMIL_BUILD_WIN
  • avoid taking the address of a temporary SDL_Rect in Convert(), which fails to compile under GCC/Clang with -Werror
  • drop a duplicate Colour.hpp include

Current problem:

  • X11 is now installed for CI runs, but there's nothing to install it for local machines / dev containers.

Enable the preview.sdl target for any host build, not just Windows, so
the SDL DirectDisplay can be used from Linux/macOS host applications.

- gate preview/sdl on EMIL_HOST_BUILD instead of EMIL_BUILD_WIN
- avoid taking the address of a temporary SDL_Rect in Convert(), which
  fails to compile under GCC/Clang with -Werror
- drop a duplicate Colour.hpp include
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.18s
✅ ACTION zizmor 5 0 0 0 1.73s
✅ CPP clang-format 166 1 0 0 1.04s
✅ CPP cppcheck 166 0 0 4.08s
✅ DOCKERFILE hadolint 1 0 0 0.72s
✅ JSON jsonlint 8 0 0 0.26s
✅ JSON prettier 8 1 0 0 0.3s
⚠️ MARKDOWN markdownlint 4 0 2 0 0.54s
✅ MARKDOWN markdown-table-formatter 4 0 0 0 0.18s
✅ REPOSITORY checkov yes no no 24.89s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 42.99s
✅ REPOSITORY ls-lint yes no no 0.0s
✅ REPOSITORY secretlint yes no no 1.34s
✅ REPOSITORY syft yes no no 1.25s
✅ REPOSITORY trivy yes no no 12.88s
✅ REPOSITORY trivy-sbom yes no no 0.14s
✅ REPOSITORY trufflehog yes no no 2.27s
⚠️ SPELL lychee 35 3 0 2.8s
✅ YAML prettier 8 1 0 0 0.28s
✅ YAML v8r 8 0 0 5.12s
✅ YAML yamllint 8 0 0 0.59s

Detailed Issues

⚠️ SPELL / lychee - 3 errors
📝 Summary
---------------------
🔍 Total...........67
🔗 Unique..........61
✅ Successful......64
⏳ Timeouts.........0
🔀 Redirected......10
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........3
⛔ Unsupported......3

Errors in .github/workflows/static-analysis.yml
[403] https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$ (at 32:21) | Rejected status code: 403 Forbidden

Errors in CHANGELOG.md
[404] https://github.com/philips-software/amp-preview/compare/v1.0.0...v1.1.0 (at 15:4) | Rejected status code: 404 Not Found

Errors in CONTRIBUTING.md
[ERROR] https://confluence.atlas.philips.com/display/GITHUB/Contribution+Models (at 42:22) | Connection failed. Check network connectivity and firewall settings

Hint: Followed 10 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 2 errors
CHANGELOG.md:18 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:23 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,CPP_CPPCHECK,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

SDL3's CMake hard-fails on Linux without X11/Wayland development headers.
Now that preview.sdl builds on all host platforms (not just Windows), the
Linux CI jobs must provide them. Install libx11-dev + the common X
extensions on host_build_test (Linux only), Static Analysis, and CodeQL.
macOS/Windows use their native backends and need nothing extra.
SDL3 hard-requires XScrnSaver and XTest (in addition to the earlier X
libs); add libxss-dev, libxtst-dev, and libxkbcommon-dev so the SDL host
build configures on the Linux CI jobs.
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.

3 participants